SECEdgar Crawler

Rahul Ranjan
2 min readOct 2, 2014

A lightweigth crawler for downloading the filings from SEC.gov

Few days ago I was trying to get download filings from SEC.gov for my research work but there are more than 200k of 10-K filings itself and so mannual download was impossible task.

In the United States firms report relevant business information to the Securities and Ex- change Commission (SEC). The filings paper is meant to serve as a primer for economists in the computing details of searching for information on the Internet. One important goal of the paper is to show how simple open-source computer scripts can be generated to access financial data on firms that interact with regulators in the United States.

Then I started looking for crawler which would help me to solve the problem but I couldn’t find any good crawler, even though most of the investment researcher’s needs filings. So help those people and ofcouse myself, I thought of making my own crawler.

I will walk through the following routine tasks with the SECEdgar Crawler(a) Installation and providing the inputs to the SECEdgar (b) downloading the filings (c) Storing the filings.

You can install the package using pip

 $ pip install SECEdgar

or you can clone the project or download it as zip and then execute following commands.

 $ git clone https://github.com/rahulrrixe/SEC-Edgar.git
$ cd SEC-Edgar
$ python setup.py install

After installation life is very simple. Now you can get companies information in this format.

Quote CIK priorto(YYYYMMDD) Count                                AAPL 0000320193 20010101 10                                        ACN 00001467373 20051010 20

where

 'AAPL'       # company code for apple 
'0000320193' # cik code for apple
'20010101' # date from which filings should be downloaded
'10' # no of filings to be downloaded

Also this example snipped can be used to download several filings at a time.

https://gist.github.com/rahulrrixe/8a4328244434f774d3fb.js

This snippet will download the 10-K, 10-Q, 8-K and 13-F filings for the apple and the download file will be stored in the same directory with folder name “SEC-Edgar-data”.

Now enjoy downloading all companies periodic reports, and other forms electronically through SECEdgar like a BOSS. SEC.gov states that anyone can access and download this information for free.

Thanks ☺

--

--