API

Session-auth beta — bearer API keys not available yet

Invoice OCR API

REST endpoint for invoice OCR — digital PDFs, scans, and phone photos. Returns the same typed JSON schema as the invoice extractor. Currently session-auth beta: sign in via the app and pass your session cookie — bearer API keys are not available yet.

Prefer the browser? Try the free invoice extractor. API access requires a paid plan.

Quick start

# Session-auth beta — sign in at extractfox.com first, then:
curl -X POST https://extractfox.com/api/extract \
  -H "Cookie: <your session cookie from the browser>" \
  -F "file=@invoice.pdf" \
  -F "mode=prebuilt" \
  -F "schemaId=invoice"

Example response

{
  "result": {
    "vendor": "Acme Supplies Ltd.",
    "invoice_number": "INV-00284",
    "issue_date": "2026-04-12",
    "due_date": "2026-05-12",
    "currency": "USD",
    "line_items": [
      {
        "description": "A4 paper, 80gsm",
        "quantity": 12,
        "unit_price": 4.5,
        "amount": 54.0
      }
    ],
    "subtotal": 232.0,
    "tax": 46.4,
    "total": 278.4
  },
  "quota": { "used": 1, "limit": 300, "remaining": 299, "plan": "pro" }
}

Request fields

FieldDescription
filePDF or image (PNG, JPEG, WEBP, HEIC). Scanned and photographed invoices supported.
modeprebuilt
schemaIdinvoice

Errors & limits

  • 400Missing file or invalid form fields.
  • 402Monthly extraction quota exhausted — upgrade or wait for reset.
  • 413File larger than 20 MB.
  • 415Unsupported MIME type — use PDF or image.
  • 429Rate limit — max 30 requests/minute per IP.

Monthly extraction quotas apply per plan. See pricing and the general developers docs.

FAQ

Is this an invoice OCR service or an API?+

Both — the web invoice extractor is the no-code interface; this page documents the same extraction as a REST call for AP pipelines and ERP ingest.

Does the invoice OCR API work on scans and photos?+

Yes. Pass the same PDF or image you would upload in the browser. Multimodal extraction reads layout semantically — no per-supplier template training.

How do I authenticate?+

Session-auth beta: sign in at extractfox.com, copy your session cookie from the browser, and pass it on each request. Scoped bearer API keys are planned but not shipped yet — this is not a production server-to-server token today.

What does invoice OCR AI change vs classic OCR?+

Template OCR returns flat text per coordinate. Invoice OCR AI returns structured fields and line_items[] in one response — new supplier layouts work without retraining.

See pricingTry the web tool free →