POST /api/v1/invoice
Invoice data extraction.
Instant. Structured.
Send an invoice or receipt — image or PDF — and get back vendor, customer, line items, tax, totals, and payment terms as structured JSON. No templates. No training.
How it works
Send an invoice
Upload a PDF, image, or photo of a receipt. Scans work too.
AI reads it
Vendor, customer, line items, tax rates, dates, currency — all detected.
Get JSON instantly
Synchronous response. No polling needed. Typically under 5 seconds.
# Extract invoice data (synchronous — no polling needed)
curl -X POST https://api.contexa.works/api/v1/invoice \
-H "x-rapidapi-key: YOUR_KEY" \
-F "file=@invoice.pdf"
# Returns immediately:
# {
# "data": {
# "invoiceNumber": "INV-2025-0042",
# "vendor": { "name": "Acme Corp", "taxId": "DE123456789" },
# "lineItems": [
# { "description": "Consulting", "quantity": 10,
# "unitPrice": 150, "amount": 1500 }
# ],
# "total": 1785, "currency": "EUR",
# "taxRate": 19, "taxAmount": 285
# }
# }What sets it apart
Synchronous
No job queue. No polling. Send the invoice, get the result. Typically under 5 seconds.
Scanned documents
Works on photos, scans, and images — not just text-based PDFs.
Date format detection
Detects US/UK/EU date formats from currency, addresses, and spelling clues.
Line item extraction
Description, quantity, unit price, and amount for every line item.
Tax handling
Tax rate, tax amount, subtotal, and total extracted and calculated.
Custom prompts
Add instructions to customize extraction — "amounts in USD", "include PO number".
Process your first invoice
Upload an invoice in the playground. Structured data in seconds. No signup.
Try it now