Advertisement
bitcoincat

SEC EDGAR API

Aug 11th, 2017
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. Securities and Exchange Commission (SEC) EDGAR database. EDGAR contains regulatory filings from publicly-traded US corporations including their annual and quarterly reports:
  2.  
  3. All companies, foreign and domestic, are required to file registration statements, periodic reports, and other forms electronically through EDGAR. Anyone can access and download this information for free. [from the SEC website]
  4. Human Interface
  5.  
  6. See http://www.sec.gov/edgar/searchedgar/companysearch.html
  7.  
  8.  
  9.  
  10. Bulk Data
  11.  
  12. EDGAR provides bulk access via FTP: ftp://ftp.sec.gov/ - official documentation. We summarize here the main points.
  13.  
  14. Each company in EDGAR gets an identifier known as the CIK which is a 10 digit number. You can find the CIK by searching EDGAR using a name of stock market ticker.
  15.  
  16. For example, searching for IBM by ticker shows us that the the CIK is 0000051143.
  17.  
  18. Note that leading zeroes are often omitted (e.g. in the ftp access) so this would become 51143.
  19.  
  20.  
  21.  
  22. Next each submission receives an 'Accession Number' (acc-no). For example, IBM's quarterly financial filing (form 10-Q) in October 2013 had accession number: 0000051143-13-000007.
  23.  
  24. FTP File Paths
  25.  
  26. Given a company with CIK (company ID) XXX (omitting leading zeroes) and document accession number YYY (acc-no on search results) the path would be:
  27.  
  28. File paths are of the form:
  29.  
  30. /edgar/data/XXX/YYY.txt
  31. For example, for the IBM data above it would be:
  32.  
  33. ftp://ftp.sec.gov/edgar/data/51143/0000051143-13-000007.txt
  34.  
  35. Note, if you are looking for a nice HTML version you can find it at in the Archives section with a similar URL (just add -index.html):
  36.  
  37. http://www.sec.gov/Archives/edgar/data/51143/000005114313000007/0000051143-13-000007-index.htm
  38.  
  39. Indices
  40.  
  41. If you want to get a list of all filings you'll want to grab an Index. As the help page explains:
  42.  
  43. The EDGAR indices are a helpful resource for FTP retrieval, listing the following information for each filing: Company Name, Form Type, CIK, Date Filed, and File Name (including folder path).
  44.  
  45. Four types of indexes are available:
  46.  
  47. company — sorted by company name
  48. form — sorted by form type
  49. master — sorted by CIK number
  50. XBRL — list of submissions containing XBRL financial files, sorted by CIK number; these include Voluntary Filer Program submissions
  51. URLs are like:
  52.  
  53. ftp://ftp.sec.gov/edgar/full-index/2008/QTR4/master.gz
  54.  
  55. That is, they have the following general form:
  56.  
  57. ftp://ftp.sec.gov/edgar/full-index/{YYYY}/QTR{1-4}/{index-name}.[gz|zip]
  58. So for XBRL in the 3rd quarter of 2010 we'd do:
  59.  
  60. ftp://ftp.sec.gov/edgar/full-index/2010/QTR3/xbrl.gz
  61.  
  62. CIK lists and lookup
  63.  
  64. There's a full list of all companies along with their CIK code here: http://www.sec.gov/edgar/NYU/cik.coleft.c
  65.  
  66. If you want to look up a CIK or company by its ticker you can do the following query against the normal search system:
  67.  
  68. http://www.sec.gov/cgi-bin/browse-edgar?CIK=ibm&Find=Search&owner=exclude&action=getcompany&output=atom
  69.  
  70. Then parse the atom to grab the CIK. (If you prefer HTML output just omit output=atom).
  71.  
  72. There is also a full-text company name to CIK lookup here:
  73.  
  74. http://www.sec.gov/edgar/searchedgar/cik.htmL
  75.  
  76. (Note this does a POST to a 'text' API at http://www.sec.gov/cgi-bin/cik.pl.c)
  77.  
  78. Parsing XBRL Data
  79.  
  80. See scripts and README file there.
  81.  
  82. References
  83.  
  84. CorpWatch have an excellent API and DB dump covering a lot of EDGAR info - see the CorpWatch DataHub Entry
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement