How to get a company's 10-K from an API
Read the company's filing list from data.sec.gov/submissions/CIK##########.json, take the first row whose form is "10-K", and build the link from the CIK, the accession number without dashes and the primary document name. That gives you the annual report itself; the numbers inside are in the companyfacts XBRL API. Our Company Filings Brief returns the latest 10-K figures and 10-K links together for $0.01.
Try it free US Company Filings Brief API — SEC EDGAR in one call · $0.01 / call
Find the latest 10-K with curl
The recent filings come as parallel arrays: form[0], filingDate[0] and accessionNumber[0] all describe the same filing. jq zips them for you.
curl -s -H "User-Agent: Jane Doe Research jane@example.com" \
https://data.sec.gov/submissions/CIK0001318605.json \
| jq -r '.filings.recent as $f | [range(0; $f.form | length)]
| map(select($f.form[.] == "10-K")) | first
| "\($f.filingDate[.]) \($f.accessionNumber[.]) \($f.primaryDocument[.])"'
Build the links
- Document: https://www.sec.gov/Archives/edgar/data/<CIK without zeros>/<accession without dashes>/<primaryDocument>
- Filing folder (all exhibits): the same address without the document name.
- The main document is usually an inline XBRL HTML file, so it opens in a browser and also carries tagged numbers.
Things that trip people up
- 10-K/A is an amendment. It can be a full restated report or a few pages such as Part III, so don't treat every 10-K/A as the new annual report.
- Fiscal years don't follow the calendar. A company with a September year end files its 10-K in the autumn.
- Foreign private issuers file 20-F or 40-F instead of a 10-K, so some listed companies never have one.
- A company that listed recently may not have filed a 10-K yet.
Ask for 10-Ks only
With forms set to 10-K, the brief's filing list holds only annual reports with their links, next to the profile and the latest yearly figures (revenue, operating income, net income, diluted EPS, assets, liabilities, equity, cash).
curl -i -X POST https://iamai.markets/api/x402/services/qCrViyDqGrUg \
-H "Content-Type: application/json" \
-d '{"company": "TSLA", "limit": 5, "forms": ["10-K"]}'
# HTTP 402 with the price ($0.01). curl can't pay it; an x402 v2 client
# pays in USDC on Base and repeats the request.
Other ways to get 10-Ks
| Option | Good for | Trade-off |
|---|---|---|
| SEC submissions API | Free links to every 10-K | You parse arrays and build URLs |
| sec-edgar-downloader (pip) | Saving many 10-K files to disk | Documents only, no figures |
| Commercial APIs (e.g. sec-api.io) | Extracting sections like Risk Factors | Monthly plans and an API key |
| Company Filings Brief (iamai.markets) | Latest 10-K figures plus links in one JSON | No section text or full-text search |
The product
Questions
Can the API give me the Risk Factors section as text?
The SEC APIs give you the document, not separate sections; you'd parse the HTML yourself or use a commercial API. Our brief doesn't extract sections either.
How far back do 10-Ks go?
EDGAR has electronic filings back to the 1990s for most companies. Older ones are listed in the extra files under filings.files in the submissions JSON.
Is a 10-K the same as an annual report to shareholders?
Not exactly. The 10-K is the formal SEC filing; many companies also publish a glossier annual report that wraps it.
Related
Updated 2026-12-01
