List the companies in an industry, using the SEC's Standard Industrial Classification (SIC).
Pass a SIC code (3-4 digits, e.g. "6200" for securities brokers and exchanges, "3571" for electronic
computers, "7372" for prepackaged software) to get its companies: CIK, name, ticker, exchange, state of
incorporation and fiscal year end, 100 per page, companies with a ticker first. Get a company's own
code from get_company or search_companies (sic).
A sector is often several codes: pass a range or a list ("2000-2099" for all food and beverages,
"2833-2836" for drugs, "2080,2086"), and each company then carries its own code; codes lists the
codes found with their titles and company counts. A ticker is not an exchange listing: OTC
companies have tickers too, so for exchange-listed companies pass exchange="NYSE,Nasdaq". Every
answer with a code also has by_exchange: how many of its companies are on each exchange (none = no
exchange ticker), so one call says how a sector splits between NYSE, Nasdaq and OTC.
With exchange and no industry you get every company listed there (e.g. exchange="NYSE"), by name, 100
per page, each with its SIC code and title, and by_sic: how many of them each SIC code has. With
neither industry nor exchange you get the exchanges themselves: every name SEC's ticker file uses, with
how many companies are on each.
If you do not know the code, pass a word from the industry name instead ("software", "pharmaceutical",
"bank", "oil") and you get the matching SIC codes with how many companies each has; then call again
with the code you want. list_sic_codes shows the whole classification.
SIC is the SEC's classification of the filer, assigned when it registers. It is not GICS or NAICS,
individuals and most funds have none, and some codes are broad (e.g. 6770 "blank checks").
Args:
industry: a SIC code like "6200", or a word to look up codes by ("software"); may be left out
when exchange is given
query: with a code: only companies whose name or ticker contains this
page: with a code: page number, 100 companies per page (default 1)
listed_only: with a code: only companies that have a ticker (default True; OTC included). Set False
to include the many dormant, delisted and asset-backed entities that carry the same code.
exchange: only companies listed on one of these, comma-separated, as SEC names them: NYSE, Nasdaq,
OTC, CBOE, TXSE; without industry, every company listed there