Invoice parsing

Convert Invoices to JSON

Upload an invoice PDF and receive a structured JSON object with vendor, invoice ID, due date, total, tax, currency, and line items. One endpoint. No custom parser needed. Rule-based parsing reads every field, then an AI model checks the result and corrects what it finds wrong before you get it.

20 documents a month free, with full API access. No credit card. Webhooks on Starter and Pro.

JSON structure

Invoice data as structured JSON

Every field your accounting or automation workflow needs — returned as named JSON properties

merchant
Vendor or company name
invoice_id
Invoice reference number
document_id
Document identifier
date
Invoice issue date
due_date
Payment due date
total
Total amount due
subtotal
Pre-tax subtotal
tax
Tax amount
currency
ISO 3-letter code
payment_method
Payment type if stated
merchant_email
Vendor email if present
merchant_address
Vendor address if present
line_items
Services or products billed

Invoice file → JSON object

Send the invoice. Receive structured data. No regex, no layout detection, no custom parser to maintain.

Before — invoice file

EXAMPLE SOFTWARE LLC
invoice@example.com
Invoice #: INV-2026-1042
Invoice Date: 05/10/2026
Due Date: 06/10/2026
Monthly software subscription x1
Subtotal: $500.00
Tax (10%): $50.00
Total Due: $550.00

After — JSON response

{
  "document_type": "invoice",
  "document_number": "31293737",
  "invoice_id": "31293737",
  "receipt_id": null,
  "date": "2020-12-15",
  "due_date": null,
  "currency": "USD",
  "merchant": "Nunez Inc",
  "merchant_address": "6551 Janet Gardens, Michaelberg, KS 90952",
  "merchant_email": null,
  "customer": "Alvarez Inc",
  "subtotal": "371.51",
  "tax": "37.15",
  "tax_rate": "10.00",
  "discount": null,
  "shipping": null,
  "total": "408.66",
  "payment_method": null,
  "notes": null,
  "line_items": [
    {
      "description": "Women's black cocktail dress, size 4",
      "quantity": 3,
      "price": "19.99",
      "line_total": "59.97",
      "vat_rate": "10.00"
    },
    {
      "description": "Christmas Dress Grace Karin Sleeveless Christmas dress Red Black size Large",
      "quantity": 1,
      "price": "9.99",
      "line_total": "9.99",
      "vat_rate": "10.00"
    },
    {
      "description": "Windsor womens black and Pink Bodycon Sleeveless Dress, Womens Size Small",
      "quantity": 1,
      "price": "15.83",
      "line_total": "15.83",
      "vat_rate": "10.00"
    },
    {
      "description": "Lumiere Large Multicolored Orange Short Dress NWT",
      "quantity": 4,
      "price": "4.99",
      "line_total": "19.96",
      "vat_rate": "10.00"
    },
    {
      "description": "Xhilaration Womens L Burgandy Boho Embroidered Festival Mini Dress NEW",
      "quantity": 4,
      "price": "14.95",
      "line_total": "59.80",
      "vat_rate": "10.00"
    },
    {
      "description": "Johnny Was Medium Linen Wrap Dress Dessert Rose Embroiderd Bohemian",
      "quantity": 2,
      "price": "89.99",
      "line_total": "179.98",
      "vat_rate": "10.00"
    },
    {
      "description": "Pre-Owned Women's Nah Nah Dress Size 8 Black Sheer Formal Sexy",
      "quantity": 2,
      "price": "12.99",
      "line_total": "25.98",
      "vat_rate": "10.00"
    }
  ]
}

Request

# 1. Submit the document
curl -X POST https://docuparseapi.com/api/v1/extract \
  -H "Authorization: Bearer $DOCUPARSE_API_KEY" \
  -F "file=@invoice.pdf"
# → {"success": true, "document_id": "<id>", "status": "queued"}

# 2. Fetch the result (repeat until "status" is "completed" or "failed")
curl https://docuparseapi.com/api/v1/documents/<id> \
  -H "Authorization: Bearer $DOCUPARSE_API_KEY"

Response

Real output from the API — nothing hand-edited. The data object returned by GET /api/v1/documents/{id}.

{
  "document_type": "invoice",
  "document_number": "31293737",
  "invoice_id": "31293737",
  "receipt_id": null,
  "date": "2020-12-15",
  "due_date": null,
  "currency": "USD",
  "merchant": "Nunez Inc",
  "merchant_address": "6551 Janet Gardens, Michaelberg, KS 90952",
  "merchant_email": null,
  "customer": "Alvarez Inc",
  "subtotal": "371.51",
  "tax": "37.15",
  "tax_rate": "10.00",
  "discount": null,
  "shipping": null,
  "total": "408.66",
  "payment_method": null,
  "notes": null,
  "line_items": [
    {
      "description": "Women's black cocktail dress, size 4",
      "quantity": 3,
      "price": "19.99",
      "line_total": "59.97",
      "vat_rate": "10.00"
    },
    {
      "description": "Christmas Dress Grace Karin Sleeveless Christmas dress Red Black size Large",
      "quantity": 1,
      "price": "9.99",
      "line_total": "9.99",
      "vat_rate": "10.00"
    },
    {
      "description": "Windsor womens black and Pink Bodycon Sleeveless Dress, Womens Size Small",
      "quantity": 1,
      "price": "15.83",
      "line_total": "15.83",
      "vat_rate": "10.00"
    },
    {
      "description": "Lumiere Large Multicolored Orange Short Dress NWT",
      "quantity": 4,
      "price": "4.99",
      "line_total": "19.96",
      "vat_rate": "10.00"
    },
    {
      "description": "Xhilaration Womens L Burgandy Boho Embroidered Festival Mini Dress NEW",
      "quantity": 4,
      "price": "14.95",
      "line_total": "59.80",
      "vat_rate": "10.00"
    },
    {
      "description": "Johnny Was Medium Linen Wrap Dress Dessert Rose Embroiderd Bohemian",
      "quantity": 2,
      "price": "89.99",
      "line_total": "179.98",
      "vat_rate": "10.00"
    },
    {
      "description": "Pre-Owned Women's Nah Nah Dress Size 8 Black Sheer Formal Sexy",
      "quantity": 2,
      "price": "12.99",
      "line_total": "25.98",
      "vat_rate": "10.00"
    }
  ]
}

FAQ

Frequently asked questions

What invoice formats does DocuParse API accept?

+
DocuParse API accepts PDF, JPG, PNG, and CSV files. Both digital invoices and scanned paper invoices are supported.

What JSON fields are returned for an invoice?

+
The response includes merchant, invoice_id, document_id, date, due_date, total, subtotal, tax, currency, payment_method, merchant_email, merchant_address, and line_items, plus confidence and needs_review.

Does it work with scanned invoice images?

+
Yes. DocuParse API handles scanned invoice images automatically. The extraction returns the same named fields regardless of scan quality.

Are line items returned for every invoice?

+
Line items are extracted when they are present on the invoice. The line_items array includes description, quantity, and amount for each line entry found.

Can I use the extracted JSON in my accounting workflow?

+
Yes. The structured JSON fields — invoice ID, vendor, due date, total, tax, and line items — map directly to the data your accounting software or automation workflow needs.

How do I authenticate requests?

+
Use an API key in the Authorization header as a Bearer token. Generate your API key from the DocuParse API dashboard after signing up.

How long can a document be?

+
Every document includes up to 10 pages. A 10-page invoice counts as one document, the same as a one-page receipt. A document of 11 to 20 pages counts as two documents.

Start converting invoices to JSON

20 documents a month free, with full API access. No credit card. Webhooks on Starter and Pro.