Skip to content
ledgerbase
DocsLearnCatalogJoin Our CommunityFAQStatusRequest API key
MVP-limited ticker coverage. This is an early MVP — only eight tickers are ingested: AAPL, AMZN, JPM, MSFT, NVDA, TSLA, WMT, and XOM. Any other ticker returns no data.
Learn / Guide
01Direct answer02Why missing data is not zero03The four data states04A real example: AMZN total liabilities05How AI agents should avoid hallucinating financial values06Recommended application-level handling07Limitations08Try it yourself
Learn / Guide

How should an AI agent or app handle missing SEC financial data?

The single most likely integration bug: silently treating a MISSING metric as zero. That would misrepresent a real company's finances. Here is the real example and the correct fix.

Last updated: July 30, 2026
01

Direct answer

Never coerce a missing value to 0or an estimate. Check the field’s status first (AVAILABLE, MISSING, or LINEAGE_MISSING) and branch explicitly — treat anything other than AVAILABLE as unknown, not zero.

02

Why missing data is not zero

A company can legitimately not file the XBRL concept a metric depends on. Reporting that as 0would state, incorrectly, that the company has none of that line item — a materially false financial claim. LedgerBase instead reports the field as explicitly missing, so a consumer knows the difference between “zero” and “unknown.”

03

The four data states

StatusMeaning
AVAILABLEPresent with verified SEC/XBRL lineage — a direct or derived value.
MISSINGNo safe SEC-backed value exists. Not zero — unknown.
LINEAGE_MISSINGA value exists but lineage cannot be confirmed — ambiguous, and not ready for automated use without manual verification.
04

A real example: AMZN total liabilities

curl -H "X-API-Key: $LEDGERBASE_API_KEY" https://api.ledgerbase.cc/v1/companies/AMZN/data-quality
{
  "overallStatus": "OK_WITH_MISSING_METRICS",
  "missingMetricDetails": [
    {
      "metricKey": "total_liabilities",
      "status": "MISSING",
      "reason": "Not found in ingested SEC data",
      "required": true
    }
  ]
}

Amazon does not file a us-gaap:Liabilities XBRL fact, so LedgerBase reports total_liabilities as explicitly MISSING rather than guessing. This is intentional, documented behavior — a trust feature, not a defect.

05

How AI agents should avoid hallucinating financial values

An AI agent consuming LedgerBase data should treat a MISSING or LINEAGE_MISSINGfield as “no answer available,” and say so, rather than filling the gap from a language model’s general knowledge or interpolating from other periods. Silent estimation by an agent is exactly the failure mode this status vocabulary exists to prevent.

06

Recommended application-level handling

Wrong way (never do this):const value = detail.value ?? 0;— silently fabricates a false zero for a real company’s liabilities.
Right way:if (detail.status === "MISSING") { /* treat as unknown, do not compute with it */ } — branch explicitly on status before using any value.
07

Limitations

Status vocabulary is per-field, not global — different endpoints expose it under different field names. See the Data Quality & Lineage topic in the API reference for the authoritative glossary before integrating against a new endpoint.

08

Try it yourself

Run this call from the API reference’s Try It panel, inspect metric coverage in the Metric Catalog, or go back to Learn for the full interactive tutorial and related concepts.

ledgerbase
Product
DocsStatusRequest API key
Feedback
Request a featureReport a bugFAQChangelog
Company
AboutContactSecurityTermsPrivacy

© 2026 LedgerBase, Inc. SEC data sourced from public EDGAR filings.