Get US Company Financials (SEC XBRL)
get_edgar_financialsNormalized annual (10-K) or quarterly (10-Q) financial statements for a US company, from SEC EDGAR XBRL company facts (US-GAAP). Values are raw USD (not scaled); eps_diluted is USD per share.
Args:
company (required): ticker / company name / CIK (e.g. 'AAPL', 'Microsoft', '789019')
freq: 'annual' (default, from 10-K) or 'quarterly' (discrete Q1-Q3 from 10-Qs; Q4 is not reported separately)
periods: how many most-recent periods, 1-12 (default 3)
metrics: optional subset of [revenue, gross_profit, operating_income, net_income, eps_diluted, assets, liabilities, equity, cash_and_equivalents, operating_cash_flow] (default all)
response_format: 'markdown' (default) or 'json'
Returns NormalizedFinancials: {company:{name, id(CIK), ticker}, basis:'US-GAAP (10-K)', periods:[{period:'FY2024', fiscal_year, end, currency:'USD', metrics:{revenue, net_income, ...}}], notes}. periods are most-recent first; fiscal_year = calendar year of the period end date.
Examples:
"Apple's revenue and net income for the last 3 years" -> {company:'AAPL', metrics:['revenue','net_income']}
"MSFT last 4 quarters" -> {company:'MSFT', freq:'quarterly', periods:4}
Use when: you need US-GAAP fundamentals for a US-listed company. Don't use for: Korean companies (get_dart_financials), stock prices, or IFRS 20-F foreign private issuers (not supported).
Errors: unknown company -> use search_edgar_company first; companies without us-gaap XBRL facts (funds, 20-F filers) return an error explaining why.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| freq | No | 'annual' = fiscal years from 10-K filings; 'quarterly' = discrete Q1-Q3 from 10-Q filings | annual |
| company | Yes | US company: ticker (e.g. 'AAPL', 'BRK-B' or 'BRK.B'), company name, or CIK number | |
| metrics | No | Optional metric subset. Available: revenue, gross_profit, operating_income, net_income, eps_diluted, assets, liabilities, equity, cash_and_equivalents, operating_cash_flow. Default: all | |
| periods | No | Number of most-recent periods (default 3) | |
| response_format | No | 'markdown' for a table, 'json' for compact machine-readable output | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| basis | No | ||
| company | Yes | ||
| periods | Yes |