GET
/companies/{ticker}/income-statementPro: API access to this route needs a Pro plan (a free key gets 403; on Free, use /data/metrics). Get income statement data including revenue, expenses, operating income, and net earnings. Supports quarterly, annual, and TTM data.
Example Request
https://api.metricduck.com/api/v1/companies/AAPL/income-statement?period=quarterly&years=1Path Parameters
| Parameter | Type | Description |
|---|---|---|
tickerrequired | string | Stock ticker symbol (e.g., AAPL, MSFT, GOOGL) |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
period | string | Reporting period: "quarterly", "annual", or "ttm" (trailing twelve months). Foreign private issuers (20-F/40-F) file annually; quarterly income-statement and cash-flow usually return 404 for them; use period=annual. |
years | integer | Years of history to return (1–10) |
vantage_date | string | As-of date (YYYY-MM-DD): returns only periods filed on or before it and cites the filing of that era. Values are the latest filed, so a later restatement or recast is served; revised_after_vantage flags only a later amendment of the period's own filing. Omit for the latest. |
signed | boolean | When true, deductions (interest_expense, gain_loss_invests) are returned negative, as on the filed statement. Default: positive magnitudes. |
include_segment_hierarchy | boolean | Include the business-segment breakdown, if available |
Response
Returns company info and an array of income statement periods. All monetary values are in USD.
Data Fields
| Field | Type | Description |
|---|---|---|
period_end | string | End date of the reporting period (YYYY-MM-DD) |
period_type | string | Period type: "quarterly" or "annual" |
total_revenue | numbernullable | Total revenue/sales |
cost_of_revenue | numbernullable | Cost of goods sold (COGS) |
gross_profit | numbernullable | Gross profit (revenue - COGS) |
operating_expenses | numbernullable | Total operating expenses |
operating_income | numbernullable | Operating income (EBIT) |
interest_expense | numbernullable | Interest expense |
income_before_tax | numbernullable | Income before income taxes |
income_tax_expense | numbernullable | Income tax expense |
net_income | numbernullable | Net income attributable to common shareholders |
eps_basic | numbernullable | Basic earnings per share |
eps_diluted | numbernullable | Diluted earnings per share |
shares_basic | numbernullable | Basic weighted average shares outstanding |
shares_diluted | numbernullable | Diluted weighted average shares outstanding |
Example Response
{
"company_name": "Apple Inc.",
"ticker": "AAPL",
"cik": "0000320193",
"data": [
{
"period_end": "2024-09-30",
"period_type": "quarterly",
"total_revenue": 94930000000,
"cost_of_revenue": 52550000000,
"gross_profit": 42380000000,
"operating_expenses": 14320000000,
"operating_income": 28060000000,
"interest_expense": 1030000000,
"income_before_tax": 28500000000,
"income_tax_expense": 4230000000,
"net_income": 14736000000,
"eps_basic": 0.97,
"eps_diluted": 0.97,
"shares_basic": 15204000000,
"shares_diluted": 15287000000
}
],
"count": 1,
"has_more": true
}Code Examples
Python
import requests
API_KEY = "your_api_key_here"
BASE_URL = "https://api.metricduck.com/api/v1"
# Get the last year of quarterly income statements
response = requests.get(
f"{BASE_URL}/companies/AAPL/income-statement",
headers={"X-API-Key": API_KEY},
params={"period": "quarterly", "years": 1}
)
data = response.json()
print(f"Company: {data['company_name']}")
for period in data['data']:
revenue = period['total_revenue']
net_income = period['net_income']
print(f"{period['period_end']}: Revenue ${revenue:,.0f}, Net Income ${net_income:,.0f}")JavaScript
const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://api.metricduck.com/api/v1';
// Get the last year of quarterly income statements
const response = await fetch(
`${BASE_URL}/companies/AAPL/income-statement?` +
new URLSearchParams({ period: 'quarterly', years: '1' }),
{
headers: {
'X-API-Key': API_KEY
}
}
);
const data = await response.json();
console.log(`Company: ${data.company_name}`);
data.data.forEach(period => {
const revenue = period.total_revenue?.toLocaleString() ?? 'N/A';
const netIncome = period.net_income?.toLocaleString() ?? 'N/A';
console.log(`${period.period_end}: Revenue $${revenue}, Net Income $${netIncome}`);
});Notes
- - All monetary values are in USD (not scaled)
- - Quarterly data is from 10-Q filings, annual from 10-K filings
- - Some fields may be null if not reported by the company
- - Data is sourced directly from SEC XBRL filings