Blog · 2026-06-28

SEC EDGAR API: the complete guide to clean financial data (2026)

The SEC EDGAR API turns raw XBRL filings into clean, normalized JSON company financials
EDGAR has every public company's numbers. Getting them out as usable data is the hard part.

Every US public company files its financials with SEC EDGAR. The data is free, complete, and almost unusable in raw form.

The SEC EDGAR API is how you fix that. It turns the filings sitting behind EDGAR into JSON you can actually query by ticker. Here is what it is, what the official endpoints do, where they fall short, and how to pull clean company financials in one call.

The SEC EDGAR API is a set of REST endpoints that return SEC filing data as JSON instead of HTML or XBRL documents. The SEC runs free official APIs on data.sec.gov for raw submissions and XBRL facts. Normalized services like Edgrapi sit on top and return income statements, balance sheets, cash flow, and ratios under one consistent schema for any ticker, so you stop writing per-company parsing code.

What is the SEC EDGAR API?

The SEC EDGAR API is the programmatic way to read SEC filings. EDGAR itself is the SEC's filing system: it holds more than 36 million documents from over 500,000 filers and takes in roughly 4,700 new filings every business day, according to the SEC's About EDGAR page. The API is how you get that data as JSON instead of scraping web pages.

There are two layers worth separating in your head.

The first is the SEC's own API. It is free, official, and raw. The second is a normalized API, which is a third-party service that cleans the raw data into a consistent shape. Both are "the SEC EDGAR API" in casual conversation, but they solve very different problems.

Edgrapi is the second kind. It reads EDGAR's underlying data, normalizes it, and hands you back clean financials for any of 10,400+ US public companies. The rest of this guide explains why that normalization step matters so much.

Is there an official SEC EDGAR API, and is it free?

Yes, and yes. The SEC publishes free REST APIs on data.sec.gov that return JSON for two things: a company's filing history (submissions) and its extracted XBRL financial facts (companyfacts). There is no API key and no signup. You only have to send a descriptive User-Agent header identifying your app, per the SEC's developer access rules.

So why does anyone pay for a wrapper?

Because "free and raw" has a cost that shows up later. The companyfacts endpoint returns every US-GAAP tag a company has ever reported, nested and unlabeled in plain-English terms. Revenue might live under Revenues, RevenueFromContractWithCustomerExcludingAssessedTax, or a company-specific tag, and it can switch between filings.

The official endpoints index everything by CIK, the Central Index Key that uniquely identifies a filer. Tickers are not first-class. So before you read a single number, you resolve the ticker to a CIK, then decode the XBRL. That is the work a normalized API does for you.

Why is SEC EDGAR data so hard to use?

The hard part is XBRL. EDGAR's financial data is tagged in XBRL, a machine-readable format that is technically complete and practically painful: the same line item appears under different tags across companies and across years, so reading "revenue" reliably means handling a fallback list of candidate tags per metric.

Diagram showing raw XBRL tags mapping down to a single normalized revenue field in clean JSON
The normalization job: many candidate XBRL tags collapse to one consistent field.

This is not a small edge case. XBRL has been mandatory for years, so the tag sprawl is baked into a decade-plus of filings. The SEC first allowed voluntary XBRL in 2005 and mandated it in 2009, phased in by company size. It then moved to Inline XBRL, phased in from June 15, 2019 for large accelerated filers through June 15, 2021 for everyone else.

Timeline of SEC XBRL adoption: voluntary in 2005, mandated in 2009, Inline XBRL phased from 2019 to 2021
Seventeen years of XBRL rulemaking, and the tag inconsistency is still yours to handle.

The result: you can have the raw numbers and still not have clean data. A normalized SEC EDGAR API does the tag-fallback work once, centrally, so revenue is just revenue for every company you query.

How do you get company financials by ticker?

