Bonjour! Today I present you my work on how to get the official CIK mapping and all submissions made by a company as well as its own little description!
If you click here – https://github.com/Heuristic-Analyst/… – you will find some files I wrote which can do the things I just described.
For clarification reasons:
- CIK mapping: Every company in the US can be found on the SEC website. They use a database which is publicly available for API queries, called “EDGAR”. Every company got an index, the Central Index Key (CIK). The gathered mapping enables us to get company data by the name of the company or the ticker (because its mapped to one another, hence CIK mapping)
- Submissions: Every company must file now and then some forms, like the 10-K (annually report – forpublicly traded companies), 10-Q, etc… These filings are all indexed in the SEC’s database. With the CIK number of a company we can find all submissions ever made – with form name, filing date, reporting date, some database related numbers and more.
The API endpoints we are gathering data from are the following:
- CIK mapping: https://www.sec.gov/files/company_tickers.json
- Lets say we found Apple Inc.’s CIK number – 0000320193:
- Submissions and description: https://data.sec.gov/api/xbrl/companyfacts/CIK0000320193.json
Important to note is that I have read somewhere that the CIK number can change over time, and obviously the name of the company too!
In the github you can change the ticker and title arrays in the params object to get gather the data (make sure they are included in the CikData.csv):
let params = {
...
"ticker": ["F", "AAPL"],
"title": ["Tesla, Inc.", "TAIWAN SEMICONDUCTOR MANUFACTURING CO LTD", "DANAHER CORP /DE/"]
}
};
The code is commented, if questions come up just write me an email, cheers!