Central Index Key (CIK) of all traded stocks

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

  • 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.

    How about a CIK - Ticker mapping ?

    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.

    @Jean CIK-Ticker mapping by RandAndFiled: http://rankandfiled.com/#/data/tickers

    @AntonTarasenko do you know the source of this info? Is it static? How do they compile this?

    @eggie5 I don't know. I made my own ticker-CIK dataset after all. Based on the up-to-date SEC ticker data.

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

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

    While useful, this seems to be a subset of the CIK's listed in this answer.

  • 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.

  • 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.

    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:])`

    This can also be scraped directly from the SEC Edgar site as shown here.

    This doesn't work for a lot of tickers. Try LEXG, JAMN for example...

    @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.

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

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

    Interesting, thanks for doing this and sharing! Can you describe your methodology? How can someone else replicate or verify your work?

    I've taken the liberty to parse your list and produce a pipe delimited file, here's the gist https://gist.github.com/x011/b6d22c462a2e4ab8d6c1f1eab42a0a83, tks!

  • 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

    That link is already in a previous answer.

    do you know where the documentation for this page/resource is?

    This no longer works as of about 3 months ago

  • 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...
    ]
    

    This is (almost) perfect. One defect that I found is searching with exchange does not return all (present and past) companies: https://mapping-api.herokuapp.com/cik/1288776 returns google https://mapping-api.herokuapp.com/exchange/NASDAQ does not list google

  • 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

  • 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

    Your first answer was already listed by nightcrawler500.

    The JSON is great. Somehow orcl 1341439 has a duplicate entry.

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM

Tags used