Financial statements
Income statement, balance sheet or cash flow statement, annual, quarterly or trailing twelve months: one row per period (newest first) with every line item Yahoo Finance shows (total revenue, cost of revenue, gross profit, operating expenses, EBIT, EBITDA, net income, EPS, shares; assets, liabilities, equity, debt, cash; operating, investing and financing cash flow, capital expenditure, free cash flow, buybacks, dividends paid, ...). statement=all returns the three statements under statements; one statement returns its rows under periods. Annual history covers about 4 years, quarterly about 5 quarters.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
symbolrequired | string | Stock symbol. Example: AAPL |
statement | income | balance | cashflow | all | income (default), balance, cashflow or all. Example: income |
period | annual | quarterly | trailing | annual (default), quarterly or trailing (trailing twelve months; income and cash flow only). Example: annual |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/yahoo-finance/v1/financials?symbol=AAPL" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/yahoo-finance/v1/financials",
params={"symbol": "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/yahoo-finance/v1/financials");
url.searchParams.set("symbol", "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).