Invoice Data Extraction API

Turn invoice PDFs into structured JSON — vendor, invoice number, dates, line items, totals — in one API call. No templates, no manual field mapping.

Get Free API Key → API Docs
95%+ accuracy
<2s avg parse
10 free docs/mo

What gets extracted from an invoice

Returned as clean JSON, with a confidence score, in one API call.

✓

vendor_name

Who issued the invoice.

✓

invoice_number

The invoice’s own reference number.

✓

invoice_date / due_date

When it was issued and when payment is due.

✓

total_amount / currency

The amount due, with currency.

✓

tax / subtotal

Tax and pre-tax subtotal, when stated.

✓

line_items

Array of {description, quantity, unit_price, amount} for every line on the invoice.

One API call

No SDK required — plain REST, works from any language.

bash
# 1. Register to get your free API key
curl -X POST https://ai2json.com/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"YourPass123"}'

# 2. Parse an invoice PDF
curl -X POST https://ai2json.com/api/v1/parse/document \
  -H "Authorization: Bearer $TOKEN" \
  -F "[email protected]"

# 3. Get structured JSON back
# {"doc_type":"invoice","confidence":0.98,"fields":{
#   "vendor_name":"Acme Supplies","invoice_number":"INV-2041",
#   "invoice_date":"2026-09-02","due_date":"2026-10-02",
#   "total_amount":1240.50,"currency":"USD",
#   "line_items":[{"description":"Widgets","quantity":40,"unit_price":28,"amount":1120}],
#   "tax":120.50,"subtotal":1120}}

Simple, transparent pricing

Start free. Upgrade when you need more.

Free

$0/mo
10 docs/month
  • All document types
  • Structured JSON output
  • API key access
Get Started

Pro

$29/mo
2,000 docs/month
  • Everything in Starter
  • Batch processing
  • Custom AI prompts
Subscribe

Business

$99/mo
10,000 docs/month
  • Everything in Pro
  • Dedicated support
Subscribe

Frequently Asked Questions

Vendor name, invoice number, invoice date, due date, total amount, currency, tax, subtotal, and a line-items array (description, quantity, unit price, amount) for each item on the invoice.
No. The AI reads the document's text and maps it to the fields above regardless of layout — there's no template builder or field-mapping step to configure.
The API reads the PDF's actual text layer and sends it to the AI model as-is, so non-English invoices are processed too. Extraction quality depends on how clearly the source text maps to the fields above, same as for English invoices.
Not yet. AI2JSON reads the text layer of a PDF directly — scanned or image-based invoices without a text layer aren't supported on any tier. OCR is on the roadmap.
Files up to 10MB are accepted. Very long or text-dense PDFs may have their text truncated before processing — this is rarely an issue for typical one-to-few-page invoices, but an invoice with an unusually large number of line items on many pages could be affected.

Ready to try it on your own documents?

Get your API key and parse your first document in under a minute.

Get Free API Key →