Point-in-time fundamentals API
Each fundamentals fact is stored as filed and keyed to its EDGAR accession, including values that a later filing restated. An as-of query for a past date returns only filings accepted by that date, at the values those filings reported, so a backtest cannot read a restated number or a later filing before it existed.
The source is XBRL in 10-K and 10-Q filings. The point-in-time corpus runs from 2009 onward for US domestic filers; delisted companies resolve, and foreign private issuers filing 20-F or 40-F are excluded. The as-of corpus is rebuilt from the SEC's quarterly XBRL datasets, so a new filing can take up to a quarter to appear in it; the latest-value endpoints update nightly.
The full version history of a fact (every filing that stated it) is served by the fact-versions endpoint, and facts whose value changed are listed by the revisions endpoint.
Fetch fundamentals as knowable on a past date
# No key: allowlisted tickers, ten reads an hour per addresscurl -s "https://api.distillmarkets.com/api/v1/anonymous/asof?ticker=KHC&date=2019-01-31"# With a key: any covered ticker, annual or quarterly basiscurl -s "https://api.distillmarkets.com/api/v1/sec/fundamentals/KHC/as-of/2019-01-31" \-H "X-Api-Key: $DISTILL_API_KEY"
import requestsBASE = "https://api.distillmarkets.com"for knowledge_date in ("2019-01-31", "2019-07-01"):r = requests.get(f"{BASE}/api/v1/anonymous/asof",params={"ticker": "KHC", "date": knowledge_date},timeout=30,)r.raise_for_status()snap = r.json()net_income = next(v for v in snap["values"] if v["conceptGroup"] == "NetIncome")print(knowledge_date, snap["periodEnd"], net_income["value"], net_income["accessionNumber"])
Sample response
{"ticker": "KHC","companyName": "Kraft Heinz Co","asOf": "2019-01-31","periodEnd": "2017-12-31","delistedAt": null,"values": [{"conceptGroup": "Revenue","value": 26232000000.0000,"filedAt": "2018-02-16","accessionNumber": "0001637459-18-000015"},{"conceptGroup": "NetIncome","value": 10999000000.0000,"filedAt": "2018-02-16","accessionNumber": "0001637459-18-000015"},{"conceptGroup": "OperatingCashFlow","value": 527000000.0000,"filedAt": "2018-02-16","accessionNumber": "0001637459-18-000015"}]}
{"ticker": "KHC","companyName": "Kraft Heinz Co","asOf": "2019-07-01","periodEnd": "2018-12-31","delistedAt": null,"values": [{"conceptGroup": "Revenue","value": 26268000000.0000,"filedAt": "2019-06-07","accessionNumber": "0001637459-19-000049"},{"conceptGroup": "NetIncome","value": -10192000000.0000,"filedAt": "2019-06-07","accessionNumber": "0001637459-19-000049"},{"conceptGroup": "OperatingCashFlow","value": 2574000000.0000,"filedAt": "2019-06-07","accessionNumber": "0001637459-19-000049"}]}
Limits
- Values are as reported in the filer's own currency and are never converted. They are not normalised across issuers beyond mapping XBRL tags to a canonical concept group.
- The no-key endpoint returns six concept groups for an allowlisted set of tickers. The keyed as-of endpoint covers the full universe; the free tier is capped at 10 calls a day, and Analyst and above are unlimited.
- Coverage ramps with the SEC XBRL phase-in: the as-of universe is thin before 2012. Pre-2009 filings are a separate text-parsed dataset on the Pro tier.
- An as-of answer is recomputed from the stored filings using the current concept mapping, so it is not guaranteed byte-identical over time. The methodology page states which changes bump the version.
Related
- As-of endpoint referenceParameters, scopes and the quarterly basis.
- Fact versionsEvery filing's statement of each fact (Analyst).
- MethodologyPoint-in-time and survivorship rules, formulas and limits.
- Restatements dataFigures companies revised after reporting them, dated.
- Restatements and revisions APIThe revisions endpoint and its change types.
- PricingFree key with no card; Analyst and Pro tiers add depth and history.
- Connect an agentClaude, ChatGPT, Cursor and Claude Code connect to the hosted MCP server; the same data is exposed as tools.
- MCP tool listThe keyed endpoints here are also MCP tools; the tool list names each one.