Invoice Parser & OCR: PDF to JSON, CSV, Excel (No LLM)
Pricing
Pay per event
Invoice Parser & OCR: PDF to JSON, CSV, Excel (No LLM)
Extract vendor, invoice number, dates, line items, tax and total from invoice PDFs, scans and images to JSON, CSV or Excel. Rule-based with local OCR: no LLM, no API keys, documents never leave the run. Non-invoices and unreadable photos are free.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Nick Hellmich
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
21 days ago
Last modified
Categories
Features
Share
Invoice Parser & OCR: Invoice PDF to JSON, CSV or Excel (rule-based, no LLM)
Send invoice PDFs (or scans and images) and get back one clean JSON record per invoice: vendor, invoice number, invoice and due dates, line items, subtotal, tax, total, currency and IBAN. Every field has a confidence level, and the Actor checks that the numbers add up. Export the results as JSON, CSV or Excel from the run's dataset, or send them to Google Sheets, Airtable or your accounting pipeline with Zapier, Make, n8n or the API.
- Digital invoice PDFs are the supported core: 88.7% of checked fields correct on our latest blind test (see Measured accuracy).
- Private by design: rule-based extraction with local OCR (Tesseract). There is no LLM, no outside API call and no API key, and your documents never leave the run.
- Pay only for results: $0.012 per extracted invoice. Non-invoices, unreadable photos, failures and the built-in sample are not charged.
- Deterministic: the same file always gives the same output. When a value can't be confirmed, the field is null instead of a guess.
Scans and photos work, but they are clearly weaker. Receipt photos and handwriting are best-effort (numbers below). If you need near-perfect reading of photos or arbitrary layouts, use a vision-LLM service instead.
Use cases
- Accounts payable intake: turn invoice PDFs from email or uploads into structured rows, and send anything with
warningsor lowconfidenceto a human for review. - Bookkeeping and expense tracking: append vendor, date, tax and total to Google Sheets, Airtable or a database. Use
outputMode: "lineItems"to get one row per invoice line. - Invoice data extraction to Excel/CSV: run a batch of up to 100 documents and download the dataset as CSV or Excel (
outputMode: "flat"gives one row per invoice). - Developer pipelines and AI agents: a predictable, cheap extractor with a stable JSON shape and no LLM bill. You can call it from Python, LangChain or plain HTTP.
- Custom fields: pull PO numbers, references, ship dates or any labelled value from invoices, purchase orders and forms with label or regex rules.
Quick start (free example)
- Open the Actor, leave "Use the built-in sample invoice" ticked and press Start. The run takes about 6 seconds and is free.
- Untick it, upload files or paste URLs (PDF, PNG/JPG/TIFF, DOCX, HTML, XLSX, CSV, TXT), or paste text, then run.
- Open the Output tab. Download as JSON, CSV or Excel, or connect an integration.
Example input:
{"fileUrls": ["https://example.com/invoice.pdf"], "documentType": "invoice", "outputMode": "flat"}
Output (outputMode document)
{"source": "built-in sample invoice","ok": true,"documentType": "invoice","pageCount": 1,"ocrPages": 0,"fields": {"invoiceNumber": "BW-2026-0187", "invoiceDate": "2026-10-02", "dueDate": "2026-11-01","vendor": "Brightwave Design Studio LLC", "customer": "Cedar & Pine Outfitters","subtotal": 4266.0, "taxTotal": 0.0, "total": 4266.0, "currency": "USD", "purchaseOrder": "PO-55120"},"confidence": {"invoiceNumber": "high", "total": "high", "vendor": "medium"},"lineItems": [{"description": "Website design (hours)", "quantity": 24.0, "unitPrice": 95.0, "amount": 2280.0, "amountCheck": true}],"validation": {"lineItemsSum": 4266.0, "lineItemsMatchSubtotalOrTotal": true, "subtotalPlusTaxEqualsTotal": true},"warnings": [],"charged": false}
validation can also contain chargesAndDiscounts (printed freight/shipping added and discounts subtracted between subtotal and total, used when checking subtotal + tax = total), totalCorroborated (OCR documents) and dropped (values removed by a sanity check, with the reason).
What it reads, and how well
| Input | Status | Measured accuracy (blind set #6, see below) |
|---|---|---|
| Digital invoice PDFs (text layer; German, English, French, Spanish, Dutch, Italian labels; US and European number/date formats) | Supported core | about 89% of checked fields correct, about 8% wrong, about 4% null |
| Clean invoice images and scans (screenshots, flatbed scans) | Supported | 78-89% correct on small samples; lower on poor scans |
| Phone photos of invoices | Best-effort | 72% (6 docs, several severely degraded) |
| Receipt photos (Malaysian, Indonesian, others) | Weak | Malaysian 67%; Indonesian 20% (most rejected as unreadable, uncharged) |
| Handwritten invoices | Not reliable | 0 of 3 fields on the single handwritten document in set #6 (12-44% on earlier sets) |
| Non-invoices (letters, contracts, menus, memos, ads, reports, CVs) | Rejected, not charged | 9 of 10 rejected on set #6; the 10th returned no invoice fields but would have been charged |
Measured accuracy (blind tests, honest numbers)
Accuracy is measured as the share of checked fields (vendor, invoice number, invoice date, due date, subtotal, tax total, total, currency, line-item count) that exactly match hand-checked ground truth. "Wrong" means a value was returned and it was incorrect; "null" means the field was left empty rather than guessed. Test documents are public documents (public datasets, Wikimedia Commons, public sample invoices); every set is frozen with SHA-256 hashes before scoring.
Blind set #6 (52 new documents: 42 invoices/receipts + 10 non-invoices; 288 checks; frozen before any tuning for this version, scored once): 78.1% correct overall (225/288), 6.9% wrong (20), 7.6% null (22), 7.3% rejected as unreadable (21 checks on 5 photos). Real invoices wrongly rejected as "not an invoice": 0 of 42. No invoice values were invented on any of the 10 non-invoices.
| Category (set #6) | Correct | Notes |
|---|---|---|
| Digital PDFs, all kinds (17 docs, 141 checks) | 88.7% (125) | 7.8% wrong, 3.5% null |
| - clean, credit-note, mixed-currency, freight, multi-page, hard-layout invoices | 100% (11 docs, 93 checks) | synthetic benchmark invoices (see caveats) |
| - tax-heavy layouts | 72% | |
| - e-invoice sample PDFs (ZUGFeRD-style) | 63% | multi-rate tax blocks and some vendor names missed |
| Image, scan or photo documents overall (25 docs, 147 checks) | 68.0% (100) | 6.1% wrong, 11.6% null, 14.3% rejected as unreadable |
| - invoice images (screenshots) | 89% | |
| - scans | 78% | |
| - phone photos of invoices | 72% | |
| - Malaysian receipt photos | 67% | |
| - Indonesian receipt photos | 20% | 4 of 5 rejected as unreadable |
| - handwritten | 0% | 1 document only |
| Field (set #6, all documents) | Correct |
|---|---|
| currency | 94% |
| invoice number | 89% |
| vendor | 86% |
| invoice date | 81% |
| due date | 81% |
| line-item count | 74% |
| subtotal | 69% |
| tax total | 69% |
| total | 67% |
Digital PDFs only (set #6): vendor 94%, invoice number 94%, invoice date 88%, total 82%, tax total 76%.
For reference, the previous blind set (#5, 59 documents, scored on version 0.1.9/0.1.10, now used for development) gave 82.0% overall, 90.6% on digital PDFs and 73.6% on image documents. Set #6 is harder on receipt photos and e-invoices, so these numbers are lower, not because the extractor got worse: on set #6 this version scores slightly higher than 0.1.10 did (78.1% vs 77.4%, 20 vs 21 wrong values).
Caveats you should know before relying on these numbers
- Small samples: set #6 has 52 documents (42 real invoices/receipts). A single document moves a category by several points; the photo, receipt and especially handwritten strata are thin (one handwritten document, two hand-labelled real-world photos).
- Many digital PDFs in the test sets come from a public synthetic invoice benchmark whose template families overlap with ones used during development. Expect lower accuracy on your own unusual layouts.
- Earlier blind sets (#2-#5) were used for development after they were scored, so their numbers are optimistic and are not quoted as headline results.
- Photos and scans: OCR errors are the main failure. The Actor leaves a field empty, lowers its confidence, or rejects an unreadable photo (uncharged) rather than returning an unconfirmed OCR total, but some wrong values still get through (about 6% of checks on image documents).
- Total and tax total are the weakest fields. Always use the
confidenceandwarningsfields and verify before posting to your books. - A document is charged when something was extracted, even if some fields are wrong or null.
What it does well
- Clean digital invoices and credit notes with a text layer: totals, dates, currency, vendor, line items.
- Currency inference from evidence (ISO code, unambiguous symbol, country, tax vocabulary); null instead of a guess when the evidence is missing or conflicting. Ambiguous numeric dates (
06/11/2023with no locale evidence) are left null too. - Self-checks: line total = quantity x price, subtotal + tax = total, line-item sum, IBAN checksum. Failed checks add
warnings. - Rejects non-invoices and unreadable photos without charging.
- Fast and cheap: a digital invoice takes well under a second of compute; an OCR page takes roughly 5-7 seconds.
What it does poorly
- Phone photos of receipts (especially Indonesian and Malaysian thermal receipts, crumpled or angled): often missing vendor, tax or total.
- Handwritten invoices.
- Unusual layouts: vendor name can be wrong (a customer name or address chosen), invoice number can be a different reference, and the tax total is the most frequently missed field.
- Multi-column and highly styled invoices with line items in nested tables: line-item count can be off.
- Right-to-left and CJK documents have not been tested and should not be expected to work.
Rejection, empty input and the free example
- Not an invoice or receipt (letters, contracts, menus, lists of invoices, press releases, plain text; automatic type mode only): the item has
error.code = "DOCUMENT_TYPE_NOT_RECOGNISED", null fields, and is not charged. SetdocumentTypeChecktowarnoroff, or pickdocumentTypeyourself, to extract anyway. - Image too low quality (blurred, tiny or unreadable photos):
error.code = "IMAGE_TOO_LOW_QUALITY"with a plain message ("image too low quality to read reliably; try a higher-resolution scan"), not charged. SetimageQualityChecktowarnoroffto see what the OCR makes of it anyway. - Empty input: the run finishes successfully with the status message "No input given: add document URLs/uploads, paste text, give a dataset ID, or tick 'Use the built-in sample'. Nothing was processed or charged." and an empty dataset.
- Built-in example: leave "Use the built-in sample invoice" ticked (the default in the Console prefill) and press Start. It runs a bundled sample invoice in about 6 seconds and is free.
Input reference
| Field | Description |
|---|---|
fileUrls | Uploaded files or public http(s) URLs (PDF, PNG/JPG/TIFF, DOCX, HTML, XLSX, CSV, TXT). 50 MB/file, 100 docs/run. |
documents | Advanced: {"url": "..."}, {"base64": "...", "filename": "inv.pdf"} or {"keyValueStoreId": "...", "key": "..."}. |
text | Pasted text or Markdown. |
datasetId | Pick a dataset (for example a Document to Markdown run) whose items have a markdown/text field. |
documentType | auto (default), invoice, receipt, form, table, generic. |
fieldSchema | Your own fields, see below. |
outputMode | document (nested, default), flat (one row per document), lineItems, tableRows. |
dateOrder, defaultCurrency | Resolve 03/04/2026 and documents with no currency symbol. |
documentTypeCheck | reject (default: in auto mode, non-invoices return DOCUMENT_TYPE_NOT_RECOGNISED, not charged), warn, or off. |
strictOcrTotals | Default on: a lone, uncorroborated low-confidence OCR total becomes null. |
imageQualityCheck | reject (default: unreadable photos return IMAGE_TOO_LOW_QUALITY, not charged), warn, or off. |
enableOcr, ocrLanguage | OCR for scans and images (eng, deu, fra, spa, ita, por, nld, combine with +, or auto to detect). |
maxPages, includeTables, includeKeyValues, includeText | Limits and extras. |
Custom fields (label / regex heuristics)
{"fileUrls": ["https://example.com/purchase-order.pdf"],"documentType": "generic","fieldSchema": [{"name": "poNumber", "labels": ["PO No", "Purchase Order"], "type": "string"},{"name": "shipDate", "labels": ["Ship date", "Delivery date"], "type": "date"},{"name": "orderRef", "regex": "REF-(\\d+)", "type": "integer"},{"name": "emails", "type": "email", "regex": "[\\w.+-]+@[\\w-]+\\.[\\w.]+", "regexGroup": 0, "multiple": true},{"name": "incoterms", "labels": ["Incoterms"], "required": true}]}
labels finds the value next to or under a label. regex runs on the document text (regexGroup picks the group). Types: string, number, integer, currency, date (returned as YYYY-MM-DD), boolean, email, phone, percent, list. A missing required field adds a warning and is listed in missingRequired.
Integrations: Zapier, Make, n8n, API, Python
Email attachment → Google Sheets row (Zapier)
- Gmail trigger: New Attachment.
- Apify action Run Actor: Actor
steady_kahikatea/document-data-extractor, input:{"fileUrls": ["{{attachment URL}}"], "outputMode": "flat", "documentType": "invoice"} - Apify action Get Dataset Items (use the run's default dataset).
- Google Sheets action Create Spreadsheet Row: map
vendor,invoiceNumber,invoiceDate,currency,total,taxTotal,warnings.
Use outputMode: "lineItems" instead to add one Sheets row per invoice line.
Make
Gmail → Watch emails (attachments on) → Apify → Run an Actor (or HTTP → Make a request to https://api.apify.com/v2/acts/steady_kahikatea~document-data-extractor/run-sync-get-dataset-items?token=YOUR_TOKEN with body {"documents":[{"base64":"{{base64(attachment.data)}}","filename":"{{attachment.fileName}}"}],"outputMode":"flat"}) → Google Sheets → Add a row. The response is the list of rows.
n8n
Gmail Trigger (download attachments) → Code node to base64 the binary → HTTP Request POST https://api.apify.com/v2/acts/steady_kahikatea~document-data-extractor/run-sync-get-dataset-items (header Authorization: Bearer <token>) with JSON body {"documents":[{"base64":"={{$binary.attachment_0.data}}","filename":"={{$binary.attachment_0.fileName}}"}],"outputMode":"flat"} → Google Sheets Append row. Or use the Apify node's Run Actor and get dataset operation with a public file URL.
Python / LangChain
from apify_client import ApifyClientclient = ApifyClient("<APIFY_TOKEN>")run = client.actor("steady_kahikatea/document-data-extractor").call(run_input={"fileUrls": ["https://example.com/invoice.pdf"],"documentType": "invoice",})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["fields"]["vendor"], item["fields"]["total"], item["warnings"])
As a LangChain tool (pip install langchain-apify):
from langchain_apify import ApifyActorsToolextract = ApifyActorsTool("steady_kahikatea/document-data-extractor")result = extract.invoke({"run_input": {"fileUrls": ["https://example.com/invoice.pdf"], "outputMode": "flat"}})
Chain it after Document to Markdown: pass that run's dataset in datasetId, or paste its Markdown into text.
API (cURL)
curl -X POST "https://api.apify.com/v2/acts/steady_kahikatea~document-data-extractor/run-sync-get-dataset-items?token=$APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"fileUrls":["https://example.com/invoice.pdf"],"outputMode":"flat"}'
Export to CSV or Excel
Every run writes its results to a dataset. In the Console, use Export (JSON, CSV, Excel, XML, HTML). From the API, call GET https://api.apify.com/v2/datasets/<datasetId>/items?format=csv (or format=xlsx). Use outputMode: "flat" for one row per invoice, or "lineItems" for one row per invoice line.
Pricing (pay per event)
You pay only for documents that produced extracted data. Rejected, unreadable, not-an-invoice, blocked, failed and empty documents and the built-in sample are free.
| Event | Free / no discount | Bronze (-10%) | Silver (-20%) | Gold (-30%) |
|---|---|---|---|---|
| Document extracted (first 5 pages included) | $0.012 | $0.0108 | $0.0096 | $0.0084 |
| OCR page (each scanned page or image that needed OCR) | $0.008 | $0.0072 | $0.0064 | $0.0056 |
| Extra page (each page beyond 5) | $0.003 | $0.0027 | $0.0024 | $0.0021 |
Examples (no discount): a digital invoice PDF = $0.012; a one-page invoice photo or scan = $0.012 + $0.008 = $0.020; a 1,000-invoice digital batch = $12. Platform usage is included in the event prices.
Privacy
- No LLM and no third-party AI or OCR service: text extraction and OCR run inside the Actor's own container.
- Documents are processed in memory only, and their contents are never written to logs.
- The extracted data is stored only in your own Apify dataset, under your account's normal data retention.
Limits and safety
- Public
http(s)URLs only. Private/internal addresses,localhost, cloud metadata addresses and credentials in URLs are blocked, on every redirect hop. - 50 MB per file, 100 documents per run, 500 pages per document, 4 minutes of processing per document.
- DOCX headers and footers are not read. Password-protected PDFs are not supported.
- Documents are processed in memory only. Contents are never written to logs.
- Not tax, legal or accounting advice: verify extracted amounts before posting them to your books.
FAQ
Does it use AI or an LLM? No. Extraction is rule-based, and OCR uses Tesseract running inside the Actor. Nothing is sent to OpenAI, Google, AWS or any other service.
How accurate is it? On our latest blind test set (52 documents, frozen before scoring), 78.1% of checked fields were correct overall: 88.7% on digital PDFs and 68.0% on images and scans. The test sets are small. See Measured accuracy for the breakdown and caveats.
Does it work on scanned invoices and phone photos? Yes, with OCR, but they are less accurate than digital PDFs. Unreadable photos are rejected with IMAGE_TOO_LOW_QUALITY and not charged. Receipt photos and handwriting are best-effort.
What if I send something that isn't an invoice? In automatic mode it returns DOCUMENT_TYPE_NOT_RECOGNISED with null fields and is not charged.
Which languages and formats? It handles labels in English, German, French, Spanish, Dutch and Italian, and US and European number/date formats. Ambiguous dates like 03/04/2026 can be forced with dateOrder. OCR language packs: eng, deu, fra, spa, ita, por, nld, or auto. Right-to-left and CJK documents have not been tested.
Does it read ZUGFeRD / Factur-X XML? No. It reads the visible PDF content, not embedded e-invoice XML.
Can I get Excel or CSV instead of JSON? Yes. Export the run's dataset as CSV or Excel (see above). flat and lineItems output modes give spreadsheet-friendly rows.
How much does it cost? $0.012 per extracted document, plus $0.008 per OCR'd page and $0.003 per page beyond 5. Store tiers get 10/20/30% off, and rejected documents are free. See Pricing.
Can I extract my own fields? Yes. Use fieldSchema with labels and/or regex (see Custom fields).
Open-source alternative
invoice2data (MIT) is a free library for template-based invoice extraction that you host yourself. This Actor needs no templates, adds OCR, forms, tables and custom fields, and runs without hosting.