> ## Documentation Index
> Fetch the complete documentation index at: https://doc.prometheus.services/llms.txt
> Use this file to discover all available pages before exploring further.

# Data provenance

> Where every number comes from, and how to trace it back to the filing.

Prometheus is built on one refusal: **no number without a source.** This page explains
the pipeline behind that promise — and the endpoint that lets you audit it yourself.

## The pipeline

<Steps>
  <Step title="SEC EDGAR, at the source">
    10-K, 10-Q and 8-K filings are ingested directly from EDGAR, XBRL facts and all —
    including the presentation tree and calculation linkbase, not just the tagged values.
  </Step>

  <Step title="Standardization with receipts">
    Each filer's tags are mapped onto one canonical schema (`revenue`,
    `operating_income`, …) so companies are comparable. The mapping is stored, not
    discarded: every standardized line keeps a pointer to the raw fact(s) it came from.
  </Step>

  <Step title="Validation gates">
    Before anything is served, per-company invariant batteries run: statements must
    tie (revenue − costs, balance-sheet identity), values are reconciled against the
    SEC's own `companyfacts` API, and share counts, splits and restatements are
    cross-checked. Data that fails a gate is withheld — you see a null, never a guess.
  </Step>

  <Step title="Serving, still auditable">
    The `fact-source` endpoint closes the loop at read time: any line, any period,
    back to the XBRL concept, the filing accession, and the calculation tree.
  </Step>
</Steps>

## Trace a number

```bash theme={null}
curl "https://www.prometheus.services/api/v1/companies/NVDA/fact-source?statement=income_statement&key=revenue&end_date=2025-01-26&period_type=quarterly" \
  -H "X-API-KEY: pk_live_YOUR_KEY"
```

The response names the XBRL concept, the accession number of the filing the value was
taken from, and the calculation tree it participates in. Put the accession next to the
number when you quote it — that is the citation.

## What the gates mean for you

* **A null is a withheld or never-reported value** — the gate refusing to serve
  something it could not verify. Treat it as unavailable, never as zero.
* **Restatements are first-class.** The default vintage is latest-restated (what a
  later filing says the period was); `reporting_basis=as_reported` returns what was
  originally filed. See [Data semantics](/data-semantics).
* **Derived Q4 is marked.** Most US filers file no Q4 10-Q; the fourth quarter is
  derived from the annual total minus Q1–Q3 and flagged as derived.

## Other corpora

| Data         | Source             | Provenance property                                           |
| ------------ | ------------------ | ------------------------------------------------------------- |
| Macro series | FRED / ALFRED      | Full revision vintages — point-in-time reads never look ahead |
| Transcripts  | Licensed providers | Span-anchored: observations point into the exact passage      |
| 8-K events   | EDGAR              | Typed by item code; extracted text served verbatim            |
| Prices       | Market data feeds  | Split-adjusted; used for reactions, not tick trading          |
