Helenis API
Start for free

API reference

Invoice & Receipt Parser API

Invoice & receipt parser: PDF, scan or photo to JSON with VAT IDs, lines, taxes and math checks.

Host
invoice-receipt-parser-pdf-image-to-json.p.rapidapi.com
Base path
/v1/invoices
Auth
X-RapidAPI-Key, X-RapidAPI-Host
For agents
openapi.json · invoices.md

Invoice Parsing

Invoices and receipts to accounting JSON, with checks.

Parse Invoice from URL

POST /v1/invoices/parse

Parse an invoice or receipt from its URL. Parse an invoice or receipt from its URL into JSON: parties with VAT IDs, number, dates, line items, taxes, totals, IBAN, plus arithmetic checks. PDF, photo, or e-invoice XML (Factur-X, ZUGFeRD, UBL, read without AI). 1 credit per page read by the AI; 1 for an e-invoice's XML.

Parameters of Parse Invoice from URL
ParameterInTypeDescription
url required body string Direct link to an invoice or receipt: PDF (digital or scanned), photo or scan (JPEG, PNG, WEBP, HEIC, GIF, BMP, TIFF), or an e-invoice XML (Factur-X / ZUGFeRD CII, UBL, XRechnung), up to 20 MB.
pages body string PDF pages to read, e.g. '1-2'. All pages when empty (30 at most). 1 credit per page read.
password body string Password of an encrypted PDF.
curl -X POST "https://invoice-receipt-parser-pdf-image-to-json.p.rapidapi.com/v1/invoices/parse" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: invoice-receipt-parser-pdf-image-to-json.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/saeco.pdf"
  }'

Parse Uploaded Invoice

POST /v1/invoices/parse/upload

Parse an uploaded invoice or receipt. Same as /parse, for a file sent as multipart/form-data (field `file`).

Parameters of Parse Uploaded Invoice
ParameterInTypeDescription
file required form file PDF, image or e-invoice XML, up to 20 MB.
pages form string PDF pages to read, e.g. '1-2'. All pages when empty (30 at most). 1 credit per page read.
password form string Password of an encrypted PDF.
curl -X POST "https://invoice-receipt-parser-pdf-image-to-json.p.rapidapi.com/v1/invoices/parse/upload" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: invoice-receipt-parser-pdf-image-to-json.p.rapidapi.com" \
  -F "file=@./my-file"

Response

{
  "document_type": "invoice",
  "language": "nl",
  "number": "VF1005193039",
  "issue_date": "2022-09-08",
  "due_date": "2022-09-22",
  "purchase_order": "SCONL000000444",
  "currency": "EUR",
  "supplier": {
    "name": "e-Luscious Nederland B.V. iov Saeco.com",
    "vat_id": "NL8152.54.295.B01",
    "tax_ids": [{ "type": "Kvk", "value": "04080176" }],
    "address": "Badweg 48, 8401 BL, Gorredijk",
    "country": "NL"
  },
  "customer": { "name": "Strategic Corp", "tax_ids": [], "country": "NL" },
  "lines": [
    {
      "description": "Onderhoudsset CA6707/10",
      "code": "E103184",
      "quantity": 1.0,
      "unit": "PCS",
      "unit_price": 49.99,
      "tax_rate": 21.0,
      "total": 49.99
    },
    {
      "description": "SX Flyer SAECO Korting KVDNL",
      "code": "E103560",
      "quantity": 1.0,
      "unit": "PCS",
      "unit_price": 0.0,
      "tax_rate": 21.0,
      "total": 0.0
    }
  ],
  "amounts_include_tax": true,
  "totals": {
    "subtotal": 41.31,
    "taxes": [{ "rate": 21.0, "base": 41.31, "amount": 8.68, "label": "21 %" }],
    "tax_total": 8.68,
    "total": 49.99
  },
  "payment": { "method": "card", "iban": "NL58RABO0198723202", "bic": "RABONL2U" },
  "expense_category": "shopping",
  "source": "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/saeco.pdf",
  "mime_type": "application/pdf",
  "method": "ai",
  "page_count": 1,
  "pages_read": 1,
  "validation": {
    "consistent": true,
    "checks": [
      { "name": "line_math", "status": "ok", "detail": "2 line(s) checked." },
      { "name": "lines_sum", "status": "ok", "expected": 49.99, "found": 49.99, "difference": 0.0, "detail": "Sum of the line amounts against the subtotal or total." },
      { "name": "tax_rates", "status": "ok", "detail": "1 tax rate(s) checked." },
      { "name": "tax_sum", "status": "ok", "expected": 8.68, "found": 8.68, "difference": 0.0, "detail": "Sum of the taxes by rate against the tax total." },
      { "name": "total", "status": "ok", "expected": 49.99, "found": 49.99, "difference": 0.0, "detail": "Subtotal + tax (+ charges - discount + tip) against the total." },
      { "name": "amount_due", "status": "skipped", "detail": "Total, amount paid or amount due missing." },
      { "name": "iban", "status": "ok", "detail": "IBAN checksum valid." }
    ]
  }
}

