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 hands the SEC a full set of financials. For free. You can pull Apple's last decade before lunch.

Then you open the file and the morning is gone. The numbers are right there, wrapped in a format that fights back.

The SEC EDGAR API is how you stop fighting. It turns the filings behind EDGAR into JSON you can query by ticker. Here is what it is, what the official endpoints give you, where they hurt, and how to pull clean 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. The SEC runs free official endpoints on data.sec.gov for submissions and XBRL facts. Normalized services like Edgrapi sit on top and return income statements, balance sheets, cash flow, and ratios under one schema for any ticker, so you stop writing a parser per company.

What is the SEC EDGAR API?

The SEC EDGAR API is the programmatic way to read SEC filings. EDGAR is the SEC's filing system, and it is huge: more than 36 million documents from over 500,000 filers, with roughly 4,700 new filings landing every business day, per the SEC's About EDGAR page. The API hands you that data as JSON instead of pages you have to scrape.

Two things wear that name, and confusing them costs you a day.

One is the SEC's own API. Free. Official. Raw.

The other is a normalized API, a service that turns the raw filings into one consistent shape.

Edgrapi is the second kind. We built it because the raw version kept turning a quick data pull into a parsing project. The rest of this guide is really about why that keeps happening.

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 and its extracted XBRL facts. No key, no signup. You send a descriptive User-Agent header naming your app, per the SEC's developer rules.

So why pay for a wrapper?

Because raw has a bill that arrives later. The companyfacts endpoint returns every US-GAAP tag a company has ever filed, nested and unlabeled. Revenue might sit under Revenues, under RevenueFromContractWithCustomerExcludingAssessedTax, or under a tag that one filer made up, and it can change between filings.

And everything is keyed by CIK, the Central Index Key, not by ticker. So before you read one number, you map the ticker to a CIK and decode the XBRL. That mapping and decoding is the job a normalized API quietly does for you.

Why is SEC EDGAR data so hard to use?

XBRL is the hard part. EDGAR tags financials in XBRL, which is machine-readable and still painful, because the same line shows up under different tags across companies and across years. Reading "revenue" reliably means keeping a fallback list of candidate tags for every 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 corner case. XBRL has been mandatory long enough that the mess is baked into a decade of filings. The SEC allowed voluntary XBRL in 2005, mandated it in 2009 phased by company size, then moved to Inline XBRL from June 15, 2019 for large filers through June 15, 2021 for the rest, per the SEC's history of structured disclosure.

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.

So you can hold all the raw numbers and still not have clean data. A normalized SEC EDGAR API runs the tag-fallback once, in one place, and revenue becomes plain revenue for every ticker you touch.

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 scary in production.

One cold-cache burst of parallel requests can trip the limit and take down the service for everyone, not just the person who fired it. We learned that the nervous way and put an outbound rate gate in front of our SEC calls. The fix is dull and it works: cache the historical facts, since a closed fiscal year never changes, and pace the calls. A normalized API does that pacing for you, so you borrow a managed budget instead of guarding 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 credits / month, 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 part still feels a little like magic.

Ask an assistant wired to the API "what was NVIDIA's gross margin last year?" and it makes a tool call that returns the real figure from EDGAR, not a confident guess. Agents that do not speak MCP work the same way through plain function calls: hit the REST API, hand the model the JSON. For retrieval, 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 get the SEC EDGAR API is to call it once. Grab a free key, run the four-line snippet against a ticker you actually care about, and read what comes back.

If the fields are already named the way you would have named them, the normalization did its job. The free tier is 100 credits / month, no card, enough to test every endpoint and ship a prototype. Point it at https://api.edgrapi.com and pull your first 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 credits 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