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

curl
# No key: allowlisted tickers, ten reads an hour per address
curl -s "https://api.distillmarkets.com/api/v1/anonymous/asof?ticker=KHC&date=2019-01-31"
 
# With a key: any covered ticker, annual or quarterly basis
curl -s "https://api.distillmarkets.com/api/v1/sec/fundamentals/KHC/as-of/2019-01-31" \
-H "X-Api-Key: $DISTILL_API_KEY"
python (requests)
import requests
 
BASE = "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

GET /api/v1/anonymous/asof?ticker=KHC&date=2019-01-31
{
"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"
}
]
}
Real response, captured Oct 4, 2026. Public no-key endpoint, trimmed to the first three of six values.
GET /api/v1/anonymous/asof?ticker=KHC&date=2019-07-01
{
"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"
}
]
}
Real response, captured Oct 4, 2026. Same ticker, later knowledge date, trimmed to the first three of six values.

Limits

Related