API reference
Base URL: https://api.getparsed.com. All responses are JSON.
Authentication
Pass your API key as a bearer token on every request.
Authorization: Bearer sk_live_...
Get a key on the signup page. Keep it server-side; it carries your usage quota and billing. Requests without a valid key return 401.
Quickstart
Upload a file and name its type. doc_type is one of invoice, receipt, or bank_statement.
curl https://api.getparsed.com/v1/extract \
-H "Authorization: Bearer sk_live_..." \
-F "doc_type=invoice" \
-F "file=@invoice.pdf"
That returns a JSON response with the extracted data plus a fields object showing per-field confidence.
Extract structured data from one document. Accepts a multipart file upload or base64 in a JSON body. PDF, PNG, JPEG, WebP, and GIF are supported. Maximum 20 MB per file.
Parameters
| Field | Required | Description |
|---|---|---|
doc_type | Yes | invoice, receipt, or bank_statement. |
file | One of | The document, as a multipart file upload. |
file_base64 | One of | The document base64-encoded (JSON body). Requires media_type. |
media_type | With base64 | MIME type, e.g. application/pdf, image/jpeg. |
schema | No | A JSON Schema to override the default for this doc_type. |
Multipart example (invoice)
curl https://api.getparsed.com/v1/extract \
-H "Authorization: Bearer sk_live_..." \
-F "doc_type=invoice" \
-F "file=@invoice.pdf"
Multipart example (receipt)
curl https://api.getparsed.com/v1/extract \
-H "Authorization: Bearer sk_live_..." \
-F "doc_type=receipt" \
-F "file=@receipt.jpg"
Multipart example (bank statement)
curl https://api.getparsed.com/v1/extract \
-H "Authorization: Bearer sk_live_..." \
-F "doc_type=bank_statement" \
-F "file=@statement.pdf"
Base64 JSON example
curl https://api.getparsed.com/v1/extract \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"doc_type": "bank_statement",
"media_type": "application/pdf",
"file_base64": "'"$(base64 -i statement.pdf)"'"
}'
Response schema
Every extraction response has the same top-level shape.
{
"doc_type": "invoice",
"pages": 1,
"data": { ... }, // extracted fields
"fields": { // per-field metadata
"total": {
"confidence": 0.99,
"needs_review": false,
"source": "text" // "text" | "vision" | "derived"
},
"vendor": {
"confidence": 0.91,
"needs_review": false,
"source": "vision"
}
}
}
Field metadata
| Key | Type | Description |
|---|---|---|
confidence | float 0-1 | How confident the pipeline is in this field's value. |
needs_review | boolean | true when confidence is below the auto-accept threshold, or when code verification catches a discrepancy. Route these to a human. |
source | string | text: read directly from extracted text. vision: resolved from the image. derived: computed (e.g. a subtotal summed from line items). |
You can auto-accept fields where needs_review is false and route the rest to a review queue. This is the intended workflow for production.
Default field schemas
When no schema is provided, each document type returns these fields.
invoice
{
"vendor": "string",
"invoice_number": "string",
"date": "string (ISO 8601)",
"due_date": "string | null",
"line_items": [
{
"description": "string",
"quantity": "number",
"unit_price": "number",
"amount": "number"
}
],
"subtotal": "number",
"tax": "number",
"total": "number",
"currency": "string (ISO 4217)"
}
receipt
{
"merchant": "string",
"date": "string (ISO 8601)",
"items": [
{
"description": "string",
"quantity": "number",
"amount": "number"
}
],
"total": "number",
"tax": "number | null",
"payment_method": "string | null"
}
bank_statement
{
"account": "string",
"period": "string",
"opening_balance": "number",
"closing_balance": "number",
"transactions": [
{
"date": "string (ISO 8601)",
"description": "string",
"amount": "number", // negative = debit
"balance": "number | null"
}
]
}
Transaction amount is signed: negative for debits and withdrawals, positive for credits and deposits.
Custom schemas
Pass a JSON Schema as the schema parameter to override the default for that request. The model will only extract the fields you specify.
curl https://api.getparsed.com/v1/extract \
-H "Authorization: Bearer sk_live_..." \
-F "doc_type=invoice" \
-F "file=@invoice.pdf" \
-F 'schema={"type":"object","properties":{"total":{"type":"number"},"due_date":{"type":"string"}}}'
Reconciliation
Bank statement responses include a reconciliation block. The pipeline computes: opening balance plus the sum of all transaction amounts, then compares the result to the stated closing balance.
"reconciliation": {
"ok": true,
"computed_closing": 1150.00,
"stated_closing": 1150.00,
"difference": 0.00
}
ok is false when the difference exceeds one cent, or when a balance or transaction amount could not be read. Use it as a gate before trusting the extraction: a failed reconciliation means at least one value is likely wrong.
Returns the calling key's current-month page count and limit.
curl https://api.getparsed.com/v1/usage \
-H "Authorization: Bearer sk_live_..."
{
"plan": "free",
"month": "2026-11",
"pages": 12,
"requests": 9,
"limit": 100,
"remaining": 88
}
On paid plans, limit and remaining are null.
Errors
All error responses have the same shape:
{
"error": {
"type": "authentication_error",
"message": "Invalid API key."
}
}
| Status | type | When |
|---|---|---|
400 | invalid_request_error | Missing or invalid parameters. |
401 | authentication_error | Missing or invalid API key. |
402 | free_tier_exceeded | Free monthly page cap reached. Upgrade to continue. |
413 | request_too_large | File exceeds 20 MB. |
422 | unprocessable_document | File is too low quality or corrupt to extract from. |
429 | rate_limit_exceeded | Too many requests. Slow down and retry. |
502 | extraction_error | Extraction completed but could not produce valid JSON. |
Rate limits
Free tier: 10 requests per minute, 100 pages per month. Paid plans have higher limits and no monthly cap. The X-RateLimit-Remaining and X-RateLimit-Reset headers are included on every response.
Pricing
Start free. When you need more, pay by the page.
No credit card required.
- 100 pages per month
- All document types
- Per-field confidence scores
- Rate limit: 10 req/min
Per page. Beta pricing.
- No monthly page cap
- Invoices and receipts
- Bank statements (premium accuracy model)
- Higher rate limits
Invoices and receipts run on a fast model. Bank statements use a higher-accuracy model and include reconciliation. Paid pricing is in beta and billed through Stripe.