SEC EDGAR XBRL company facts
A company's XBRL financial data. Without concept: every reported concept (us-gaap, ifrs-full, dei, srt) with label, description and per unit the number of data points, latest value and latest annual (10-K) value; q narrows by name. With concept: that concept's full history per unit (period start/end, value, fiscal year and period, form, filing date, frame, accession number), optionally only from one form, fiscal year (fiscal_year) or fiscal period (fiscal_period), or just the latest value per unit with latest=true.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
ticker | string | Stock ticker, e.g. AAPL (or pass cik). Example: AAPL |
cik | string | SEC Central Index Key, e.g. 320193. |
concept | string | XBRL concept for its full history, e.g. Revenues, NetIncomeLoss, Assets, EarningsPerShareDiluted. |
taxonomy | string | us-gaap (default), ifrs-full, dei or srt. |
form | string | With concept: only values from this form, e.g. 10-K. |
fiscal_year | integer | With concept: only values reported for this fiscal year (the filing's fiscal year), e.g. 2024. |
fiscal_period | FY | Q1 | Q2 | Q3 | Q4 | H1 | H2 | With concept: only values for this fiscal period: FY, Q1, Q2, Q3, Q4, H1 or H2. |
latest | boolean | With concept: return only the most recent value per unit (after the other filters). |
q | string | Without concept: only concepts whose name or label contains this text, e.g. revenue. |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/sec-edgar/v1/company-facts?ticker=AAPL" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/sec-edgar/v1/company-facts",
params={"ticker": "AAPL"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/sec-edgar/v1/company-facts");
url.searchParams.set("ticker", "AAPL");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).