Skip to content

About

SEC EDGAR API examples and guides: 10-K sections as Markdown for LLMs, financial statements, Form 4 insider trades and 13F holdings by ticker. No API key.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

SEC EDGAR API: examples and guides

Get what is inside SEC filings as clean data: the Risk Factors of a 10-K as Markdown, financial statements as tidy numbers, insider trades as rows, a fund's 13F portfolio. By ticker, with no API key.

This repository contains runnable examples and how-to guides for the SEC EDGAR API on Apify, made by CodePulse. The examples call that hosted Actor, so you need a free Apify account and API token. The code here is MIT licensed; the Actor is a paid, hosted service. From $0.0004 per filing listed, $0.005 per company's financials, $0.002 per insider filing, $0.01 per 10-K converted to Markdown or per 13F.

Try it free: Apify's free plan includes $5 of monthly credit, so you can run the Actor on real data before paying anything. Start here.

Read the guides as a website: codepulsehq.github.io/sec-edgar-api

Quick start

export APIFY_TOKEN=...   # free Apify account: Console > Settings > API & Integrations

curl -sS -X POST \
  "https://api.apify.com/v2/acts/codepulsehq~sec-edgar-api/run-sync-get-dataset-items?token=${APIFY_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"companies": ["AAPL"], "dataType": "filing_text", "sections": ["1A"], "maxCharsPerSection": 20000}'

Guides

Question Guide
How to get the Risk Factors section of a 10-K as clean text for an LLM docs/get-10k-risk-factors-as-text.md
How to get SEC financial statements as structured data docs/sec-financial-statements-api.md
How to track insider trading (SEC Form 4) programmatically docs/track-insider-trading-form-4.md
How to get a fund's 13F holdings through an API docs/get-13f-holdings-api.md

Examples

File What it does
examples/curl/quickstart.sh One request, results back
examples/python/quickstart.py The same with the Apify Python client, with a spend cap

Frequently asked questions

Do I need an SEC API key? No. EDGAR is free and open. The Actor identifies itself properly and stays under the SEC's fair-access limit for you.

Is the data official? Yes, it is read from the SEC's own systems. This project is not affiliated with or endorsed by the SEC, and nothing here is investment advice.

What does it cost? $0.0004 per filing listed, $0.005 per company's financials, $0.002 per insider filing, $0.01 per filing converted to text or per 13F. Errors are free.

Which filings can it convert to text? 10-K, 10-Q and 8-K are split into their Items (for example 1A Risk Factors, 7 MD&A, 2.02 earnings). Other forms come back as full text.

More from CodePulse

Feedback

Found a problem or want an example added? Open an issue here, or use the Issues tab on the Actor's Apify page.

About

SEC EDGAR API examples and guides: 10-K sections as Markdown for LLMs, financial statements, Form 4 insider trades and 13F holdings by ticker. No API key.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages