Bank Statement JSON API for Developers

In this guide

  1. API overview
  2. Authentication
  3. Upload & extract endpoint
  4. JSON response structure
  5. Code examples
  6. Use cases
  7. FAQ

API Overview

The Bank Statement Engine API lets you submit a bank statement PDF and receive structured JSON containing all extracted transactions, account metadata, and balance verification results. It's a single REST endpoint — upload a PDF, get back JSON.

The API uses the same extraction engine as the web interface, including bank-specific parsers for 10,000+ banks, OCR for scanned PDFs, and arithmetic balance verification. JSON output is normalised across all banks — same field names regardless of whether the source was an HDFC statement or a Barclays statement.

Authentication

All API requests require an API key passed in the X-API-Key header. Get your key at bankstatementengine.com/api — there's a free tier available with no credit card required.

Base URL: https://bankstatementengine.com/api/v1

Upload & Extract Endpoint

PropertyValue
MethodPOST
Endpoint/api/v1/convert
Content-Typemultipart/form-data

Form fields:

FieldTypeRequiredDescription
fileFileYesThe bank statement PDF
passwordStringNoPDF password if encrypted
formatStringNojson (default), csv, excel

JSON Response Structure

A successful extraction returns HTTP 200 with the following JSON structure:

JSON
{
  "status": "success",
  "meta": {
    "bank_name": "HDFC Bank",
    "account_number": "XXXX1234",
    "statement_period": {
      "from": "2026-01-01",
      "to": "2026-03-31"
    },
    "currency": "INR",
    "opening_balance": 12500.00,
    "closing_balance": 8743.25,
    "total_pages": 4,
    "transaction_count": 87,
    "balance_verified": true
  },
  "transactions": [
    {
      "date": "2026-01-03",
      "description": "UPI/NEFT TO AMAZON",
      "debit": 1299.00,
      "credit": null,
      "balance": 11201.00,
      "reference": "N26010300123456"
    },
    {
      "date": "2026-01-05",
      "description": "SALARY CREDIT",
      "debit": null,
      "credit": 55000.00,
      "balance": 66201.00,
      "reference": "CR26010500654321"
    }
  ]
}

The balance_verified field is true when the running balance chain is arithmetically consistent across all extracted transactions. A false value indicates OCR or extraction uncertainty in at least one balance figure.

Code Examples

cURL

cURL
curl -X POST https://bankstatementengine.com/api/v1/convert \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@/path/to/statement.pdf" \
  -F "format=json"

Python (requests)

Python
import requests

API_KEY = "YOUR_API_KEY"
PDF_PATH = "hdfc_statement.pdf"

with open(PDF_PATH, "rb") as f:
    response = requests.post(
        "https://bankstatementengine.com/api/v1/convert",
        headers={"X-API-Key": API_KEY},
        files={"file": f},
        data={"format": "json"}
    )

data = response.json()
transactions = data["transactions"]

for txn in transactions:
    print(txn["date"], txn["description"], txn["debit"] or txn["credit"])

Node.js (fetch + FormData)

Node.js
import fs from "fs";
import FormData from "form-data";
import fetch from "node-fetch";

const form = new FormData();
form.append("file", fs.createReadStream("statement.pdf"));
form.append("format", "json");

const res = await fetch("https://bankstatementengine.com/api/v1/convert", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", ...form.getHeaders() },
  body: form,
});

const { transactions, meta } = await res.json();
console.log(`Extracted ${transactions.length} transactions from ${meta.bank_name}`);

Password-protected PDF

Python
with open("icici_encrypted.pdf", "rb") as f:
    response = requests.post(
        "https://bankstatementengine.com/api/v1/convert",
        headers={"X-API-Key": API_KEY},
        files={"file": f},
        data={"format": "json", "password": "JOHN01011990"}
    )
print(response.json()["meta"]["balance_verified"])

Common Use Cases

Get Your API Key

Free tier available. No credit card required.

View API Docs →

Frequently Asked Questions

What are the API rate limits?

The free tier allows 50 requests/month. Paid plans start from 500 requests/month. Contact us for volume pricing on high-throughput integrations.

How long does processing take?

Digital PDFs: 1–5 seconds. Scanned PDFs requiring OCR: 5–30 seconds depending on page count. The API is synchronous — it holds the connection open until processing completes.

What happens if the bank isn't recognised?

The API falls back to a generic table-extraction algorithm. Results may be less accurate than for explicitly supported banks. The meta.bank_name field will contain "Unknown" in this case.

Is the API GDPR / data privacy compliant?

Submitted files are processed in memory and not retained beyond 24 hours. We do not use customer data for model training. A DPA (Data Processing Agreement) is available for enterprise customers.

Can I test without an API key?

Use the web interface at bankstatementengine.com for free testing without an API key. The web interface uses the same extraction engine as the API.

Related: API Documentation · Bank Statement Analysis API · Bank Statement API