API Documentation
Parse medical bill documents programmatically with our simple REST API.
/api/extract are rejected with a 402.Include your API key in the Authorization header:
curl -X POST https://medicalbillparser.com/api/extract \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@document.pdf"
Or pass it in the X-Api-Key header:
curl -X POST https://medicalbillparser.com/api/extract \ -H "X-Api-Key: YOUR_API_KEY" \ -F "file=@document.pdf"
Get your API key from the Dashboard. Every /api/extract request must include a valid key — unauthenticated requests are rejected with a 402. Sign up free to get a key and 3 free documents. (The playground returns pre-canned sample data without a key, for previewing the output shape only.)
Request
Content-Type: multipart/form-data
| Parameter | Type | Description |
|---|---|---|
file | File | PDF, PNG, JPG, or WebP (max 4.5MB) |
Example Request
curl -X POST https://medicalbillparser.com/api/extract \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@hospital-bill.pdf"
Example Response
{
"success": true,
"docType": "medical_bill",
"siteName": "Medical Bill Parser",
"data": {
"provider_name": "Regional Medical Center",
"patient_name": "Jane Doe",
"account_number": "ACCT-789012",
"statement_date": "2026-01-20",
"service_date": "2026-01-05",
"total_charges": 4500,
"insurance_adjustments": 2800,
"insurance_payments": 1200,
"patient_balance": 500,
"due_date": "2026-02-20"
},
"confidence": 0.95,
"processingTimeMs": 2340
}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": "medical_bill",
"totalFiles": 5,
"successful": 4,
"failed": 1,
"results": [
{
"filename": "hospital-bill.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.
| Code | Description |
|---|---|
200 | Success - document parsed |
400 | Bad request - invalid file or missing parameters |
401 | Unauthorized - invalid or missing API key |
402 | Unauthenticated - no API key provided. Sign up (free) to get a key and 3 free documents |
429 | Rate limit exceeded, or authenticated quota exhausted (no credits/monthly documents remaining) - wait and retry or upgrade |
500 | Server error - extraction failed |
- Authenticated users: 60 requests per minute (API keys also allow bursts of up to 20 requests per 10 seconds)
- Enterprise: Contact us for higher limits
When a rate limit or quota is hit, responses include a Retry-After header indicating how many seconds to wait before retrying.