41
$\begingroup$

Is there a way by which I can get a list of CIK of all registered stocks at the SEC?

$\endgroup$

12 Answers 12

31
$\begingroup$

The EDGAR FTP should have all of the information you need. Here is the list from that page in text format. Keep in mind a given CIK can be associated with multiple names through time.

$\endgroup$
5
  • 3
    $\begingroup$ How about a CIK - Ticker mapping ? $\endgroup$
    – Jean
    May 31 '13 at 16:12
  • 1
    $\begingroup$ There isn't one I'm aware of. Mappings require legwork and most who have built one aren't always readily willing to share it, especially for a universe this large. $\endgroup$
    – jeff m
    May 31 '13 at 20:23
  • 1
    $\begingroup$ @Jean CIK-Ticker mapping by RandAndFiled: rankandfiled.com/#/data/tickers $\endgroup$ Sep 29 '16 at 18:28
  • $\begingroup$ @AntonTarasenko do you know the source of this info? Is it static? How do they compile this? $\endgroup$
    – eggie5
    Jun 14 '17 at 21:14
  • $\begingroup$ @eggie5 I don't know. I made my own ticker-CIK dataset after all. Based on the up-to-date SEC ticker data. $\endgroup$ Jun 15 '17 at 6:37
24
$\begingroup$

Official Ticker to CIK Mapping: https://www.sec.gov/include/ticker.txt

$\endgroup$
1
9
$\begingroup$

This website has what you're looking for in downloadable csv/Excel format:

http://rankandfiled.com/#/data/tickers

$\endgroup$
2
  • 1
    $\begingroup$ While useful, this seems to be a subset of the CIK's listed in this answer. $\endgroup$
    – Bob Jansen
    May 28 '17 at 9:03
  • $\begingroup$ Rank and filed seems to no longer be active. The site gives a 502. $\endgroup$
    – Jad Chaar
    Dec 18 '21 at 0:18
6
$\begingroup$

As of now, I know of no good method.

The tedious part about all of this is that there is no company name standard apparent to me, as CIK company name, exchange company name, and legal company name can all be different. I have to get my hands dirty with the method I use.

I only trade options, so I download the CBOE's master list in csv and input into my database. I think the stock exchanges post something similar.

This is the tedious part: you can use the established company name to ticker search which is difficult to parse or this other search that gives everything on a given result. I use the second search.

For this, I made a simple php script that iterates through each ticker I receive from the CBOE, searching first the entire company name then each word individually, both except for words like "the", "company", "corporation", "inc", etc and dump the results into a database.

You'll see that with the "other search" there are two results: a company page if there's only result or a company list if there're multiple. Both are easy to parse.

When there's 1 result for the search with the "sanitized" entire company name, I just went with that initially and started on the ones with multiples (rare with full name search) or no results (sometimes with full name search). Over time, I have confirmed all manually.

The manual inspection never ends. Companies change names and tickers.


I will now parse with jeff m's link.

$\endgroup$
6
$\begingroup$

Yahoo Finance has a mapping of tickers to CIKs, which is visible on their SEC Filings pages, e.g. http://finance.yahoo.com/q/sec?s=KO+SEC+Filings

This page links to documents on EDGAR, and at the bottom of the page there is a link, "View All Filings on EDGAR Online", which contains the cik as a URL parameter:

<a href="http://www.edgar-online.com/brand/yahoo/search/?cik=21344" data-rapid_p="39">
  <strong>View All Filings on EDGAR Online</strong>
</a>

And indeed, Coca-Cola's CIK is 21344.


Incorporating pabtorre's code for easier reading:

import re
import urllib2

def get_cik(ticker):
  ''' this function uses yahoo to translate a ticker into a CIK '''
  url = "http://finance.yahoo.com/q/sec?s=%s+SEC+Filings" % (ticker)
  return int(re.findall('=[0-9]*', 
                        str(re.findall('cik=[0-9]*',
                                       urllib2.urlopen(url).read())[0]))[0][1:])

