Statements are tables that refuse to behave
A 40-page bank statement is one long table chopped across page breaks: headers repeat, balances flow, footers interrupt, and every bank invents its own layout. Naive parsers return 40 fragments; analysts retype them into one sheet. This post shows the structured way through.
Step 1: Extract with a table definition
Mark the transaction set as a table in your schema — an array of objects with a table hint:
{
"type": "object",
"properties": {
"transactions": {
"type": "array",
"description": "One entry per statement line",
"items": {
"type": "object",
"required": ["date", "description", "amount"],
"properties": {
"date": { "type": "string", "format": "date" },
"description": { "type": "string" },
"amount": { "type": "number" },
"balance": { "type": "number" }
}
},
"x-fieldry": { "kind": "table" }
}
}
}
Pages with tables cost +2 credits on top of the base 4. Pages without tables never pay it.
Step 2: Let the stitcher join the pages
Rows are stitched across page breaks into one dataset: repeated headers are detected so they never leak into the data, running balances verify continuity, and a gap flags a missing page instead of silently dropping rows. You get JSON rows, plus CSV and Markdown export with Excel-safe encoding.
Multi-page stitching is automatic — there is no "join" parameter. If a statement's pages belong together, they come back together.
Step 3: Reconcile before you trust
Two checks run on every table:
- Totals vs rows — the closing balance must foot with the transaction arithmetic. Mismatches return
status: mismatchwith evidence on both sides, never a silent rewrite. - Continuity — opening balance of page N must equal closing balance of page N−1. Breaks mean missing or duplicated pages.
Underwriters work from cited rows after that: each transaction links to page and bounding box, so sampling a file takes minutes instead of an afternoon with a highlighter.
What it costs
A 40-page statement with tables throughout: 40 × 6 = 240 credits ($0.24). Through the batch queue, half that. Compare with an hour of analyst retyping.
Common questions
Yes — OCR handles skew and phone-photo quality. Low-confidence rows route to review with the snippet attached; the table still stitches.
No per-bank templates. The schema defines the row shape; the interpreter maps each layout to it on first sight.
Yes — JSON, CSV and Markdown export per table, with UTF-8 BOM so Excel opens special characters cleanly.
Click the row: page thumbnail, source text and bounding box highlight. No PDF scrolling required.