You can get the data directly from NASDAQ here
ftp://ftp.nasdaqtrader.com/Under the SymbolDirectory folder and a description of the fields here:?
I haven't found the equivalent for NYSE yet.
I have a similar need right now and I'm looking into the different data providers like Polygon.io