Is there any free API for programmatically grabbing SEC filing data, such as company financials or insider trading? It seems ironic that the EDGAR search gives you information in a nice tabular form, but there isn't any obvious way to get the raw data in those tables, or restrict by date, etc. For instance, here I can see recent insider trades for GE, but I have to click "Next 80" to see more. I'd like a REST API where I just submit a request to say something like "give me all form 4 filings for GE between dates X and Y". Does such a thing exist?
-
Update: (October 2017) Kimono Labs API no longer available <s>Kimono Labs released a free open API for current and recent SEC filings with financial statements and valuation, profitability, leverage and liquidity ratios. You can find it here: kimonolabs.com/sec/explorer </s>– ChadCommented Apr 27, 2015 at 20:29
-
UPDATE: this page no longer exists. <s>You can get use [SEC Filings API](sec-api.com ). They have a nice RESTful API which you can retrieve and filter SEC filings data. It covers all form types of all publicly listed companies and mutual funds.</s>– Jack RenerCommented Jul 3, 2020 at 19:42
-
You can also use SEC EDGAR Viewer. You get all SEC Filings in real-time. Analyze and download filing documents.– Damil4realCommented Jul 24, 2020 at 21:11
10 Answers
You should take a look at Rank and Filed, a relatively new (Feb 2014) site about EDGAR filings, with lots of data export options.
-
2+1 Appreciate the efforts put in by the selfless dev at rankandfiled, however,the site does not provide an API interface which the OP wants, it is a beautiful site for 'Humans'. Commented Jan 12, 2015 at 11:34
Dev.Last10K.com has a RESTful API for SEC filing data.
Disclaimer: I work for Last10K.com
I don't know if the SEC has datasets for what you are looking for, but here is a link to the SEC's open datasets home page:
https://www.sec.gov/open/datasets.shtml
Below is a link and contacts to a university research paper (2012) on insider trading. You may want to consider contacting the researchers on where they got their data and methodologies on using the data.
http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2192522
Abstract:
Hardly anything is known about how bond market participants react to insider stock trades. Our study attempts to fill this gap by analyzing the bond market reaction around insider transactions in U.S. firms during the period from 2002 to 2009. Our dataset covers 3,694 stock purchases and 9,033 stock sales by corporate insiders. In a first step we apply event study methodology in order to determine the cumulative abnormal bond price returns in a number of predetermined subperiods within an overall window from ten trading days before until twenty trading days after the publication date. We find that with few exemptions insider stock sales convey a negative signal to the bond market. Insider stock purchases, on the other hand, do not fundamentally influence corporate bond prices. In a second step we conduct a regression analysis in order to gain insight into the factors that influence the abnormal bond price returns. As explanatory variables we include the value of the insider trades, the firms’ leverage, their long-term debt ratings, as well as dummy variables for the insider’s position in the company, for trades related to an employee benefit plan, for the respective sector (financial vs. non-financial), and for the stock market phase in which the transactions take place. However, the overall evidence from the regression analysis is rather weak for both insider stock purchases and sales.
UPDATE: 10/6/2014
Here's a link to datasets (Excel spreadsheets) from a NYU professor whom has been keeping corporate finance data on major corporations in US, Canada, UK and Australia for 20 years.
http://pages.stern.nyu.edu/~adamodar/New_Home_Page/data.html
sec-api (https://sec-api.io) provides an API to search filings on SEC EDGAR by CIK, ticker, company name, form type and filings date.
Query API
give me all form 4 filings for GE between dates X and Y
The JSON query for your use case looks like this.
{
"query": {
"query_string": {
"query": "cik:40545 AND filedAt:{2016-01-01 TO 2016-12-31} AND formType:\"4\""
}
},
"from": "0",
"size": "10",
"sort": [
{
"filedAt": {
"order": "desc"
}
}
]
}
A POST
request to https://api.sec-api.io
results in
{
"total": 99,
"filings": [
{
"cik": "40545",
"ticker": "GE",
"companyName": "GENERAL ELECTRIC CO",
"formType": "4",
"filedAt": "2016-12-23",
"linkToTxt": "https://www.sec.gov/Archives/edgar/data/40545/0000899243-16-036296.txt",
"linkToHtml": "https://www.sec.gov/Archives/edgar/data/40545/0000899243-16-036296-index.htm",
"id": "4d84ac66de5d4b9b201b3285e20694a5"
},
{
"cik": "40545",
"ticker": "GE",
"companyName": "GENERAL ELECTRIC CO",
"formType": "4",
"filedAt": "2016-12-13",
"linkToTxt": "https://www.sec.gov/Archives/edgar/data/40545/0001231205-16-000215.txt",
"linkToHtml": "https://www.sec.gov/Archives/edgar/data/40545/0001231205-16-000215-index.htm",
"id": "25159aadc0246a635b9a7f50dbbba2e8"
},
// cut for brevity
]
You can use the API sandbox here to test queries without an API key.
Streaming API
If you're looking for a real-time stream of filings you can use the streaming API (see here). It's a socket.io/websocket server. You can use Python and any socket.io/websocket library to connect to the streaming server. Server-side (eg Node.js) and client-side (eg React, React Native, Angular, Vue) JavaScript works as well.
The API returns new filings in JSON format, eg:
{
companyName: 'WALT DISNEY CO/ (0001001039) (Issuer)',
cik: '0001001039',
ticker: 'DIS',
type: '4',
description: 'FORM 4',
linkToFilingDetails: 'https://www.sec.gov/Archives/edgar/data/1001039/000100103918000235/0001001039-18-000235-index.htm',
linkToHtmlAnnouncement: 'https://www.sec.gov/Archives/edgar/data/1001039/000100103918000235/xslF345X03/wf-form4_154544051056009.xml',
linkToXbrl: 'https://www.sec.gov/Archives/edgar/data/1001039/000100103918000235/wf-form4_154544051056009.xml',
announcedAt: '2018-12-21T20:02:07-05:00'
}
You can hook-up to the websocket channel, and ignore all filings where type doesn't equal '4'.
A Python example looks like this:
import socketio
sio = socketio.Client()
@sio.on('connect', namespace='/all-filings')
def on_connect():
print("Connected to https://socket.sec-api.io/all-filings")
@sio.on('filing', namespace='/all-filings')
def on_filings(filing):
print(filing)
sio.connect('https://socket.sec-api.io?apiKey=YOUR_API_KEY', namespaces=['/all-filings'])
sio.wait()
A free API key is available on sec-api.io
I developed the API a while ago to solve the same problem. Happy to extend the functionality to meet what you are looking for.
EDGAR has a FTP access:
You'll need the index file for ids, but then you can extract necessary information from raw files directly. Perhaps, you can ask parsers from the founder of http://rankandfiled.com/.
-
-
1@jlo-gmail It has HTTP protocol for retrieving this data. Commented Jun 16, 2017 at 10:51
Insider Monitor publishes various insider trading activities reports with data scraped from the sec: Insider trading
You can access SEC EDGAR filings (including Form 10-K, Form 13F, Form 4 and Form D), Fails to Deliver, Financial Statements, their FOIA log and Registered Brokers & Dealers via Enigma Public. They also have an open API that you are free to use with an account. It is free to sign up for an account and you can use their API to access all their data.
US Treasury has a Gitub repo that could help. Realize the is a very old post, but it came up on Google for a related issue.
https://github.com/US-Department-of-the-Treasury/insiderTrades
You can get all the form 4 related sec.gov data from edgarpulse.com, the site offers latest and unrestricted data using APIs. Check it out. This seems to be exactly what you are looking for. Checkout http://edgarpulse.com/api/overview.php
A relatively newer, and more official, API is the SEC's own EDGAR Application Programming Interfaces. The SEC's API can obtain submission information for submissions to EDGAR, company facts, etc.
There's no authentication required and it's free to use.
Per the SEC, the update times are, for the /submissions/ endpoints less than a second and for the /xbrl/ endpoints (company facts, etc), less than a minute