API Documentation
Parse receipt 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://receiptextractor.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 receipt document and extract structured data
Request
Content-Type: multipart/form-data
| Parameter | Type | Description |
|---|---|---|
file | File | PDF, PNG, JPG, or WebP (max 10MB) |
Example Request
curl -X POST https://receiptextractor.com/api/extract \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@receipt.jpg"
Example Response
{
"success": true,
"docType": "receipt",
"siteName": "Receipt Extractor",
"data": {
"merchant_name": "Whole Foods Market",
"merchant_address": "1001 K Street, Sacramento, CA",
"date": "2026-01-15",
"time": "14:32",
"subtotal": 87.45,
"tax": 7.65,
"total": 95.1,
"payment_method": "Visa *1234",
"items": [
{
"name": "Organic Bananas",
"quantity": 1,
"price": 2.99
},
{
"name": "Almond Milk",
"quantity": 2,
"price": 8.98
}
]
},
"confidence": 0.95,
"processingTimeMs": 2340
}POST /api/extract/batch
Parse multiple documents at once
Request
Content-Type: multipart/form-data
| Parameter | Type | Description |
|---|---|---|
files | File[] | Multiple files (max 20) or a ZIP archive (max 100 files) |
Example Response
{
"success": true,
"docType": "receipt",
"totalFiles": 5,
"successful": 4,
"failed": 1,
"results": [
{
"filename": "receipt.jpg",
"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
| Code | Description |
|---|---|
200 | Success - document parsed |
400 | Bad request - invalid file or missing parameters |
401 | Unauthorized - invalid or missing API key |
402 | Payment required - no credits remaining |
429 | Rate limit exceeded - wait and retry |
500 | Server 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