Bank Statement OCR API
Extract structured transaction data from PDF bank statements in seconds. Detect anomalies, and generate forensic-ready exports.
- Structured transactions and running balances
- Multi-page and scanned PDF support
- Check image extraction when present
Quick example
bash
curl -X POST "https://www.docuclipper.com/api/v1/protected/document" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "document=@statement.pdf"Response: { document: { id } }. Use the ID in a create-job request with enableBankMode: true, then poll and export.
Sample file: In the repo, use data/chase-2.pdf for testing.
Response shape (export)
json
// Upload response (201):
{ "document": { "id": "doc_abc123" }, "pdfInfo": { "pageCount": 4 } }
// Export response (200) when jobType: "FieldsToExcel1", format: "json":
// Keyed by documentId → account → bankMode. Transactions live in .bankMode.transactions.
{
"<documentId>": {
"<account>": {
"bankMode": {
"transactions": [
{ "date": "2024-01-15", "amount": -125.00, "description": "POS DEBIT", "category": "Office Supplies" }
],
"totalCredits": 1000,
"totalDebits": 500,
"numCredits": 2,
"numDebits": 1
}
},
"metadata": [{ "pageNumber": 1, "key": "...", "value": "..." }]
}
}Field reference
| Field | Type | Description |
|---|---|---|
| [documentId][account].bankMode.transactions[] | array | Transaction list for that document/account |
| transactions[].date | string | Transaction date |
| transactions[].amount | decimal | Signed amount (negative = debit) |
| transactions[].description | string | Line-item description |
| transactions[].category | string | Category label (when present) |
| [documentId][account].bankMode.totalCredits | number | Sum of credits |
| [documentId][account].bankMode.totalDebits | number | Sum of debits |
| [documentId].metadata | array | Optional per-document metadata |
Full example (no SDK)
Complete flow using only HTTP and JSON: upload → create job → poll until Succeeded → export.
javascript
const fs = require('fs');
const BASE = 'https://www.docuclipper.com/api/v1';
const API_KEY = process.env.DOCUCLIPPER_API_KEY;
const auth = (h = {}) => ({ Authorization: `Bearer ${API_KEY}`, ...h });
const form = new FormData();
form.append('document', new Blob([fs.readFileSync('statement.pdf')]), 'statement.pdf');
const up = await fetch(`${BASE}/protected/document`, { method: 'POST', headers: auth(), body: form });
const docId = (await up.json()).document.id;
const job = await fetch(`${BASE}/protected/job`, {
method: 'POST', headers: auth({ 'Content-Type': 'application/json' }),
body: JSON.stringify({ jobName: '', documents: [docId], enableBankMode: true })
});
const jobId = (await job.json()).id;
let status;
while ((status = (await fetch(`${BASE}/protected/job/${jobId}`, { headers: auth() }).then(r => r.json())).status) !== 'Succeeded') {
if (status === 'Failed') throw new Error('Job failed');
await new Promise(r => setTimeout(r, 2000));
}
const exp = await fetch(`${BASE}/protected/job/${jobId}/export`, {
method: 'POST', headers: auth({ 'Content-Type': 'application/json' }),
body: JSON.stringify({ jobType: 'FieldsToExcel1', flattenTables: true, format: 'json' })
});
const data = await exp.json();
console.log(data);Advanced usage
- Async & webhooks – Prefer webhooks over polling for job completion.
- Large files – Use presigned upload for big PDFs.
Use cases
- Lenders underwriting loans
- Forensic accountants and tax resolution
- Mortgage verification
- SaaS expense and cash flow analysis
- Risk scoring and fraud detection
DocuClipper vs alternatives
DocuClipper focuses on financial documents: bank statements, invoices, and tax forms, with forensic-ready output. Compare with Ocrolus, Veryfi, Nanonets, and Rossum for document-specific workflows and pricing.