Invoice Parser API

Turn any invoice PDF or image into clean, structured JSON with one API call. Vendor, invoice number, dates, totals, tax, and line items — normalized and ready to use.

97%

97% field-level accuracy

across header fields on a 100-invoice benchmark

What it does

One POST request

Send a PDF, PNG, or JPG to a single endpoint and get back named fields, not raw text.

Built for line items

Get each row — description, quantity, unit price, and totals — not just the invoice header.

Normalized output

ISO dates, decimal amounts, and a consistent schema across every vendor's layout.

Live example

Sample document

  • Seller: Peterson LLC
  • Invoice #: 98852451
  • Date: 2019-09-02
  • 4 line items
  • Total: $4,151.23

Real output from the API — nothing hand-edited.

{
  "merchant": "Peterson LLC",
  "invoice_id": "98852451",
  "date": "2019-09-02",
  "currency": "USD",
  "subtotal": "3773.85",
  "tax": "377.38",
  "total": "4151.23",
  "confidence": 100,
  "line_items": [
    { "description": "New Design Rectangular Hand Woven Chindi Rag Rug", "quantity": "1", "unit_price": "29.99", "gross_amount": "32.99" },
    { "description": "Bedroom Decor Carpets Living Room Line Pattern Green Rug", "quantity": "1", "unit_price": "33.86", "gross_amount": "37.25" },
    { "description": "YILONG 2.5'x4' Small Hand Knotted Silk Carpets Antistatic Rug", "quantity": "1", "unit_price": "2000.00", "gross_amount": "2200.00" },
    { "description": "Moroccan Amazigh Handmade Carpet 14'2\" x 7'5\"", "quantity": "5", "unit_price": "342.00", "gross_amount": "1881.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 (vendor)
invoice_id
date
due_date
currency
subtotal
tax
total
line_items[] (description, quantity, unit_price, net_amount, vat_rate, 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