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.
Last updated
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.
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.
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:
{
"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"
}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; to compare and recompute figures you already have, send them to find conflicting figures; to check the arithmetic in one sentence, use check the numbers in a sentence.