23
$\begingroup$

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

$\endgroup$
16
$\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$
  • 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
  • $\begingroup$ @Jean CIK-Ticker mapping by RandAndFiled: rankandfiled.com/#/data/tickers $\endgroup$ – Anton Tarasenko 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$ – Anton Tarasenko Jun 15 '17 at 6:37
7
$\begingroup$

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

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

$\endgroup$
  • $\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
5
$\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$
5
$\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$
  • $\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$ – RobotHumans Mar 25 '17 at 12:50
4
$\begingroup$

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

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

$\endgroup$
  • $\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$ – Pedro Lobito 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$
  • $\begingroup$ That link is already in a previous answer. $\endgroup$ – chrisaycock 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$ – John Zabroski Nov 7 '17 at 21:55
0
$\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$

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.