← Back to home

BankXL API

A simple REST API to convert bank statement PDFs into structured data. Available on the Firm plan.

AuthenticationEndpointsResponseErrorsRate limits

Authentication

All API requests require an API key. Find yours in your dashboard after upgrading to Firm.

Pass it as a Bearer token:

Authorization: Bearer bxl_a1b2c3d4...

Or as an x-api-key header:

x-api-key: bxl_a1b2c3d4...

Endpoints

POST /api/v1/convert

Convert a bank statement PDF to structured data.

Query parameters

format    json | excel | csv | tally    (default: json)

Request body

Two ways to send a PDF:

1. multipart/form-data with field name pdf:

curl -X POST "https://banlxlai.com/api/v1/convert?format=json" \
  -H "Authorization: Bearer bxl_YOUR_KEY" \
  -F "pdf=@statement.pdf"

2. Raw PDF as request body:

curl -X POST "https://banlxlai.com/api/v1/convert?format=excel" \
  -H "Authorization: Bearer bxl_YOUR_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @statement.pdf \
  -o statement.xlsx

Response (format=json)

{
  "meta": {
    "bank_name": "HDFC Bank",
    "account_holder": "John Doe",
    "account_no": "50100123456789",
    "ifsc": "HDFC0001234",
    "period_from": "2025-04-01",
    "period_to": "2025-04-30",
    "opening_balance": 12500.00,
    "closing_balance": 18750.50,
    "currency": "INR"
  },
  "transactions": [
    {
      "date": "2025-04-03",
      "description": "UPI/CRED CLUB/Payment",
      "debit": 2500.00,
      "credit": null,
      "balance": 10000.00,
      "ref_no": "UPI/123456789012"
    }
    // ...
  ],
  "processing_time_ms": 13420
}

SDK examples

Python (requests):

import requests

with open("statement.pdf", "rb") as f:
    r = requests.post(
        "https://banlxlai.com/api/v1/convert?format=json",
        headers={"Authorization": "Bearer bxl_YOUR_KEY"},
        files={"pdf": f}
    )
data = r.json()
print(f"Found {len(data['transactions'])} transactions")

Node.js (fetch):

import fs from 'node:fs'

const file = fs.readFileSync('statement.pdf')
const r = await fetch('https://banlxlai.com/api/v1/convert?format=json', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer bxl_YOUR_KEY',
    'Content-Type': 'application/pdf',
  },
  body: file,
})
const data = await r.json()
console.log(`${data.transactions.length} transactions extracted`)

Errors

401  Missing or invalid API key
403  Account is not on Firm plan
400  Invalid PDF or missing file
422  No transactions detected (not a bank statement?)
429  Rate limited
500  Extraction failed (will return error message)

Rate limits

Firm plan: 10 requests / minute. Need more? Email support@banlxlai.com to upgrade.

Get your API key

Upgrade to the Firm plan and your API key appears in the dashboard immediately.

See pricing →