You call one endpoint with the ticker in the path and your API key in the header. With Edgrapi the base URL is https://api.edgrapi.com, and the financials live at /v1/fundamentals/{ticker}. No CIK lookup, no XBRL decoding. The response is a single JSON object with the income statement, balance sheet, and cash flow, every field named consistently across all 10,400+ covered companies.

Here is the whole thing in Python:

import requests

r = requests.get(
    "https://api.edgrapi.com/v1/fundamentals/AAPL",
    headers={"Authorization": "Bearer edgr_your_key"},
    params={"period": "annual"},
)
data = r.json()
print(data["revenue"], data["net_income"])

That is the entire integration. Swap AAPL for any ticker, add period=quarterly for quarterly data, and loop your universe to build a dataset.

The five Edgrapi endpoints: company, fundamentals, ratios, filings, and sections
Five endpoints cover profile, statements, ratios, filing history, and section text.

The same key works across five endpoints. /v1/company/{ticker} returns the profile and resolves the CIK. /v1/ratios/{ticker} returns margins, ROE, ROA, debt-to-equity, and growth, pre-computed. /v1/filings/{ticker} lists the 10-K, 10-Q, and 8-K history with links back to SEC.gov. /v1/sections/{ticker} pulls 10-K text like Item 1A (Risk Factors) and Item 7 (MD&A), which is what you want for a retrieval pipeline.

Request flow from your app through the Edgrapi API with a rate gate to SEC EDGAR and back as normalized JSON
Your app talks to one clean endpoint; the API handles EDGAR, XBRL, and pacing.

What does the SEC EDGAR API return for each company?

You get the three core financial statements plus derived metrics, all keyed to reporting periods. A fundamentals call returns income-statement lines (revenue, gross profit, operating income, net income), balance-sheet lines (assets, liabilities, equity, cash, debt), and cash-flow lines (operating, investing, financing, and free cash flow). Each value carries its fiscal period and currency, so you can line up annual or quarterly history without guessing what a number refers to.

The shape is the point. Because the fields are normalized, Apple and a tiny micro-cap come back with the same keys, so you can diff two companies without a mapping table or drop the whole object straight into a dataframe. The ratios endpoint goes one step further and returns margins, ROE, ROA, debt-to-equity, and growth already calculated, so you are not re-deriving them from raw lines on every request.

What are the SEC EDGAR API rate limits?

The SEC caps everyone at 10 requests per second. That limit applies to each user across all machines and IP addresses, and going over it gets your IP blocked until your request rate stays below the threshold for a full 10 minutes, per the SEC's fair-access guidance. For a multi-user app, that ceiling arrives faster than you expect.

This is the quiet reason scraping EDGAR yourself gets risky in production. A cold-cache burst of concurrent requests can trip the limit and take down your whole service, not just the user who triggered it. We ran into this risk building Edgrapi and added an outbound rate gate specifically to bound it. The fix itself is boring and effective: cache immutable historical facts, since a closed fiscal year never changes, and pace your outbound calls. A normalized API does that gating for you, so you inherit a managed request budget instead of babysitting one.

SEC EDGAR API vs sec-api.io vs raw EDGAR: which should you use?

Pick by what you actually need: free raw access, exotic form coverage, or clean financials. The SEC's own API wins on price and is the source of truth. sec-api.io wins on breadth of form types and full-text search. A normalized API like Edgrapi wins when you want consistent fundamentals, ratios, and section text without building a parsing layer. None is "best" in the abstract.

Here is the honest comparison:

Raw SEC API (data.sec.gov)sec-api.ioEdgrapi
PriceFreeFrom $49/mo (annual)Free tier, then paid
Free tierUnlimited (10 req/s)100 calls lifetime100 requests, no card
OutputRaw XBRLJSON, filing-centricNormalized JSON financials
NormalizationNonePartialFull (one schema per metric)
RatiosNoLimitedYes, pre-computed
10-K section textNoYesYes
MCP server for AINoNoYes

