PDFCraft
Extraction guide

Extract a dividend statement PDF to JSON

Everything below is the response the live API returned for a dividend statement, generated when this page was built. Not a description of what it would return — the output itself, including what it scored low on.

Who this is for

Portfolio trackers and tax-reporting tools reading broker statements that have no API behind them.

The job, in the words people search for: “extract dividend payments from a broker statement”.

What makes this shape awkward

Withholding tax is blank for domestic holdings and populated for foreign ones, in the middle of the table. A gap in a middle column is harder than a gap at the end: the cells to its right must not shift left to fill it.

The measured result

Pages read1
Time16 ms (16 ms/page)
Labelled fields found unprompted4
Tables1 (12 rows)
Inputdividend-statement.pdf (28 KB — synthetic, generated from a spec in the repo; real documents of this type cannot be published)

Fields, with a schema

Ask for the fields you want by the label printed on the page. Each answer carries the text exactly as printed (raw), the value coerced to the type you asked for, a confidence, and a bounding box you can draw on the page to check it.

curl -X POST https://api.pdfcraft.dev/v1/extract \
  -H "Authorization: Bearer $PDFCRAFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file": "<base64 of your dividend statement>",
    "schema": {
      "account": "string",
      "total_gross": "currency",
      "total_net": "currency"
    }
  }'

What came back

Fieldrawvalueconfidence
accountACC-77-41290"ACC-77-41290"60%
total_grossUSD 4,118.624118.62 USD70%
total_netUSD 3,702.183702.18 USD70%

Every label it found without being asked

Send no schema and you get all of these, keyed by the label as printed. Useful for discovering what a new supplier’s layout actually contains before you write a schema against it.

Account, Period, Total Gross, Total Net

Tables

Pay date · Security · Shares · Per share · Gross · Withheld · Net · 12 rows × 7 columns · page 1

Table confidence 90%. Header confidence 100% — the first row was promoted out of the data.

Pay dateSecuritySharesPer shareGrossWithheldNet
2026-01-05ACME3770.5421204.38—204.38
2026-02-06BRIT8781.49821,315.40—1,315.40
2026-03-07CALD651.361388.4913.2775.21

First 3 of 12 rows.

With options.rows_as_objects, the same row keyed by its header:

{
  "Pay date": "2026-01-05",
  "Security": "ACME",
  "Shares": "377",
  "Per share": "0.5421",
  "Gross": "204.38",
  "Withheld": "",
  "Net": "204.38"
}

What this does not do

Try it on your own dividend statement

The playground takes a file and shows the same JSON, with every bounding box drawn over the page. No key and no signup for the first few; a free key gives you 100 pages a month.

Related