<!-- Agent Datasets docs · stocks_search_line_items · canonical: https://www.agentdatasets.com/docs/tools/stocks_search_line_items · rendered from https://www.agentdatasets.com -->

# stocks_search_line_items

Selected canonical statement lines across several companies.

| Field | Value |
| --- | --- |
| Category | Stocks (`stocks`) |
| Exposure | public |
| MCP tool | `stocks_search_line_items` |
| Documentation | https://www.agentdatasets.com/docs/tools/stocks_search_line_items |

## Description

Selected canonical statement lines across several companies.

Use this for a cross-company comparison of a few selected lines. Use
`stocks_get_income_statements`, `stocks_get_balance_sheets`, or
`stocks_get_cash_flow_statements` when you need a full statement for
one company instead.

The shared envelope's `data` contains `companies` (each resolved
ticker/CIK/name once), the accepted `line_items`, `period_type`, and
newest-first `results`, plus `unresolved_tickers` and
`unknown_line_items` for partial failures. Each result is one
ticker/fiscal frame whose `lines` values carry the exact decimal value,
unit, currency, as_of timestamp, and accession number served by the
single-company statement tools. Missing lines are omitted, never zero.
`meta` carries SEC EDGAR provenance and the freshest value-level
`as_of` on the page. `pagination` uses 40-row pages; pass
`next_cursor` back as `cursor` while `has_more` is true.
The per-item depth cap is evaluated at call time, so an ingest that
lands between page requests can shift which oldest frames fall inside
the capped set; the page boundary itself remains stable per the shared
cursor contract.

Canonical income keys: `revenue`, `cost_of_revenue`, `gross_profit`,
`operating_expenses`, `total_costs_and_expenses`,
`research_and_development`, `selling_general_and_administrative`,
`general_and_administrative`, `selling_and_marketing`,
`operating_income`, `interest_expense`, `pretax_income`,
`income_tax_expense`, `net_income`, `eps_basic`, `eps_diluted`,
`shares_basic`, `shares_diluted`.

Canonical balance keys: `total_assets`, `current_assets`,
`cash_and_equivalents`, `receivables`, `inventory`, `ppe_net`,
`goodwill`, `intangibles`, `total_liabilities`,
`current_liabilities`, `debt_current`, `debt_noncurrent`,
`total_equity`, `shares_outstanding`.

Canonical cash-flow keys: `net_cash_operating`, `net_cash_investing`,
`net_cash_financing`, `capex`, `depreciation_amortization`,
`share_repurchases`, `dividends_paid`, `free_cash_flow`.

Bounds are 20 tickers, 20 line items, and 12 periods per ticker and
line item (default 4), with a fixed 40-row result page.
Unknown tickers/keys never error—even an all-unresolved call succeeds
with empty results and the full report. `bad_parameter` is reserved for
malformed cursors or bounds that bypass a surface schema.

Example: `stocks_search_line_items(tickers=["AAPL","MSFT"],
line_items=["revenue","net_income"], period="annual")`.

## Parameters

Input schema advertised to MCP clients and mirrored by the REST query string.

| Parameter | In | Type | Required | Default | Constraints | Description |
| --- | --- | --- | --- | --- | --- | --- |
| tickers | input | `array<string>` | yes | — | min items 1, max items 20 | Exact ticker symbols to compare. Repeats are deduplicated case-insensitively; unknown or malformed tickers are reported in data.unresolved_tickers instead of failing the batch. |
| line_items | input | `array<string>` | yes | — | min items 1, max items 20 | Exact canonical line keys to fetch. Repeats are deduplicated; unknown keys are reported in data.unknown_line_items and are never fuzzy-matched. |
| period | input | `"annual" \| "quarterly" \| "ttm"` | no | "annual" | — | Fiscal frame: 'annual', 'quarterly', or 'ttm'. Balance keys simply have no TTM frames, so they are absent under 'ttm' rather than causing an error. |
| limit | input | `integer` | no | 4 | min 1, max 12 | Newest fiscal periods retained independently per ticker and line item (1–12, default 4). |
| cursor | input | `string \| null` | no | null | — | Opaque pagination cursor from a previous response's pagination.next_cursor; pass it back unchanged to continue through the globally ordered 40-row pages. |

## Provenance

- `sec_edgar_companyfacts` — U.S. Securities and Exchange Commission (EDGAR), XBRL company-facts financial-statement data (per-company API and the nightly bulk companyfacts.zip) (U.S. Government work, public domain (17 U.S.C. § 105)). See https://www.agentdatasets.com/docs/attribution.md

Dataset registry: `stocks_fundamentals`.
