Compare line items across filings
compare_line_itemsCompare the same set of line-item names (revenue, net income, etc.) across multiple filings. filings: array of identity rows — each uses filing_id OR ticker + form_type + fiscal_year (+ optional quarter). form_type per row accepts 10-K / 10-Q / 20-F / 40-F, so peer comparisons can mix US and foreign issuers. line_items: required non-empty list; resolved through L0–L3 (10 / 20 / 30 / 50 credits per line item × number of filings, itemised in credits_by_line_item). Each fact in every row carries _resolution_level ("L0"-"L3") indicating which tier matched. Returns consolidated totals only — same as query_line_items, including one row per logical fact with fact_ids listing every position; for dimension slice values use the dimensional-breakdown tools or get_filing_statement per filing. light_weight_mode=true omits results[].facts[].dimensional_breakdowns across every row — saves context when you already know exactly what you need. Charged identically. Good for YoY or peer period alignment by named line items. If unsure what a filing calls a line item, list_filing_statements + get_filing_statement show its exact row labels. Multi-concept matches come pre-ordered (Akkru smart ranking); the order is a recommendation only — review all returned results and judge which one you need. Each results[i] lists in unresolved the line items with no consolidated-total fact in that filing. Each results[i] may include a caveat field; per-row caveats are auto-aggregated and deduplicated into top-level _warnings — read either, and surface to the user when present. Pro+ responses add a per-result classification block (canonical sector(s) + source); omitted for sub-Pro. POST /api/v1/data/compare/line-items; FINANCIAL_API_DOCUMENTATION.md.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filings | Yes | Filings to compare (1–25). Each row identifies one filing: {"filing_id": …} or {"ticker": …, "fiscal_year": …, "form_type": …, "quarter"?: …}. | |
| line_items | Yes | Line-item names to compare across all filings, e.g. ["revenue", "net income"] (1–50). | |
| light_weight_mode | No | When true, return a leaner payload (drops the most verbose nested fields). Charged the same. Saves context when you already know exactly what you need. |