API Documentation

Parse bank statement documents programmatically with our simple REST API.

Authentication
All API requests require an API key

Include your API key in the Authorization header:

curl -X POST https://statementocr.com/api/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf"

Get your API key from the Dashboard.

POST /api/extract
Parse a bank statement document and extract structured data

Request

Content-Type: multipart/form-data

ParameterTypeDescription
fileFilePDF, PNG, JPG, or WebP (max 4.5MB)

Example Request

curl -X POST https://statementocr.com/api/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@chase-statement.pdf"

Example Response

{
  "success": true,
  "docType": "bank_statement",
  "siteName": "Statement OCR",
  "data": {
    "bank_name": "Chase Bank",
    "account_number_last4": "4567",
    "account_type": "checking",
    "statement_period_start": "2026-01-01",
    "statement_period_end": "2026-01-31",
    "beginning_balance": 12500,
    "ending_balance": 15750,
    "total_deposits": 8500,
    "total_withdrawals": 5250,
    "transaction_count": 47
  },
  "confidence": 0.95,
  "processingTimeMs": 2340
}
POST /api/extract/batch
Parse multiple documents at once

Request

Content-Type: multipart/form-data

ParameterTypeDescription
filesFile[]Multiple files (max 20) or a ZIP archive (max 100 files)

Example Response

{
  "success": true,
  "docType": "bank_statement",
  "totalFiles": 5,
  "successful": 4,
  "failed": 1,
  "results": [
    {
      "filename": "chase-statement.pdf",
      "success": true,
      "data": {
        "...": "..."
      },
      "confidence": 0.95,
      "processingTimeMs": 2100
    },
    {
      "filename": "corrupted.pdf",
      "success": false,
      "error": "Could not parse PDF"
    }
  ],
  "totalProcessingTimeMs": 8500
}

Batch processing runs files in parallel (10 at a time) for faster throughput. ZIP files are automatically extracted.

Response Codes
CodeDescription
200Success - document parsed
400Bad request - invalid file or missing parameters
401Unauthorized - invalid or missing API key
402Payment required - no credits remaining
429Rate limit exceeded - wait and retry
500Server error - extraction failed
Rate Limits
  • Demo (unauthenticated): 5 requests per minute
  • Authenticated users: 60 requests per minute
  • Enterprise: Contact us for higher limits

Rate limit headers are included in responses: X-RateLimit-Remaining and Retry-After

Ready to get started?