This can probably be tidied up a bit but I gave it a try and it worked.


Cerin's comment referenced a discussion thread that lead me to discover in fact you can query EDGAR directly with ticker names. it's not clear to me why this wasn't apparent before, perhaps it's a new feature. If you go to EDGAR's Company Search page you can type in a ticker and get the associated CIK and companies filings; here's the result page for KO again - even better, the data is served up as XML, making it very easy to parse.

$\endgroup$
4
  • $\begingroup$ this can be done in python with a few lines of code. import re import urllib2 def get_cik(ticker): ''' this function uses yahoo to translate a ticker into a CIK ''' url = "http://finance.yahoo.com/q/sec?s=%s+SEC+Filings"%(ticker) return int(re.findall('=[0-9]*', str(re.findall('cik=[0-9]*', urllib2.urlopen(url).read())[0]))[0][1:]) $\endgroup$
    – PabTorre
    Jan 9 '14 at 19:18
  • $\begingroup$ This can also be scraped directly from the SEC Edgar site as shown here. $\endgroup$
    – Cerin
    Jan 19 '14 at 13:21
  • $\begingroup$ This doesn't work for a lot of tickers. Try LEXG, JAMN for example... $\endgroup$
    – eggie5
    Sep 13 '16 at 22:14
  • $\begingroup$ @egg Yep. It's an additional fetch if it can't find the text cik. Just parse for the link to edgar and follow it, then scrape that page for the cik. Narrow test case was LEXG. $\endgroup$ Mar 25 '17 at 12:50
5
$\begingroup$

My hard-fought results (14,452 CIKs and their tickers):

https://dan.vonkohorn.com/2016/07/03/cik-ticker-mappings/

$\endgroup$
2
  • $\begingroup$ Interesting, thanks for doing this and sharing! Can you describe your methodology? How can someone else replicate or verify your work? $\endgroup$
    – dimo414
    Sep 14 '16 at 1:39
  • 1
    $\begingroup$ I've taken the liberty to parse your list and produce a pipe delimited file, here's the gist gist.github.com/x011/b6d22c462a2e4ab8d6c1f1eab42a0a83, tks! $\endgroup$ Mar 13 '17 at 2:07
1
$\begingroup$

Edit: this no longer works.

The following is a list of every CIK at the SEC:

http://www.sec.gov/edgar/NYU/cik.coleft.c

$\endgroup$
3
  • $\begingroup$ That link is already in a previous answer. $\endgroup$ Nov 1 '13 at 4:26
  • $\begingroup$ do you know where the documentation for this page/resource is? $\endgroup$
    – eggie5
    Jun 14 '17 at 21:19
  • 1
    $\begingroup$ This no longer works as of about 3 months ago $\endgroup$ Nov 7 '17 at 21:55
1
$\begingroup$

