QuantSet Docs Developer console

Guides & Comparisons · SEC Filings & XBRL

SEC EDGAR & XBRL API in Python: 10-K, 10-Q & CIK Lookup

Raw SEC EDGAR companyfacts.json archives force engineers to untangle thousands of drifting US-GAAP and IFRS XBRL taxonomy tags, subtract cumulative 6-month and 9-month Form 10-Q cash flows into discrete quarters, zero-pad 10-digit CIK numbers, and manage SEC fair-access rate headers. QuantSet exposes both normalized statements and raw XBRL company facts behind one fast JSON/CSV contract.

us:NVDA0001045810us:AAPL0000320193us:MSFT0000789019

Four traps when parsing raw SEC EDGAR XBRL files

  • Taxonomy concept drift: A single line item like revenue spans multiple XBRL concepts over a company's history (Revenues, RevenueFromContractWithCustomerExcludingAssessedTax, SalesRevenueNet). Naive parsers leave multi-year holes when an issuer adopts ASC 606 or switches tags.
  • Cumulative YTD Form 10-Q cash flows: On Form 10-Q, issuers frequently report Q2 and Q3 cash flow statements as 6-month and 9-month year-to-date totals rather than standalone 3-month quarters. Feeding raw YTD numbers into a trailing-twelve-month (TTM) screen inflates free cash flow by 2–3×.
  • Amendments & restatements (10-K/A, 10-Q/A): Raw fact arrays mix comparative prior-year footnotes with restated filings unless filtered carefully by frame, period duration, form type, and filing date.
  • CIK vs. ticker mapping: SEC EDGAR indexes issuers by 10-digit zero-padded Central Index Key (0001045810), not exchange ticker (NVDA), and reuses or changes tickers after mergers.

1. Instant Ticker ↔ SEC CIK lookup

Resolve any ticker or company name to its canonical instrument_id, 10-digit SEC cik, 4-digit sic industry code, and canonical sector in one call:

curl "https://api.quantset.dev/api/v1/instruments?q=NVDA" -H "X-API-Key: mw_demo"

2. Normalized Form 10-K & 10-Q statements (with filing provenance)

Query income, balance_sheet, or cash_flow across up to 100 companies at once. Every row preserves its SEC accession number, form type (10-K / 10-Q), and available_at date so point-in-time backtests never peek ahead of the actual EDGAR filing date:

curl "https://api.quantset.dev/api/v1/financial-statements/cash_flow?tickers=us:NVDA&period=quarterly&limit_per_instrument=4" -H "X-API-Key: mw_demo"

Discrete quarters, not unlabelled YTD sums: QuantSet reconciles cumulative Form 10-Q periods into discrete quarterly figures and labels provenance explicitly—returning null whenever a line item cannot be verified cleanly.

3. Tag-level SEC XBRL Company Facts (by CIK or ticker)

When an audit or specialized industry model needs exact as-reported XBRL concepts (such as RemainingPerformanceObligation or custom footnotes), query /api/v1/sec/company-facts using exactly one of ticker=NVDA or issuer_cik=0001045810:

curl "https://api.quantset.dev/api/v1/sec/company-facts?issuer_cik=0001045810&limit=5" -H "X-API-Key: mw_demo"

4. Revenue segments, debt maturities, headcount & executive pay

Beyond the three core statements, QuantSet extracts structured footnote tables from 10-K filings—including geographic/product revenue segments, debt maturity schedules, employee headcount history, and proxy executive compensation:

curl "https://api.quantset.dev/api/v1/segments?ticker=NVDA&limit=6" -H "X-API-Key: mw_demo"
curl "https://api.quantset.dev/api/v1/employees?ticker=AAPL&limit=5" -H "X-API-Key: mw_demo"

← All guides13F, Form 4 & Share Float API →