Bank statement parsing API: how to test, build or buy
What a bank statement parsing API returns, how to measure accuracy, and an evaluation checklist that catches date shifts as well as balance failures.
A bank statement parsing API takes a statement PDF and returns its transactions as structured data, usually JSON with a date, description, amount and balance for each row. Before you build or buy one, test it on statements you've already checked by hand, because output that balances can still carry the wrong dates.
What a bank statement parsing API returns
Here is the JSON export from NoRekey's API, with fictional values:
{
"statement": "january.pdf",
"bank": "HSBC",
"currency": "GBP",
"opening_balance": "3425.00",
"closing_balance": "6964.61",
"balanced": true,
"transactions": [
{
"date": "2026-01-04",
"description": "SAINSBURYS S/MKT",
"amount": "-57.56",
"balance": "3367.44"
},
{
"date": "2026-01-24",
"description": "BACS SALARY ACME LTD",
"amount": "3597.17",
"balance": "6964.61"
}
]
}
Whichever parser you use, look for the same things. Amounts should be decimal strings, so nothing is lost to float precision. The statement's declared totals should sit apart from the rows, so you can test one against the other. And the verdict needs three states: here true means the rows reconcile exactly, false means they don't, and null means the statement declared no totals to check.
Calling the API: endpoints and a code example
| Endpoint | What it does |
|---|---|
POST /api/v1/conversions |
Upload a PDF as multipart statement, or as base64 in JSON. Returns 201 with status pending. |
GET /api/v1/conversions/{id} |
Status and metadata, including balanced and scanned. |
GET /api/v1/conversions/{id}/export/{format} |
Download csv, xlsx, ofx, qfx or json. |
GET /api/v1/usage |
Pages left. The call costs no pages. |
Authentication is a team API key sent as a bearer token. There's no SDK to install, and an OpenAPI 3.1 specification is there if you want to generate a client.
import requests, time
API = "https://norekey.com/api/v1"
HEADERS = {"Authorization": "Bearer nrk_..."}
with open("january.pdf", "rb") as f:
conversion = requests.post(
f"{API}/conversions", headers=HEADERS, files={"statement": f}
).json()
while conversion["status"] in ("pending", "processing"):
time.sleep(2)
conversion = requests.get(
f"{API}/conversions/{conversion['id']}", headers=HEADERS
).json()
if conversion["status"] == "completed":
statement = requests.get(
f"{API}/conversions/{conversion['id']}/export/json", headers=HEADERS
).json()
A production client also needs to handle failed (read error), expired (a 410 on later requests) and the JSON errors, each with a code and message, such as password_required, too_many_pages and quota_exceeded. Requests are limited to 120 a minute per key. The API guide has the rest.
How to measure bank statement parsing accuracy
A single accuracy percentage from someone else's documents won't tell you much. Score each field separately, on your own statements, against answers you've checked by hand.
| Failure | Does a balance check catch it? | What does |
|---|---|---|
| Dropped or extra row | Normally | Row count against your answers |
| Flipped sign or misread digit | Normally | Row-by-row amount comparison |
| Two errors that cancel out | No | Row-by-row amount comparison |
| Date moved to another day | No | Row-by-row date comparison |
| Wrong description | No | Row-by-row text comparison |
Statement with no totals (balanced: null) |
Can't run | Your answers |
The date row is the one a balance-only harness misses. On 8 October 2026, NoRekey's own model test found silent date errors that passed the balance check: a harness asserting only balanced would have passed those runs. This scorer compares each output with a hand-checked export in the same shape:
from decimal import Decimal
def score(truth, got):
if len(truth["transactions"]) != len(got["transactions"]):
return {"row_count_matches": False}
pairs = list(zip(truth["transactions"], got["transactions"]))
total = sum(Decimal(row["amount"]) for row in got["transactions"])
opening, closing = got["opening_balance"], got["closing_balance"]
return {
"row_count_matches": True,
# None means the statement declared no totals to reconcile against.
"reconciles": None if opening is None or closing is None
else Decimal(opening) + total == Decimal(closing),
"amount_errors": sum(Decimal(a["amount"]) != Decimal(b["amount"]) for a, b in pairs),
"date_errors": sum(a["date"] != b["date"] for a, b in pairs),
"description_errors": sum(a["description"] != b["description"] for a, b in pairs),
}
An evaluation checklist for a bank statement parser
- Build the answers by hand, from statements like the ones you'll process in production. In our test, a synthetic set scored 100/100 on every model and only real statements separated them.
- Include layouts that print the date once per day group. That's where our date errors appeared.
- Include statements that cross a month end, a tax-year end and a calendar-year end, and any that omit the year.
- Include separate debit and credit columns, wrapped descriptions, repeated page headers, brought-forward lines and overdrawn markers.
- Include a statement with no printed totals, and confirm that your code treats
nulldifferently fromtrue. - Run each statement several times. Our errors appeared in some runs and not others, so one clean pass proves little.
- Report errors by field and by period. A row that crosses a period end costs more than one that moves within a month.
- Add date checks you can keep running in production: every date falls inside the statement period, and every date appears in the PDF's text, in its printed format, where there's a text layer.
- Keep the set, and rerun it whenever a parser or model changes.
Got a statement with hand-checked answers? Convert it free, up to 10 pages with no account, and compare the output before writing any integration code. The API is on every plan, including Free, which gives you 10 pages a month to run the scorer against.
OCR for scanned statements
Scans add an OCR stage, and with it look-alike digits, lost decimal points and missing minus signs. Score them as a separate group, because a blended figure can hide a poor result on scans. A balance check helps most here, though it still says nothing about dates.
On this API, scans go through OCR automatically, with no prompt. The response marks them with "scanned": true, and they're charged one page per page, like any other upload. Why scanned statements go wrong lists the failure modes to put in your test set.
Security questions to ask
Ask these of a vendor, and of yourself if you build:
- Which sub-processors see the file, including any model provider? Is training on your data ruled out in the contract?
- How long are the PDF and the extracted rows kept, who sets that, and what about backups and logs?
- Who can open a customer's file, and when is that recorded?
- Is data encrypted in transit and at rest, and in which region does it sit?
- Can keys be scoped and revoked? Is a data processing agreement available?
Our nine questions for any converter go further, and what happens to your files has our answers on files.
Build or buy a bank statement parser?
| Build | Buy | |
|---|---|---|
| Suits you when | You have few layouts, high volume, or a data path you must control | You have many layouts, a small team, or uneven volume |
| Upfront work | Extraction, OCR, normalising signs and dates, the balance check | The integration |
| Ongoing work | Every new layout and every model change | A per-page cost, and watching for vendor changes |
| Still yours | The test set and reviewing flagged rows | The test set and reviewing flagged rows |
If you parse one bank's layout, a table-extraction library may be all you need. A general model API looks like a shortcut, but our test is a reason to score it on dates before you trust it. Either way, write the test set first: it's the one piece you need whichever way you go.
Frequently asked questions
What is a bank statement parsing API?
It's a web service that accepts a bank statement, usually a PDF, and returns the transactions as structured data such as JSON or CSV. A typical response includes the statement's metadata, opening and closing balances, and one record per transaction with a date, description, amount and running balance.
How do you measure bank statement parsing accuracy?
Check some statements by hand, then compare the parser's output row by row, scoring row count, amounts, dates and descriptions separately. Run each statement more than once and use your own layouts. A single percentage, or a balance check alone, can hide errors in fields the arithmetic doesn't touch.
Does a balance check prove a parsed statement is correct?
No. It shows the amounts add up from opening balance to closing balance, which normally catches dropped rows and flipped signs. It can't catch a date moved to another day or a wrong description, and two errors can cancel out. Our own October 2026 test found date errors that passed.
Can a bank statement parsing API handle scanned PDFs?
Many can, through an OCR stage, but test scans separately because they fail in different ways from digital PDFs. On NoRekey's API, scanned PDFs go through OCR automatically, the response marks them with "scanned": true, and they're charged at one page per page, the same as digital uploads.
Statements in, clean books out.
NoRekey converts bank statement PDFs to CSV, Excel, OFX and QFX — every conversion balance-checked. Free to try.
Convert a statement free →Can ChatGPT convert a bank statement to Excel?
Yes, if you check the result. A prompt to paste, the data settings to review, and our test showing dates can shift while the totals still balance.
How bank statement balance-checking works — and what it cannot prove
Opening and closing balances provide an arithmetic check on extracted transactions. Learn what a balanced result means, which errors it can miss and when to review the source.
Why scanned bank statements go wrong, and how to prove the numbers anyway
OCR reads a 1 as a 7, drops a decimal point, and loses the minus sign on a refund — and none of it looks wrong on screen. The specific ways scanned statements fail, why "99% accurate" is the wrong measure, and the arithmetic check that helps reveal them — plus the errors a matching total can still miss.