Receipt OCR API

Extract structured data from receipts — merchant, date, totals, tax, and line items — as clean JSON. Send a photo or PDF, get named fields back.

97%

97% field-level accuracy

on our invoice benchmark (header fields)

What it does

Photo or PDF

Send a scanned receipt or a phone photo and get structured fields back from one endpoint.

Totals that reconcile

Subtotal, tax, and total are checked against each other so the numbers add up.

Normalized output

ISO dates, decimal amounts, and a consistent schema you can rely on in code.

Live example

Sample document

  • Seller: Cooper-Fox
  • Invoice #: 32530472
  • Date: 2015-08-27
  • 1 line item
  • Total: $187.00

Real output from the API — nothing hand-edited.

{
  "merchant": "Cooper-Fox",
  "date": "2015-08-27",
  "currency": "USD",
  "subtotal": "170.00",
  "tax": "17.00",
  "total": "187.00",
  "confidence": 100,
  "line_items": [
    { "description": "Nintendo Gameboy Pocket Console Clear Purple with Box MGB-001", "quantity": "2", "unit_price": "85.00", "gross_amount": "187.00" }
  ]
}

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

merchant
date
currency
subtotal
tax
total
payment_method
line_items[] (description, quantity, unit_price, gross_amount)
How the extraction works
  1. Read — the document is converted to text with OCR (for images) or parsed directly (for digital PDFs).
  2. Parse — deterministic rules pull out each field and line item and normalize dates and amounts.
  3. Check — the result is scored for confidence: totals are reconciled (subtotal + tax = total), required fields are verified, and formats are validated.
  4. 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