API Documentation
Use this guide to integrate the Bank Statement Parser REST API into your application.
Quick Start
1. Create a free account and get your API key.
Start FreeAuthentication
Use one of the following methods in every request:
Bearer JWT
Authorization: Bearer <your_jwt_token>API Key
X-Api-Key: pex_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxExtract PDF
POST
/extractUpload a PDF and receive the transaction list as JSON or CSV. Accepts file upload or URL.
Form Fields
| Field | Type | Description |
|---|---|---|
| file | File | PDF file (max 10 MB) |
| url | string | PDF URL (alternative to file) |
| webhookUrl | string | URL called when processing completes |
| format | string | Output format: json (default) or csv |
cURL Example
curl -X POST https://api.bank-statement-parser.clkr.work/extract \ -H "X-Api-Key: pex_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -F "file=@statement.pdf"
200Success — known format
{
"requestId": "3fa85f64-...",
"isSuccess": true,
"messages": [],
"errors": [],
"data": {
"bankKey": "garantibbva_v1",
"bankName": "Garanti BBVA",
"totalPages": 2,
"transactionCount": 45,
"transactions": [
{ "date": "2024-01-15", "desc": "Market Alışveriş", "amount": "-250.00", "balance": "4750.00" }
]
}
}202Queued — unknown format
{
"queueId": "a1b2c3d4-...",
"status": "queued",
"message": "Unknown PDF format. Queued for profile generation."
}Extract from OCR Text
Send raw text extracted by your own OCR engine. Parse transactions without uploading a PDF.
POST
/extract-textJSON Body
| Field | Type | Description |
|---|---|---|
| rawText * | string | Raw OCR-extracted text (max 500 KB) |
| fileName | string | Optional file name hint |
| webhookUrl | string | URL called when processing completes |
| format | string | json (default) or csv |
cURL Example
curl -X POST https://api.bank-statement-parser.clkr.work/extract-text \
-H "X-Api-Key: pex_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"rawText": "01.01.2024 Market -250,00 4.750,00\n..."}'Rate Limits
| Rule | Limit |
|---|---|
| Demo (no API key) — per IP per day | 5 req/day |
| /api/auth/* | 5 req/min |
| /extract, /extract-text | 20 req/min |
| Other endpoints | 100 req/min |
Changelog
v3.1.02026-06-10
- + OCR text extraction endpoint (/extract-text)
- + JSON/CSV output format selection
- + Unified ApiResult wrapper (requestId, isSuccess, data)
- + Localized error messages (TR/EN)
- + Demo limit: 5 req/IP/day
- + Profiles now stored in PostgreSQL (DB primary, files as backup)
- + Central exception handling middleware
v3.0.02026-05-20
- + Auth system added (JWT + API key)
- + Usage tracking and logging
- + Rate limiting (auth/extract/global)
- + CORS security
v2.0.02026-05-01
- + Unknown format queue
- + Automatic profile learning
- + Webhook support