From a real response. Empty fields are left out. A receipt photo works the same way, here a Polish supermarket receipt with its discount line:

{
  "document_type": "receipt",
  "issue_date": "2020-01-09",
  "issue_time": "13:18",
  "currency": "PLN",
  "supplier": { "name": "Biedronka", "vat_id": "PL7791011327", "address": "ul. Żniwna 5, 62-025 Kostrzyn", "country": "PL" },
  "lines": [
    { "description": "ChlebPszen-Żyt550g", "quantity": 1.0, "unit_price": 1.99, "total": 1.99 },
    { "description": "Ser ż.Świat. 150g", "quantity": 1.0, "unit_price": 3.29, "total": 3.29 },
    { "description": "Polędw łos 100g", "quantity": 1.0, "unit_price": 4.99, "total": 4.99 },
    { "description": "Rabat", "total": -2.0 }
  ],
  "amounts_include_tax": true,
  "totals": { "taxes": [{ "rate": 5.0, "base": 7.88, "amount": 0.39, "label": "PTU C" }], "tax_total": 0.39, "total": 8.27, "amount_paid": 8.27 },
  "payment": { "method": "card" },
  "expense_category": "groceries"
}

Why developers pick this API

  • 🧮 Numbers you can trust: the model copies what is printed and never computes; the API does the arithmetic and tells you exactly which check failed, with the expected and the printed value.
  • 💸 A fraction of the usual price: about $0.01 per page on PRO. Popular invoice APIs charge $0.015 to $0.12 per document on RapidAPI, $0.08 to $0.16 at Veryfi (with a $500 monthly minimum), $0.01 to $0.04 per document on Apify. Failed calls use 0 credits.
  • 🇫🇷 Ready for e-invoicing: a Factur-X or ZUGFeRD PDF is read from its embedded XML, exact to the cent, for 1 credit whatever its length.
  • 🔒 Privacy by design: no personal contact data in the output (a private customer's name, address, email or phone are never returned), masked card and bank numbers are dropped, and documents are not stored.

The checks

name What is re-added
line_math quantity x unit price (less the line discount, with or without tax) against each line amount
lines_sum the line amounts against the subtotal (net lines) or the total (receipts, tax included)
tax_rates taxable base x rate against each tax amount
tax_sum the taxes by rate against the tax total
total subtotal + tax + charges - discount + tip against the grand total
amount_due total - amount paid against the amount due
iban the ISO 13616 checksum of the supplier's IBAN (an IBAN that fails it is flagged and left out: you never get an account number that cannot exist)

validation.consistent is true when every check that could run passed, false as soon as one figure does not add up (send that document for review), null when the document gave nothing to check. Rounding of one cent per line is tolerated.

E-invoices (Factur-X, ZUGFeRD, UBL)

A PDF that carries its own XML (Factur-X, ZUGFeRD, or UBL as some ERPs attach it) is read from that XML: exact to the cent, "method": "e-invoice", 1 credit however long the PDF. You can also send the XML file itself (CII or UBL, XRechnung included). A Factur-X MINIMUM or BASIC WL file has no line items: the AI reads them from the pages and the XML's values win everywhere else ("method": "e-invoice+ai").

{
  "method": "e-invoice",
  "e_invoice": { "format": "UBL", "file": "UBL-Invoice-2.1.xml" },
  "number": "INV/2023/03/0008",
  "totals": { "subtotal": 262.9, "tax_total": 16.94, "total": 279.84, "amount_paid": 0.0, "amount_due": 279.84 },
  "...": "..."
}

Errors

Status code Meaning
400 unsupported_file Not a PDF, an image or a CII / UBL invoice XML, or a damaged file.
400 not_an_invoice The file holds no invoice, receipt or bill. Not billed.
400 too_many_pages More than 30 pages: choose them with pages.
400 pdf_encrypted Send the PDF's password.
400 plan_limit The free BASIC plan reads 2 pages per call.
400 invalid_url / site_unreachable / file_too_large The link is invalid or not reachable, or the file is over 20 MB.
429 daily_limit_reached Daily safety limit of your plan; resets at 00:00 UTC.
503 ai_error / capacity_exhausted The AI did not answer; retry. Not billed.

Limits

20 MB per file, 30 pages per call. Handwritten, faded or crumpled receipts are read as well as they can be, and the checks tell you when the result does not add up. No bounding boxes. Bank statements are not supported.

Use it from an AI agent

Add this MCP server and the Invoice & Receipt Parser - PDF & Photo to JSON actor becomes a tool your agent can call. Works in Claude, Cursor, VS Code and any MCP client; billed per event through Apify.

MCP server URL
https://mcp.apify.com?tools=helenisapi/invoice-receipt-parser

Prefer plain HTTP? Give your agent the OpenAPI document or the Markdown reference.

See the plans Error handling