# Invoice & Receipt Parser - PDF & Photo to JSON (`helenisapi/invoice-receipt-parser`) Actor

Invoice and receipt parser: PDF, photo or e-invoice links in, JSON out with supplier, VAT IDs, line items, taxes by rate and totals, every figure re-added and checked. 🧾

- **URL**: https://apify.com/helenisapi/invoice-receipt-parser.md
- **Developed by:** [Helenis API](https://apify.com/helenisapi) (community)
- **Categories:** AI, Automation, Business
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $10.00 / 1,000 invoice pages

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 🧾 Invoice & Receipt Parser - PDF & Photo to JSON

**Paste invoice links, get accounting rows.** Supplier invoices, receipts, credit notes, utility bills: every document becomes **clean JSON** with the **supplier and its VAT / company IDs**, **number**, **dates**, **currency**, every **line item**, **taxes by rate** and **totals**. Then the actor **re-adds the figures** and flags every document that does not add up, so you review only the doubtful ones.

PDFs (digital or **scanned**), **photos** of receipts, and **e-invoices** (Factur-X, ZUGFeRD, UBL). Works on a plain list of links **or on the dataset of another actor**. No API key, no setup: add links and hit **Run**.

***

### ⚡ Why this actor?

- 🧮 **Math checked:** quantity x price, sum of lines, tax per rate, grand total, amount due and IBAN checksum. Each document gets `consistent: true` or the list of checks that failed.
- 🌍 **Any language, any currency:** tested on Dutch, German, French, Polish, Korean, Chinese, Japanese and Ukrainian documents. ISO dates, ISO currency codes.
- 📄 **Long invoices:** up to 30 pages each, read in parallel. A 240-line test invoice came back complete, to the cent.
- ⚡ **E-invoices read exactly:** a Factur-X / ZUGFeRD / UBL PDF is read from its embedded XML, no AI, at a fraction of the price.
- 🏷️ **Bookkeeping ready:** document type and expense category (meals, fuel, travel, software...) on every row.
- 🔒 **Privacy first:** no personal contact data of private customers in the output, masked bank and card numbers dropped.

***

### 🏆 How it compares

| Feature | This actor | Classic receipt OCR | Enterprise invoice APIs |
|---|:---:|:---:|:---:|
| 🧾 Line items, taxes by rate | ✅ | ⚠️ Totals only | ✅ |
| 🧮 Arithmetic checks | ✅ | ❌ | ⚠️ Some |
| ⚡ Factur-X / ZUGFeRD / UBL | ✅ Exact | ❌ | ⚠️ Rare |
| 📄 Multi-page invoices | ✅ 30 pages | ❌ | ✅ |
| 💸 Price per document | $0.01 a page, $0.003 an e-invoice | $0.01-0.04 | $0.08-0.16 |
| 💸 Failed documents charged | ❌ Never | ⚠️ Varies | ⚠️ Varies |

***

### 📊 What data do you get?

One row per document. The table view shows the essentials; the full row holds every line.

| Field | Description | Example |
|---|---|---|
| `documentUrl` | The link you gave | `https://.../saeco.pdf` |
| `success` | `true` when the document was parsed | `true` |
| `documentType` | invoice, receipt, credit_note, proforma, quote, purchase_order, utility_bill | `invoice` |
| `number` | Invoice or receipt number | `VF1005193039` |
| `issueDate` / `dueDate` | ISO 8601 dates | `2022-09-08` |
| `currency` | ISO 4217 code | `EUR` |
| `supplierName` / `supplierVatId` | Who issued it | `e-Luscious Nederland B.V.` / `NL8152.54.295.B01` |
| `customerName` | The company billed (never a private person) | `Strategic Corp` |
| `subtotal` / `taxTotal` / `total` / `amountDue` | The totals | `41.31` / `8.68` / `49.99` |
| `lineCount` | Line items found | `2` |
| `consistent` | Every figure adds up (`null`: nothing to check) | `true` |
| `failedChecks` | Checks that did not add up | `["lines_sum"]` |
| `expenseCategory` | For bookkeeping | `shopping` |
| `supplier` | `name`, `vat_id`, `tax_ids` (SIRET, EIN, KvK...), `address`, `country` | — |
| `lines` | `description`, `code`, `quantity`, `unit`, `unit_price`, `discount_percent`, `tax_rate`, `total` | — |
| `totals` | `subtotal`, `discount`, `charges`, `taxes` by rate, `tax_total`, `tip`, `rounding`, `total`, `amount_paid`, `amount_due` | — |
| `payment` | `terms`, `method`, `iban`, `bic`, `reference` | — |
| `validation` | Every check with the expected and the printed value | — |
| `method` | `ai`, `e-invoice` (exact XML) or `e-invoice+ai` | `ai` |
| `pagesRead` | Pages read by the AI (charged) | `1` |

***

### 🚀 How to use it

1. Add **direct links** to invoices or receipts (one per line), or a **dataset ID** from another actor.
2. Optionally limit the **PDF pages** (e.g. `1-2` to skip terms and conditions).
3. Click **Run**, then export the table as CSV, Excel or JSON.

#### ⚙️ Input

| Option | Default | Description |
|---|:---:|---|
| 🔗 **Document links** | — | One direct link per line, up to 20 MB each: PDF, photo or e-invoice XML |
| 📦 **Dataset ID (optional)** | — | Parse the documents listed in an existing Apify dataset |
| **Document link field in the dataset** | — | Empty: `invoiceUrl`, `receiptUrl`, `documentUrl`, `fileUrl`, `pdfUrl`, `imageUrl`, `downloadUrl` and `url` are tried |
| **Maximum documents** | `0` | Stop after this many documents (`0` = no limit) |
| 📑 **PDF pages (optional)** | All | e.g. `1-2`. 30 pages at most per document |
| **Parallel documents** | `3` | How many documents are processed at the same time (1-5) |

#### Output example

```json
{
  "documentUrl": "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/saeco.pdf",
  "success": true,
  "documentType": "invoice",
  "number": "VF1005193039",
  "issueDate": "2022-09-08",
  "dueDate": "2022-09-22",
  "currency": "EUR",
  "supplierName": "e-Luscious Nederland B.V. iov Saeco.com",
  "supplierVatId": "NL8152.54.295.B01",
  "customerName": "Strategic Corp",
  "subtotal": 41.31,
  "taxTotal": 8.68,
  "total": 49.99,
  "lineCount": 2,
  "consistent": true,
  "failedChecks": [],
  "expenseCategory": "shopping",
  "method": "ai",
  "pagesRead": 1,
  "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 }
  ],
  "payment": { "method": "card", "iban": "NL58RABO0198723202", "bic": "RABONL2U" }
}
```

*Shortened from a real run.* Available as **JSON**, **CSV**, **Excel**, or via the **Apify API** and **dataset exports**.

***

### 💰 Pricing

Pay only for what you get:

| Event | When |
|---|---|
| 🧾 Invoice page | Each page read by the AI (a photo is one page) |
| ⚡ E-invoice | Each Factur-X / ZUGFeRD / UBL invoice read from its XML, no AI |

Documents that cannot be downloaded or read, and files that are not invoices, are listed with their error and **not charged**. Set a maximum cost per run in the run options and the actor stops cleanly when it is reached.

> 🆓 On the Apify **free plan**, each run parses the first 2 pages of the first 5 documents.

***

### 💡 Use cases

- 🏦 **Accounts payable:** supplier invoices to rows for your ERP, with the doubtful ones flagged.
- 🧾 **Expense reports:** receipt photos to merchant, date, amount, tax and category.
- 📚 **Bookkeeping firms:** bulk-import a client's invoices with VAT IDs and taxes by rate.
- 🔍 **Audit:** catch invoices whose totals do not add up, or whose IBAN is wrong.
- 🇪🇺 **E-invoicing:** read Factur-X, ZUGFeRD and UBL invoices exactly, and paper ones with the same columns.

***

### ❓ FAQ

**Are the amounts exact?**
The AI copies printed figures and never computes them; the actor then re-adds everything. When a figure was misread, or the document itself is wrong, `consistent` is `false` and `failedChecks` says where. E-invoices are read from their XML, exact by definition.

**Which files work?**
PDFs (digital or scanned), JPEG, PNG, WEBP, HEIC, GIF, BMP and TIFF photos, and CII or UBL invoice XML files, up to 20 MB.

**Am I charged for documents that fail?**
No. A document that cannot be downloaded or read, or that is not an invoice, gets a row with `success: false` and its `error`, and costs nothing. Temporary failures are retried once.

**Can I parse documents found by another actor?**
Yes. Paste its **dataset ID**; the link is read from the usual fields or from the one you name.

***

### 🔌 Integrations

- 📗 **Google Sheets**: Auto-export parsed invoices to a spreadsheet
- 🪝 **Webhooks**: Trigger your bookkeeping flow when a run completes
- ⚡ **Zapier / Make**: Plug into 1000+ apps
- 🛠️ **API**: Fetch results programmatically from any language
- 🤖 **AI agents**: call it from Claude, Cursor or any MCP client through Apify's MCP server

***

### 🤖 Use it from an AI agent

Add this actor to **Claude, ChatGPT, Cursor, VS Code** or any MCP client with one URL (sign in with your Apify account):

```
https://mcp.apify.com?tools=helenisapi/invoice-receipt-parser
```

Your agent then calls it as a tool, with the input described above, and pays per event like a normal run. In code: `ApifyActorsTool("helenisapi/invoice-receipt-parser")` in LangChain or CrewAI; in **n8n**, **Make** or **Zapier**, use the Apify app and pick this actor.

***

### 🌐 Also available as an API

The same engine is sold as a REST API on RapidAPI: **Invoice & Receipt Parser - PDF & Image to JSON** by **Helenis API**. It also accepts direct uploads and password-protected PDFs.

***

### 🔒 Privacy

Documents are downloaded, read and discarded: neither the file nor its data is stored by our backend. The AI sub-processor may keep requests temporarily for abuse monitoring. Only process documents you have the right to process.

# Actor input Schema

## `urls` (type: `array`):

Direct links to invoices or receipts, one URL per item, e.g. \["https://example.com/invoice-1042.pdf", "https://example.com/receipt.jpg"]. PDF (digital or scanned, up to 30 pages), photo (JPEG, PNG, WEBP, HEIC, GIF, BMP, TIFF) or e-invoice XML (Factur-X, ZUGFeRD, UBL), up to 20 MB each. The link must return the file itself. Required unless `datasetId` is set. Each document returns one row.

## `datasetId` (type: `string`):

ID of an existing Apify dataset whose items hold links to invoices or receipts, e.g. the output of another actor. The link is read from `datasetUrlField`, else from invoiceUrl, receiptUrl, documentUrl, fileUrl, pdfUrl, imageUrl, downloadUrl or url. Alternative or addition to `urls`; duplicate links are parsed once.

## `datasetUrlField` (type: `string`):

Name of the field holding the document link in the items of `datasetId`, e.g. "attachmentUrl". Leave empty to try invoiceUrl, receiptUrl, documentUrl, fileUrl, pdfUrl, imageUrl, downloadUrl and url, in that order. Ignored without `datasetId`.

## `maxDocuments` (type: `integer`):

Maximum number of documents to parse in this run, counted after merging `urls` and the dataset and removing duplicates; minimum 0. 0 (the default) means no limit; e.g. 20 parses only the first 20 documents of a large dataset.

## `pages` (type: `string`):

Pages to read in each PDF, e.g. "1-2" to skip terms and conditions pages, or "1,3". Leave empty for all pages (30 at most). Each page read by the AI is charged; an e-invoice read from its XML is not. Ignored for photos.

## `maxConcurrency` (type: `integer`):

How many documents are parsed at the same time, 1-5 (default 3), e.g. 5 for a large batch. It changes the speed only, not the results or the price.

## Actor input object example

```json
{
  "urls": [
    "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/saeco.pdf",
    "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/AzureInterior.pdf"
  ],
  "maxDocuments": 0,
  "maxConcurrency": 3
}
```

# Actor output Schema

## `documents` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/saeco.pdf",
        "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/AzureInterior.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("helenisapi/invoice-receipt-parser").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": [
        "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/saeco.pdf",
        "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/AzureInterior.pdf",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("helenisapi/invoice-receipt-parser").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/saeco.pdf",
    "https://raw.githubusercontent.com/invoice-x/invoice2data/master/tests/compare/AzureInterior.pdf"
  ]
}' |
apify call helenisapi/invoice-receipt-parser --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,helenisapi/invoice-receipt-parser"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/JNVUzWegfh2wDw1qp/builds/cPA2hVUjGRJhcBSUf/openapi.json
