/data/compare/line-items

Compare a list of line-item names (e.g. revenue, net income) across up to 25 filings. Names are resolved through the same L0–L3 tiered path as POST /data/line-items; per-line-item × per-filing pricing applies. Results are consolidated totals, as in POST /data/line-items.

POST/api/v1/data/compare/line-items
Rate limit60 per minute

Request:

filingsarrayrequired

1–25 rows. Each row: filing_id or (ticker + fiscal_year + optional form_type and quarter), same rules as POST /data/facts.

line_itemsarray of stringrequired

Non-empty; max 50 strings; each max 256 chars.

detailstring

Default "full". "light" leaves out each fact's dimensional_breakdowns and each row's classification.source.url. See Response detail.

Response:

amendment_contexts

Array parallel to results; each entry is an object or null.

results

Each element: ticker, form_type, fiscal_year, quarter, source_url_prefix (filing-level SEC URL base, may be null), optional caveat (per-row; see Filing caveats), unresolved (resolved line items with no consolidated-total fact in that filing), facts (array of fact objects; each fact carries either fact_id + source_locator or fact_ids, as in POST /data/line-items, plus _resolution_level = "L0" … "L3" indicating which tier matched that line item), and — for Pro+ callers — a per-row classification block (see Industry classification (Pro+)).

failed_filings

Optional. Rows that could not be compared, each {index, error_code, message} with the error that row alone would return; these rows are not charged.

credits_used

Per credit rules in Credit summary.

credits_by_line_item

Credits charged per requested line item, summed over the compared filings.

_correction, _warnings

Optional; same general meaning as POST /data/line-items. Multi-concept line items are ordered by Akkru smart ranking within each row's facts, same as POST /data/line-items (a recommendation only — review all results). A _warnings entry is appended when the compared filings' fiscal period end dates differ by more than 45 days. The dimensional-breakdown notice is aggregated into a single string listing affected filings + fact ids. Per-row caveats are also aggregated into top-level _warnings (deduplicated; see Filing caveats). When rows fail, a _warnings entry reads {n} of {m} filings could not be compared; see failed_filings.

Partial-credit behavior: This endpoint charges per line item × per filing with partial-credit billing. When your balance cannot cover the full request, the remaining line items return as unresolved; _warnings / _correction show which, so you can top up and re-issue for the rest.

Errors: a row that cannot be resolved (DATA_FILING_QUARTER_REQUIRED, DATA_FILING_NOT_FOUND, a PLAN_TIER_* 403) is listed in failed_filings. When every row fails, the request returns the first row's error, with failed_filings in detail.

HTTPerror_codeWhen
400 / 404 / 403the first row's codeEvery row failed.
402CREDITS_INSUFFICIENTZero balance.
422—Limits, missing line_items, a row without filing_id or ticker + fiscal_year, unknown row keys, or other validation.