# How to download all stocks from NYSE, AMEX and Nasdaq from CRSP without entering individual company codes?

I was wondering if there is an efficient way to extract data on all the stocks from the CRSP dataset?

In the Query Form I only have the option to enter company codes individually or to upload a .txt file with one company code per line. Both of which is not an efficient option. Is there a way to possibly achieve this goal in R or Python?

You can easily download information about all available stocks from the query form. Simply choose the option Search the entire database (see below).
• @yungmist Well, there are assets that are traded at different exchanges. If you search the entire database, you obtain data for all assets. You should thus throw out all data you don't want. In empirical asset pricing, you typically only include stocks with shrcd (share codde) 10 and 11 (common equity) and exchcd (exchange code) 1, 2 and 3 (NYSE, AMEX, NASDAQ). Jul 22 '20 at 21:46