Document Extraction API
One endpoint that turns invoices, receipts, and other business documents into structured JSON. Send a file, get named fields and line items back.
97% field-level accuracy
across header fields on a 100-invoice benchmark
What it does
One API, many documents
Invoices and receipts through a single endpoint with a consistent response shape.
Structured, not raw text
Named fields and line items you can use directly — no post-processing of OCR text.
Confidence on every result
Each response includes a confidence score so you know what to trust and what to review.
Looking for a specific document type? See the Invoice Parser API and the Receipt OCR API.
Live example
Sample document
- Seller: Green-Snow
- Invoice #: 72024579
- Date: 2021-01-25
- 7 line items
- Total: $179.75
Real output from the API — nothing hand-edited.
{
"merchant": "Green-Snow",
"invoice_id": "72024579",
"date": "2021-01-25",
"currency": "USD",
"subtotal": "163.41",
"tax": "16.34",
"total": "179.75",
"confidence": 100,
"line_items": [
{ "description": "Refinery Wine Opener", "quantity": "1", "unit_price": "10.00", "gross_amount": "11.00" },
{ "description": "Wine Rack", "quantity": "1", "unit_price": "9.00", "gross_amount": "9.90" },
{ "description": "a pair of wine glasses drawer", "quantity": "5", "unit_price": "7.30", "gross_amount": "40.15" },
{ "description": "THE ORIGINAL NIB WINE-DOWN REDNEK 16 oz. Wine Glass x2", "quantity": "1", "unit_price": "14.99", "gross_amount": "16.49" },
{ "description": "Wall Mounted Upside Down Wine Bottle Rack Goblet Glass Holder", "quantity": "1", "unit_price": "14.98", "gross_amount": "16.48" },
{ "description": "HOME ESSENTIALS Gradient Stemless Wine Glasses Set of 4", "quantity": "4", "unit_price": "12.99", "gross_amount": "57.16" },
{ "description": "White Wine Brewing + Red Wine Brewing Active Dry Wine Yeast 2 Packs", "quantity": "2", "unit_price": "12.99", "gross_amount": "28.58" }
]
}One request. Structured JSON back.
curl -X POST https://docuparseapi.com/api/v1/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@invoice.pdf"Try it on your own document
Upload an invoice or receipt and see the structured JSON. No signup needed.
Try DocuParseAPI — Upload a Document, Get Structured JSON
Drop your receipt or invoice here
or
PDF, JPG, or PNG · Max 5MB · One document
Demo uploads are limited to 5 MB. Sign in to upload documents up to 10 MB.
Or try a sample: Sample receipt · Sample invoice
Trusted by developers worldwide to automate document workflows.
{
"success": true,
"status": "processing",
"data": {
"merchant": "...",
"total": "..."
}
}Fields returned
merchantinvoice_iddatecurrencysubtotaltaxtotalconfidenceline_items[]How the extraction works
- Read — the document is converted to text with OCR (for images) or parsed directly (for digital PDFs).
- Parse — deterministic rules pull out each field and line item and normalize dates and amounts.
- Check — the result is scored for confidence: totals are reconciled (subtotal + tax = total), required fields are verified, and formats are validated.
- Review — if confidence is below 100, the document is sent for a second pass by an AI model that re-checks only the uncertain fields. High-confidence results skip this step entirely.
Every response includes a confidence score and a needs_review flag, so you always know which results to trust and which to double-check.
Start extracting in minutes
20 documents a month, free. Full API access. No credit card required.
Start for Free — No Credit Card