Tool

Invoice Parsing API

Extract structured JSON from invoice PDFs and images using your schema.

Common Fields

  • vendor
  • customer
  • invoice number
  • invoice date
  • due date
  • line items

Best Fit

  • Accounts payable intake
  • ERP synchronization
  • Vendor invoice normalization

Try it with a sample invoice

Start from a preloaded invoice sample and schema, inspect the output, then move to your own documents when you are ready.

Document

sample-invoice.pdf

Add fields, nested object fields, and lists of objects to build your schema.

Example JSON output

The schema and sample document resolve to structured JSON you can send into accounting and operations workflows.

{
  "vendor": "Acme Industrial Supply",
  "customer": "Northwind Construction",
  "invoice_number": "INV-2026-0042",
  "invoice_date": "2026-01-15",
  "due_date": "2026-02-14",
  "subtotal": 1240,
  "tax": 111.6,
  "total": 1351.6
}

Use via API

Start with the same schema in code and move from sample documents to production traffic without changing the extraction surface.

cURL

bash
curl --request POST \
  --url https://api.structpdf.com/v1/extract \
  --header "Authorization: Bearer $STRUCTPDF_API_KEY" \
  --form "file=@sample-invoice.pdf" \
  --form 'schema={"type":"object","properties":{"vendor":{"type":"string","description":"Vendor or issuing company name"},"customer":{"type":"string","description":"Customer or billed company name"},"invoice_number":{"type":"string","description":"Invoice number or external reference"},"invoice_date":{"type":"string","description":"Invoice issue date"},"due_date":{"type":"string","description":"Invoice due date"},"subtotal":{"type":"number","description":"Subtotal before tax and fees"},"tax":{"type":"number","description":"Tax amount"},"total":{"type":"number","description":"Total amount due"}},"required":["vendor","customer","invoice_number","invoice_date","due_date","subtotal","tax","total"]}'

Node.js

typescript
import fs from 'node:fs';

const schema = {"type":"object","properties":{"vendor":{"type":"string","description":"Vendor or issuing company name"},"customer":{"type":"string","description":"Customer or billed company name"},"invoice_number":{"type":"string","description":"Invoice number or external reference"},"invoice_date":{"type":"string","description":"Invoice issue date"},"due_date":{"type":"string","description":"Invoice due date"},"subtotal":{"type":"number","description":"Subtotal before tax and fees"},"tax":{"type":"number","description":"Tax amount"},"total":{"type":"number","description":"Total amount due"}},"required":["vendor","customer","invoice_number","invoice_date","due_date","subtotal","tax","total"]};

const formData = new FormData();
formData.set('file', new Blob([fs.readFileSync('sample-invoice.pdf')]), 'sample-invoice.pdf');
formData.set('schema', JSON.stringify(schema));

const response = await fetch('https://api.structpdf.com/v1/extract', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.STRUCTPDF_API_KEY}`,
  },
  body: formData,
});

const data = await response.json();
console.log(data);

Best-fit Use Cases

Common fields extracted

  • vendor
  • customer
  • invoice number
  • invoice date
  • due date
  • line items
  • subtotal
  • tax
  • total
  • payment terms

Best-fit use cases

Accounts payable intake

Struct PDF API is a strong fit when you need to capture vendor, totals, dates, and line items consistently across recurring invoice formats.

ERP synchronization

Struct PDF gives you schema-shaped JSON that can be mapped directly into ERP import flows and downstream automations.

Vendor invoice normalization

Struct PDF is useful when multiple vendors send invoices in different formats but you need one consistent output shape. You define the target schema once and use it to normalize invoice data into the same fields across suppliers.