Bank Statement API Integration — Any Bank, Any Country
TL;DR
A format-agnostic bank statement API detects the layout of any statement at request time instead of relying on pre-built templates, so a new or updated format works without code changes. You send the PDF, the API learns unfamiliar layouts automatically, and you get the same JSON schema back every time.
Bank Statement API Integration — Any Bank, Any Country
Every bank uses a different PDF format. Some use column-based tables, others prefer row-based layouts. Instead of building and maintaining manual templates, use Bank Statement Parser API to process any format automatically.
Why Template-Free?
With template-based tools, when a format changes:
- All output breaks
- Manual update is required
- Your workflow stops
Bank Statement Parser API analyzes the PDF's structure. It adapts automatically as formats evolve.
Python Quick Start
import requests
resp = requests.post(
"https://api.bankstatementparser.net/extract",
headers={"X-Api-Key": "pex_your_api_key"},
files={"file": open("statement.pdf", "rb")}
)
data = resp.json()
print(f"Format: {data['bankKey']}")
print(f"Pages: {data['pageCount']}")
print(f"Transactions: {len(data['transactions'])}")
for txn in data["transactions"]:
print(f"{txn['date']} | {txn['description'][:40]:40} | {txn['amount']:>10.2f}")
Process All Statements in Bulk
import os, requests, pandas as pd
def process_all_statements(folder: str, api_key: str) -> pd.DataFrame:
all_transactions = []
for filename in os.listdir(folder):
if not filename.endswith(".pdf"):
continue
resp = requests.post(
"https://api.bankstatementparser.net/extract",
headers={"X-Api-Key": api_key},
files={"file": open(f"{filename}", "rb")}
)
data = resp.json()
format_key = data.get("bankKey", "unknown")
for txn in data.get("transactions", []):
txn["format"] = format_key
txn["source"] = filename
all_transactions.append(txn)
print(f"✓ {filename}: {format_key} — {len(data.get('transactions', []))} transactions")
return pd.DataFrame(all_transactions)
df = process_all_statements("./statements", "pex_your_api_key")
df.to_excel("all_transactions.xlsx", index=False)
print(f"Total: {len(df)} transactions from {df['format'].nunique()} formats")
Unknown Format — Automatic Learning
When the API encounters a format it hasn't seen before:
resp = requests.post(
"https://api.bankstatementparser.net/extract",
headers={"X-Api-Key": "pex_your_api_key"},
files={"file": open("new_format.pdf", "rb")}
)
if resp.status_code == 202:
data = resp.json()
print(f"Queue ID: {data['queueId']}")
print("Format is being analyzed — usually ready within 30 minutes")
elif resp.status_code == 200:
print(f"Processed: {resp.json()['bankKey']}")
Free Tier
50 pages/month free, no credit card. [Sign up →](https://bankstatementparser.net/en/register)