PDF Extraction & Parsing

PDF to JSON API

Convert business PDFs into structured JSON. Send a PDF to the API and receive extracted fields ready for dashboards, databases, automations, and internal tools. Built for receipts, invoices, and business documents. 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.

Simple by design

PDF in, JSON out

One endpoint replaces an entire document processing pipeline. Send your PDF file. Receive structured JSON with the fields your application needs — merchants, totals, dates, currencies, IDs, and line items.

Standard REST API — works with any HTTP client
Structured JSON — ready for your database
Handles difficult or scanned documents automatically

Flow

1
Upload PDF file
POST /api/v1/extract with your file
2
Extraction runs
Fields detected and normalized
3
Receive JSON
Structured response with named fields

Supported document data

Fields extracted from receipts, invoices, and business PDFs

Totals and subtotals
Final and pre-tax amounts
Tax amount
Tax charged on the document
Dates
Transaction and due dates
Merchant / vendor
Company or store name
Invoice ID
Invoice reference number
Receipt ID
Receipt identifier
Currency
ISO 3-letter currency code
Line items
Individual line entries
Field coverage
Per-field coverage

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"
    }
  ]
}
Common use cases

Common PDF extraction use cases

Built for real workflows, not demo apps. Use extracted JSON inside your product, dashboard, automation, or backend system.

E

Expense tracking

Parse receipt PDFs into expense entries without manual data entry.

I

Invoice automation

Extract invoice data from PDF files to drive approval and payment workflows.

I

Internal admin dashboards

Process business document uploads and display structured records.

S

SaaS document ingestion

Accept PDF uploads from your users and store extracted JSON in your database.

B

Bookkeeping workflows

Map extracted document fields to accounting software entries automatically.

R

Receipt and payment records

Archive payment records as structured data indexed by merchant, date, and amount.

Why structured extraction beats raw text extraction

Raw OCR gives you text. DocuParse API returns useful fields your application can actually use — without writing a parser.

FeatureRaw OCRManual entryDocuParse API
Returns structured JSON——✓
Extracts totals and dates—✓✓
Extracts merchant / vendor—✓✓
Supports API workflows——✓
Useful for automation——✓
Reduces manual review——✓

FAQ

Frequently asked questions

What is a PDF to JSON API?

+
A PDF to JSON API accepts PDF files and returns structured JSON with named fields extracted from the document content — totals, dates, merchants, IDs, currencies, and line items — rather than raw text.

Can it parse receipts and invoices?

+
Yes. DocuParse API is built for receipts, invoices, and business documents. It extracts named fields specific to these document types.

Does it return raw text or structured fields?

+
Structured fields. You receive a JSON object with named properties like merchant, total, date, currency, and line_items — not a wall of raw text to parse yourself.

Can I use it in Node.js or Python?

+
Yes. The API is a standard REST endpoint. Any HTTP client works. The docs include copy-paste examples for cURL, Node.js, and Python.

Can it process scanned PDFs?

+
Yes. DocuParse API handles scanned PDFs. The extraction runs automatically regardless of scan quality and returns the same named fields.

How do I authenticate requests?

+
Use an API key in the Authorization header as a Bearer token. Generate your API key from the 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 extracting from PDFs today

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