# Extract financial figures with their source location

Pull recognised financial metrics such as revenue and costs from a PDF or spreadsheet, each with unit, period, page or cell and a review state, using the figures endpoint.

Documentation index: https://webcite.co/llms.txt
Canonical page: https://webcite.co/api-docs/extract-financial-figures
API origin: https://api.webcite.co
Authentication: x-api-key header. Keep keys on your server.

## How do I pull financial statement figures out of a PDF with where each came from?

Upload the statement and call `POST /api/v1/extract/figures`. Each recognised metric comes back with its value scaled to units, its unit, and `provenance` naming the page or sheet and cell. A figure marked `needs_review` has not been re-read from its source, so check it on the page before it reaches your model or report. Figure extraction finds recognised metrics rather than every number; for every table on a page, use [extraction](/api-docs/extract).

## Endpoint and minimal request

`POST https://api.webcite.co/api/v1/extract/figures` takes one required field, the uploaded file's `asset_id`. Agents call `extract_figures`.

```bash
curl --fail-with-body -X POST 'https://api.webcite.co/api/v1/extract/figures' \
  -H "x-api-key: $WEBCITE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"asset_id": "YOUR_ASSET_ID"}'
```

Recorded on two pages of the U.S. Mint's 2024 annual report, the response came back `state: partial` with 2 figures. The first:

```json
{
  "metric": "revenue",
  "value": 3385700000,
  "unit": "currency",
  "provenance": {
    "assetId": "d22dac9c-7cb0-4687-9cf5-a0789242beeb",
    "documentName": "us-mint-2024-annual-report-pages-9-and-36",
    "page": 1,
    "cell": "R1C1",
    "method": "rule"
  },
  "band": "needs_review",
  "bound": false,
  "bindState": "not_rechecked",
  "reviewReason": "value was not re-read from its cited source"
}
```

[Full response](/samples/doc-mint-figures.json).

## Read each figure

Each figure has a `metric`, a `value` already scaled to units, a `unit`, and `provenance` with the page or sheet and cell. `band` and `reviewReason` say whether the value was re-read from its cited source; a figure marked `needs_review` has not been, so check it against the page before it reaches a report. A `partial` state means part of the document could not be read, so the list covers only what was read.

## When to use it, and what to use instead

Figure extraction finds recognised financial metrics, not every number on a page. On the Mint pages, which state many more figures, it returned two. For a full read of a page use [extraction](/api-docs/extract); to compare and recompute figures you already have, send them to [find conflicting figures](/api-docs/find-conflicting-figures); to check the arithmetic in one sentence, use [check the numbers in a sentence](/api-docs/check-numbers-in-a-sentence).
