Guide
Market dataFundamentalsEvent contracts No key needed

SEC EDGAR API guide

Every US public company’s filings and financial statements are free from the SEC, as long as you request them politely.

Last verified · Also known as EDGAR API, SEC API, XBRL frames API, companyfacts

Quick answer

The SEC publishes free, keyless JSON APIs on data.sec.gov: submissions (every filing by company), companyfacts and companyconcept (XBRL financial data) and frames (one concept across all companies for a period). You must send a descriptive User-Agent with contact details and stay under 10 requests per second. AlgoGP already uses EDGAR for point-in-time filings and financials in backtests.

SEC EDGAR API at a glance

Pricing
Free, no key
Availability
Worldwide (declare a User-Agent; 10 requests/second)
Paper trading
Not applicable (data only)
Integration type
Public, no key
In AlgoGP
Design and backtest in AlgoGP, connect the exported code
Key
None; descriptive User-Agent required
Rate limit
10 requests/second
Ids
10-digit CIK (zero-padded)
In AlgoGP
Filings and financials replayed point-in-time

Company facts in one request

curl -s -A "MyResearch admin@example.com" https://data.sec.gov/api/xbrl/companyfacts/CIK0000320193.json | head -c 300
All XBRL facts for Apple (CIK 320193).

Each fact lists the filing (accn, filed date). Use the filed date, not the period end, when a strategy may see the number: that is how AlgoGP’s strategy_runtime.fundamentals replays them.

Build a SEC EDGAR strategy with AlgoGP

AlgoGP does not connect to SEC EDGAR natively yet. SEC EDGAR uses plain HTTPS with an API key, so it is a good candidate for a native adapter; it is not built in yet.

  1. 1

    Design and backtest in AlgoGP

    Describe the strategy to the copilot and backtest it on years of normalized history. The result does not depend on any vendor.

  2. 2

    Export the Python project

    Every project exports strategy.py, market_data.py, brokers.py and live.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format.

  3. 3

    Plug in SEC EDGAR

    Implement the four adapter methods (account, positions, submit_market_order and a candle fetcher) with SEC EDGAR’s SDK, or keep a built-in platform for paper trading and add SEC EDGAR when you go live.

Built-in data sources for the same markets: Alpha Vantage, Financial Modeling Prep, EODHD, Finnhub.

SEC EDGAR API: frequently asked questions

Does the SEC EDGAR API need a key?

No, but you must identify yourself in the User-Agent header.

Why am I getting 403 from data.sec.gov?

Usually a missing or generic User-Agent, or too many requests per second.

Design and backtest your SEC EDGAR strategy first

AlgoGP turns an idea into Python and tests it on years of history before you connect it to SEC EDGAR. The exported code keeps the broker behind four small adapter methods.

  • AI copilot writes and revises the rules
  • Backtests with realistic costs
  • Exported Python ready to wire to SEC EDGAR

Free plan, no card required.

SEC EDGAR alternatives

Frameworks that connect to SEC EDGAR

Independent guide. AlgoGP is not affiliated with SEC EDGAR. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.

Build a strategy