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.
-
3
-
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$ – 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
This website has what you're looking for in downloadable csv/Excel format:
-
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
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.
-
$\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 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
My hard-fought results (14,452 CIKs and their tickers):
-
$\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
Edit: this no longer works.
The following is a list of every CIK at the SEC:
-
$\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
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...
]
-
$\begingroup$ This is (almost) perfect. One defect that I found is searching with exchange does not return all (present and past) companies: mapping-api.herokuapp.com/cik/1288776 returns google mapping-api.herokuapp.com/exchange/NASDAQ does not list google $\endgroup$ – Ali Khosro Apr 22 '20 at 3:50
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
-
$\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$ – Justin Davies Jan 18 '20 at 8:02
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
-
$\begingroup$ Your first answer was already listed by nightcrawler500. $\endgroup$ – chrisaycock Jul 2 '20 at 17:16
-
$\begingroup$ The JSON is great. Somehow orcl 1341439 has a duplicate entry. $\endgroup$ – Kenji Noguchi Sep 7 '20 at 1:40