stocks tool

Public

stocks_get_segmented_financials

Revenue or operating income broken out by segment, newest year first.

Description

Revenue or operating income broken out by segment, newest year first.

Use this for "how much of AAPL's revenue is Services vs iPhone?" or "what was each MSFT segment's operating income trend?" (e.g. stocks_get_segmented_financials(ticker="AAPL", axis="products_services", limit=3)). For company-wide totals use stocks_get_income_statements instead — that tool serves the consolidated statement; this one serves only the segment note's disaggregation of two of its lines, and repeats the consolidated figure just so the tie is checkable in place.

The result is the shared envelope: data holds the company identity (ticker, cik, company_name) plus the axis/metric echo and the bounded frames list; meta holds source ("sec_edgar_segments") and as_of (the freshest row-level timestamp on this page); pagination holds cursor paging state. To page, pass pagination.next_cursor back as cursor; when pagination.has_more is false you have reached the oldest year.

Each frame is one fiscal year: fiscal_year, fiscal_period, period_type, period_start/period_end, the frame-wide unit and currency (as filed, never converted), a segments list ordered largest first, and consolidated_total (the filer's undimensioned figure for the same tag, with its own accession_number/as_of; null when the filing tagged none). Each segment carries member (the verbatim XBRL member QName, e.g. "aapl:IPhoneMember"), member_label, member_role (operating | elimination | corporate_other), value (exact decimal as a JSON string), share_of_total (the member's fraction of the consolidated total, 4 decimals — revenue only, and null when the frame has no positive total), accession_number, and as_of. Segment sums need not foot exactly to the consolidated total: filers reconcile through unallocated items, which is why the total is served rather than assumed.

Coverage: the golden-set pilot universe, US-GAAP filers, annual 10-K frames only. member is the member the filer tagged, so a series is comparable to itself over time and to no other company — there is no cross-company segment mapping, and two filers' "Americas" are not the same thing. A covered company that does not disaggregate on the requested axis returns an empty frames list — honest coverage, not an error.

Errors carry a machine code: unknown_entity for a well-formed symbol we hold no mapping for, out_of_coverage for a company we hold no segment data for at all (outside the pilot universe), and bad_parameter for a non-ticker string, a malformed cursor, or metric="operating_income" on an axis other than business_segments.

Parameters

Input schema

NameTypeRequiredDefaultDescription
tickerstringYesTicker symbol, e.g. 'AAPL' or 'BRK.B' (class separators accepted).
axis"business_segments" | "products_services" | "geography"YesHow to disaggregate: 'business_segments' = the filer's reportable segments, 'products_services' = its product and service lines, 'geography' = its regions. Pick the axis the company actually reports on — Apple's reportable segments are geographic, so its iPhone/Services split lives on 'products_services'.
metric"revenue" | "operating_income"No"revenue"'revenue' (all three axes) or 'operating_income' (the segment profit measure; 'business_segments' axis only — any other axis returns `bad_parameter`).
include_non_operatingbooleanNofalseInclude the elimination and corporate/other members the filer tagged alongside its operating segments. Leave false for the operating mix; set true to follow the reconciliation to the consolidated total yourself.
limitintegerNo4Fiscal years to return, newest first (1–12). Counts years, not rows: a year's members all land on the same page.
cursorstring | nullNonullOpaque pagination cursor from a previous response's `pagination.next_cursor`; omit to start from the newest fiscal year.

Provenance

Sources

Dataset registry: stocks_segmented_financials