I developed a RESTful JSON API (https://mapping-api.herokuapp.com/).

You can send any CIK, company ticker, or company name, and the API returns a JSON response (see examples below) containing the mapping. Retrieving all companies listed on a specific exchange also works.


Examples

Resolve by CIK

Request: GET https://mapping-api.herokuapp.com/cik/:cik

Replace :cik at the end of the URL with the CIK you want to resolve.

Example: https://mapping-api.herokuapp.com/cik/0001318605

Response:

[
    {
        "cik": "0001318605",
        "ticker": "TSLA",
        "name": "Tesla Motors Inc",
        "sic": "3711",
        "irs": "912197729"
    }
]

Removing trailing 0 from the CIK also works. Instead of using 0001318605, you can use 1318605. Same result.

Resolve by Ticker

Request: GET https://mapping-api.herokuapp.com/ticker/:ticker

Replace :ticker at the end of the URL with the ticker you want to resolve.

Example: https://mapping-api.herokuapp.com/ticker/tsla

Response:

[
  {
    "cik": "0001318605",
    "ticker": "TSLA",
    "exchange": "NASDAQ",
    "name": "Tesla Motors Inc",
    "sic": "3711",
    "irs": "912197729"
  },
  {
    "cik": "0000863456",
    "ticker": "WTSLA",
    "exchange": "",
    "name": "Wet Seal Inc",
    "sic": "5621",
    "irs": "330415940"
  }
]

Two companies are returned because WTSLA contains tsla. The API uses regular expressions under the hood allowing complex search queries. If you only want to retrieve exact matches, then use ^ as prefix, and $ as suffix. For example, ^tsla& (see below).

Example (exact match): GET https://mapping-api.herokuapp.com/ticker/^tsla&

Response:

[
  {
    "cik": "0001318605",
    "ticker": "TSLA",
    "exchange": "NASDAQ",
    "name": "Tesla Motors Inc",
    "sic": "3711",
    "irs": "912197729"
  }
]

Resolve by Name

Request: GET https://mapping-api.herokuapp.com/name/:name

Replace :name at the end of the URL with the company name you want to resolve.

Example: https://mapping-api.herokuapp.com/name/Tesla

Response:

[
  {
    "cik": "0001318605",
    "ticker": "TSLA",
    "exchange": "NASDAQ",
    "name": "Tesla Motors Inc",
    "sic": "3711",
    "irs": "912197729"
  }
]

Providing Tesla Motors as name returns the same result. You can use regular expressions here as well.

List Companies by Exchange

Request: GET https://mapping-api.herokuapp.com/exchange/:exchange

Replace :exchange at the end of the URL with the exchange you are looking for, e.g. NASDAQ, or NYSE. You can use regular expressions to show companies listed on different exchanges. For example, if you want to list all companies listed on NASDAQ and NYSE, you can use https://mapping-api.herokuapp.com/exchange/NASDAQ|NYSE

Example: https://mapping-api.herokuapp.com/exchange/NASDAQ

Response:

[
    {
        "cik": "0001099290",
        "ticker": "AAC",
        "name": "Sinocoking Coal & Coke Chemical Industries Inc",
        "sic": "3312",
        "exchange": "NASDAQ",
        "irs": "593404233"
    },
    {
        "cik": "0000006201",
        "ticker": "AAL",
        "name": "American Airlines Group Inc",
        "sic": "4512",
        "exchange": "NASDAQ",
        "irs": "751825172"
    },
    {
        "cik": "0000008177",
        "ticker": "AAME",
        "name": "Atlantic American Corp",
        "sic": "6311",
        "exchange": "NASDAQ",
        "irs": "581027114"
    },
    // cut for brevity
]

List Companies by SIC

Request: GET http://mapping-api.herokuapp.com/sic/:sic

Replace :sic at the end of the URL with the SIC you are looking for.

Example: http://mapping-api.herokuapp.com/sic/3711

Response:

[
    {
        "cik": "0001425287",
        "ticker": "AMPD",
        "name": "Amp Holding Inc",
        "sic": "3711",
        "exchange": "OTCBB",
        "irs": "261394771"
    },
    {
        "cik": "0000791115",
        "ticker": "CIGI",
        "name": "Coach Industries Group Inc",
        "sic": "3711",
        "exchange": "",
        "irs": "911942841"
    },
    {
        "cik": "0000021759",
        "ticker": "COLL",
        "name": "Collins Industries Inc",
        "sic": "3711",
        "exchange": "",
        "irs": "430985160"
    },
   // cut for brevity...
]
$\endgroup$
2
1
$\begingroup$

You can get this directly from the SEC.

  • In text format: https://www.sec.gov/include/ticker.txt

    Sample:

    a 1090872
    aa    1675149
    aaap  1611787
    aacg  1420529
    aach  1606180
    aacqu 1802457
    aagh  1098009
    ...
    
  • In JSON format: https://www.sec.gov/files/company_tickers.json

    Sample:

    {
        "0":{"cik_str":1750,"ticker":"AIR","title":"AAR CORP"},
        "1":{"cik_str":1800,"ticker":"ABT","title":"ABBOTT LABORATORIES"},
        "2":{"cik_str":1961,"ticker":"WDDD","title":"WORLDS INC"},
        "3":{"cik_str":2034,"ticker":"ACET","title":"ACETO CORP"},
        ...
    }
    

More information about getting EDGAR data: https://www.sec.gov/edgar/searchedgar/accessing-edgar-data.htm

$\endgroup$
2
  • $\begingroup$ Your first answer was already listed by nightcrawler500. $\endgroup$ Jul 2 '20 at 17:16
  • $\begingroup$ The JSON is great. Somehow orcl 1341439 has a duplicate entry. $\endgroup$ Sep 7 '20 at 1:40
0
$\begingroup$

Like Jan, I've worked on putting this into an API:

https://api.odie.app/companies

The background to this, and one of the "easiest" ways to get this data from the SEC Form 4 filings as this contains the CIK of the receiver (a person) and the CIK of the issuer as well as issuer ticker:

<ownershipDocument>

<schemaVersion>X0306</schemaVersion>

<documentType>4</documentType>

<periodOfReport>2014-10-01</periodOfReport>

<notSubjectToSection16>0</notSubjectToSection16>

<issuer>
    <issuerCik>0001179929</issuerCik>
    <issuerName>MOLINA HEALTHCARE INC</issuerName>
    <issuerTradingSymbol>MOH</issuerTradingSymbol>
</issuer>

<reportingOwner>
    <reportingOwnerId>
        <rptOwnerCik>0001572056</rptOwnerCik>
        <rptOwnerName>James Steven</rptOwnerName>
    </reportingOwnerId>
    <reportingOwnerAddress>
        <rptOwnerStreet1>300 UNIVERSITY AVENUE</rptOwnerStreet1>
        <rptOwnerStreet2>SUITE 100</rptOwnerStreet2>
        <rptOwnerCity>SACRAMENTO</rptOwnerCity>
        <rptOwnerState>CA</rptOwnerState>
        <rptOwnerZipCode>95825</rptOwnerZipCode>
        <rptOwnerStateDescription></rptOwnerStateDescription>
    </reportingOwnerAddress>
    <reportingOwnerRelationship>
        <isDirector>1</isDirector>
        <isOfficer>0</isOfficer>
        <isTenPercentOwner>0</isTenPercentOwner>
        <isOther>0</isOther>
    </reportingOwnerRelationship>
</reportingOwner>

I'm currently pulling in the 3.7 million documents to get a full list of mappings (the data is 50% imported after 4 days from the SEC).

The API definition (WIP) is here: https://odie.app/models and the Swagger definition is here: https://api.odie.app/spec

Hope this helps

$\endgroup$
3
  • $\begingroup$ Could not access. NET::ERR_CERT_AUTHORITY_INVALID plus it's HSTS so I can't bypass it. $\endgroup$
    – Ben Creasy
    Dec 4 '19 at 8:04
  • $\begingroup$ Ben,apologies the url has changed to api.jodie.ai $\endgroup$ Jan 18 '20 at 8:02
  • $\begingroup$ Your site doesn't work, frozen and doesn't load $\endgroup$
    – Azmisov
    Aug 2 '21 at 18:55
0
$\begingroup$

You can try this endpoint:

https://sec.report/Ticker/XXXX

where XXXX is the ticker you are interested in.

i.e.

https://sec.report/Ticker/AAPL

or click here: https://sec.report/Ticker/AAPL

$\endgroup$
0
$\begingroup$

As noted on the SEC EDGAR data access website, the tickers.txt file has been phased out and is no longer updated as of 7/1/21.

As of 2021 onwards, the SEC provides the following methods for obtaining CIK, ticker, and exchanges:

  1. Ticker, CIK, EDGAR conformed company name associations: https://www.sec.gov/files/company_tickers.json
  2. EDGAR conformed company name, CIK, ticker, exchange associations: https://www.sec.gov/files/company_tickers_exchange.json
  3. Mutual fund CIK, series ID, class ID, ticker: https://www.sec.gov/files/company_tickers_mf.json

In order to ease the CIK mapping experience, I recently developed a Python package called sec-cik-mapper that provides a programmatic interface for obtaining these CIK mappings (install with pip install -U sec-cik-mapper). You can use it as follows once installed:

Stocks

    >>> from sec_cik_mapper import StockMapper
    >>> from pathlib import Path

    # Initialize a stock mapper instance
    >>> mapper = StockMapper()

    # Get mapping from CIK to tickers
    >>> mapper.cik_to_tickers
    {'0000320193': {'AAPL'}, '0000789019': {'MSFT'}, '0001652044': {'GOOG', 'GOOGL'}, ...}

    # Get mapping from ticker to CIK
    >>> mapper.ticker_to_cik
    {'AAPL': '0000320193', 'MSFT': '0000789019', 'GOOG': '0001652044', ...}

    # Get mapping from CIK to company name
    >>> mapper.cik_to_company_name
    {'0000320193': 'Apple Inc.', '0000789019': 'Microsoft Corp', '0001652044': 'Alphabet Inc.', ...}

    # Get mapping from ticker to company name
    >>> mapper.ticker_to_company_name
    {'AAPL': 'Apple Inc.', 'MSFT': 'Microsoft Corp', 'GOOG': 'Alphabet Inc.', ...}

    # Get mapping from ticker to exchange
    >>> mapper.ticker_to_exchange
    {'AAPL': 'Nasdaq', 'MSFT': 'Nasdaq', 'GOOG': 'Nasdaq', ...}

    # Get mapping from exchange to tickers
    >>> mapper.exchange_to_tickers
    {'Nasdaq': {'CYRN', 'OHPAW', 'SANW', ...}, 'NYSE': {'PLAG', 'TDW-WTB', 'RS', ...}, 'OTC': {'ZICX', 'LTGJ', 'AVNI', ...}, ...}

    # Get mapping from CIK to exchange
    >>> mapper.cik_to_exchange
    {'0000320193': 'Nasdaq', '0000789019': 'Nasdaq', '0001652044': 'Nasdaq', ...}

    # Get mapping from exchange to CIKs
    >>> mapper.exchange_to_ciks
    {'Nasdaq': {'0000779544', '0001508171', '0001060955', ...}, 'NYSE': {'0000764478', '0000008818', '0001725057', ...}, 'OTC': {'0001044676', '0001592411', '0001284452', ...}, ...}

    # Save CIK, ticker, exchange, and company name mappings to a CSV file
    >>> csv_path = Path("example_mappings.csv")
    >>> mapper.save_metadata_to_csv(csv_path)

    # Get raw pandas dataframe
    >>> mapper.raw_dataframe
                  CIK  Ticker                                  Name Exchange
    0      0000320193    AAPL                            Apple Inc.   Nasdaq
    1      0000789019    MSFT                        Microsoft Corp   Nasdaq
    2      0001652044    GOOG                         Alphabet Inc.   Nasdaq
    3      0001018724    AMZN                        Amazon Com Inc   Nasdaq
    4      0001318605    TSLA                           Tesla, Inc.   Nasdaq
    ...           ...     ...                                   ...      ...
    13184  0001866816   OLITU             Omnilit Acquisition Corp.   Nasdaq
    13185  0001870778   OHAAU               Opy Acquisition Corp. I   Nasdaq
    13186  0001873324   PEPLW    Pepperlime Health Acquisition Corp   Nasdaq
    13187  0001877557  WEL-UN  Integrated Wellness Acquisition Corp     NYSE
    13188  0001877787  ZGN-WT   Ermenegildo Zegna Holditalia S.P.A.     NYSE

    [13189 rows x 4 columns]

Mutual Funds

    >>> from sec_cik_mapper import MutualFundMapper
    >>> from pathlib import Path

    # Initialize a mutual fund mapper instance
    >>> mapper = MutualFundMapper()

    # Get mapping from CIK to tickers
    >>> mapper.cik_to_tickers
    {'0000002110': {'CRBYX', 'CEFZX', 'CSSRX', ...}, '0000002646': {'IIBPX', 'IPISX', 'IIBTX', ...}, '0000002663': {'IMSXX', 'VMTXX', 'IVMXX', ...}, ...}

    # Get mapping from ticker to CIK
    >>> mapper.ticker_to_cik
    {'LACAX': '0000002110', 'LIACX': '0000002110', 'ACRNX': '0000002110', ...}

    # Get mapping from CIK to series ID
    >>> mapper.cik_to_series_ids
    {'0000002110': {'S000009184', 'S000033622', 'S000009185', ...}, '0000002646': {'S000008760'}, '0000002663': {'S000008702'}, ...}

    # Get mapping from ticker to series ID
    >>> mapper.ticker_to_series_id
    {'LACAX': 'S000009184', 'LIACX': 'S000009184', 'ACRNX': 'S000009184', ...}

    # Get mapping from series ID to CIK
    >>> mapper.series_id_to_cik
    {'S000009184': '0000002110', 'S000009185': '0000002110', 'S000009186': '0000002110', ...}

    # Get mapping from series ID to tickers
    >>> mapper.series_id_to_tickers
    {'S000009184': {'CEARX', 'CRBYX', 'ACRNX', ...}, 'S000009185': {'ACINX', 'CACRX', 'CAIRX', ...}, 'S000009186': {'LAUCX', 'LAUAX', 'CUSAX', ...}, ...}

    # Get mapping from series ID to class IDs
    >>> mapper.series_id_to_class_ids
    {'S000009184': {'C000024956', 'C000122737', 'C000024957', ...}, 'S000009185': {'C000024958', 'C000122739', 'C000097733', ...}, 'S000009186': {'C000024962', 'C000024964', 'C000122740', ...}, ...}

    # Get mapping from ticker to class ID
    >>> mapper.ticker_to_class_id
    {'LACAX': 'C000024954', 'LIACX': 'C000024956', 'ACRNX': 'C000024957', ...}

    # Get mapping from CIK to class IDs
    >>> mapper.cik_to_class_ids
    {'0000002110': {'C000024958', 'C000024969', 'C000024957', ...}, '0000002646': {'C000023849', 'C000074893', 'C000028785', ...}, '0000002663': {'C000023718', 'C000028786', 'C000076529', ...}, ...}

    # Get mapping from class ID to CIK
    >>> mapper.class_id_to_cik
    {'C000024954': '0000002110', 'C000024956': '0000002110', 'C000024957': '0000002110', ...}

    # Get mapping from class ID to ticker
    >>> mapper.class_id_to_ticker
    {'C000024954': 'LACAX', 'C000024956': 'LIACX', 'C000024957': 'ACRNX', ...}

    # Save CIK, ticker, series ID, and class ID mappings to a CSV file
    >>> csv_path = Path("mutual_fund_mappings.csv")
    >>> mapper.save_metadata_to_csv(csv_path)

    # Get raw pandas dataframe
    >>> mapper.raw_dataframe
                  CIK Ticker   Series ID    Class ID
    0      0000002110  LACAX  S000009184  C000024954
    1      0000002110  LIACX  S000009184  C000024956
    2      0000002110  ACRNX  S000009184  C000024957
    3      0000002110  CEARX  S000009184  C000122735
    4      0000002110  CRBRX  S000009184  C000122736
    ...           ...    ...         ...         ...
    29237  0001860434   SIHY  S000072555  C000228888
    29238  0001860434   SIFI  S000072556  C000228889
    29239  0001860434   INNO  S000073580  C000230585
    29240  0001877493    BTF  S000074058  C000231452
    29241  0001877493    VBB  S000075054  C000233857

    [29242 rows x 4 columns]

```
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.