sec-api.io's pricing is public: a Personal plan at $49/month billed annually ($55 month-to-month) and a Business plan at $199/month, with a free tier of 100 lifetime calls, per sec-api.io's pricing page. If your project lives on full-text search across every form type, that breadth is worth paying for.

If your project is fundamentals, ratios, and feeding filings to a model, you want normalization and an MCP server, not form breadth.

Comparison of raw SEC API, sec-api.io, and Edgrapi across price, normalization, and AI support
Three paths to EDGAR data, scored on what developers actually optimize for.

How do AI agents use the SEC EDGAR API?

Through MCP, the Model Context Protocol. Edgrapi runs a hosted MCP server at https://api.edgrapi.com/mcp that exposes tools, get_fundamentals, get_ratios, get_company, and get_filings, so an AI client can pull real SEC numbers mid-conversation instead of guessing them. You point an MCP-capable client at the URL, authenticate with your key, and the tools register automatically.

This is the part that is genuinely new.

An assistant wired to the API answers "what was NVIDIA's gross margin last year?" with a tool call that returns the actual figure, sourced from EDGAR, rather than a plausible-sounding hallucination. The same endpoints work for function-calling agents that are not MCP-aware: call the REST API, hand the JSON to the model, done. For retrieval pipelines, the section endpoint gives you 10-K risk-factor and MD&A text as clean chunks to embed.

Start with one call

The fastest way to understand the SEC EDGAR API is to call it. Grab a free key, run the four-line Python snippet above against a ticker you care about, and look at the JSON that comes back. If the fields are already named the way you would name them, that is the normalization doing its job.

Edgrapi's free tier is 100 requests with no credit card, which is enough to test every endpoint and ship a working prototype. Point it at https://api.edgrapi.com, pass your key, and pull your first clean financial statement.

Frequently asked questions

Is there an official SEC EDGAR API?

Yes. The SEC publishes free REST APIs on data.sec.gov that return JSON for company submissions and extracted XBRL financial facts. They need no API key, only a declared User-Agent header. What they do not give you is normalization, so every company's numbers come back under raw US-GAAP tags and you still write parsing code per filer. That is the gap third-party APIs like Edgrapi fill.

Is the SEC EDGAR API free?

The SEC's own data.sec.gov endpoints are free with no key, capped at 10 requests per second under the fair-access policy. The catch is the raw XBRL format. Normalized wrappers add a clean schema, ratios, and filing-section text on top; Edgrapi's free tier gives 100 requests with no credit card, then paid plans scale request volume.

How do I get a company's financial statements from EDGAR by ticker?

The SEC indexes filings by CIK, not ticker, so the first step is resolving the ticker to its CIK. With Edgrapi you skip that. Call GET /v1/fundamentals/AAPL with your API key and you get the income statement, balance sheet, and cash flow back as one normalized JSON object, every field named the same way across all 10,400+ covered companies.

What is the rate limit on the SEC EDGAR API?

The SEC limits every user to 10 requests per second across all machines and IP addresses. Exceed it and the SEC may block your IP until your request rate stays under the threshold for 10 minutes. Production apps should cache immutable historical facts and pace outbound calls rather than bursting against SEC.gov directly.

What is the difference between the SEC EDGAR API and sec-api.io?

The SEC's API is the free, raw source. sec-api.io is a paid wrapper strong on exotic form types and full-text search, starting at $49/month. Edgrapi focuses on clean, normalized fundamentals, ratios, and 10-K section text with a no-card free tier and a built-in MCP server for AI agents. Pick by whether you need breadth of forms or clean financials.

Can I use the SEC EDGAR API with AI agents and LLMs?

Yes. Edgrapi exposes a hosted MCP server at api.edgrapi.com/mcp with tools (get_fundamentals, get_ratios, get_company, get_filings), so MCP clients like Claude and Cursor pull real SEC numbers instead of hallucinating them. You can also call the REST endpoints from any function-calling agent and feed the JSON straight into the model.

Get a free API key