Invoice and Receipt Parser: totals, tax, dates, items avatar

Invoice and Receipt Parser: totals, tax, dates, items

Pricing

from $3.60 / 1,000 document processeds

Go to Apify Store
Invoice and Receipt Parser: totals, tax, dates, items

Invoice and Receipt Parser: totals, tax, dates, items

Reads invoices and receipts from image and PDF links and returns the vendor, invoice number, invoice and due dates, currency, subtotal, tax, total and line items as fields. OCR runs inside the actor; no outside service or key.

Pricing

from $3.60 / 1,000 document processeds

Rating

0.0

(0)

Developer

Ed Rayyis

Ed Rayyis

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Security

Limited permissions

Share

Send it links to invoices and receipts, as photos, scans or PDF files, and get the numbers back as fields: who issued it, the invoice number, the invoice and due dates, the currency, the subtotal, the tax, the total and the line items. Each document becomes one row you can drop into a spreadsheet or an accounting import.

OCR runs inside the actor with RapidOCR and the PP-OCRv6 models, released under the Apache 2.0 license [1] [2]. Nothing is sent to an outside service and there's no key to supply. PDF pages that already carry text are read directly, without OCR.

How well it reads

Fields come from rules: label words such as "Total", "Subtotal", "Tax", "VAT", "Invoice No" or "Due Date" and the amounts printed beside them. There's no language model guessing at the page, so a field is either found on the document or left empty.

On 20 printed shop receipts from the public ICDAR 2019 SROIE receipt set [3], none of which were used while the rules were written, the actor got the total right on 17 of the 19 receipts whose answer key gives a total, the date on 19 of 20, and the vendor name exactly on 14 of 20. Two of the six vendor misses were close: one kept the company number after the name, and one carried an OCR slip, a capital I for a lowercase l. In the other four the actor returned a different line from the top of the receipt, such as a tagline or the street address.

Four more documents were checked by hand: a typed US invoice image, the same invoice saved as a scanned PDF, a PDF invoice with a text layer and a Swiss restaurant bill. On all four the invoice number, dates, currency, subtotal, tax, total and line items came out right. The vendor was right on three; the Swiss bill prints its name over two lines and the actor returned only the first.

Receipts with faded print, labels the OCR can't read, or totals printed on a different line from their label are where it misses. Check totalsConsistent and the text field when a number matters.

What you get for each document

  • documentType: invoice, receipt or unknown
  • vendorName and invoiceNumber (also receipt, bill or document numbers)
  • invoiceDate and dueDate as YYYY-MM-DD, with invoiceDateText and dueDateText as printed
  • currency as a code such as USD, EUR, CHF or MYR, from the symbol or code on the document
  • subtotal, tax, taxRatePercent and total, with totalLabel, the line the total came from
  • totalsConsistent: true when subtotal plus tax equals the total, false when it doesn't, empty when the document has no subtotal
  • lineItems: description, amount, and unitPrice and quantity where the row prints them, plus lineItemCount
  • fileType, pageCount, pagesRead, readMethod (ocr or text-layer) and ocrConfidence
  • text: everything read, one printed line per line (on by default)

When a receipt has a rounding adjustment, the total is the rounded amount the customer paid.

Dates

A date like 03/04/2026 can be read two ways. Automatic mode looks for any date on the document that can only be read one way, such as 26/02/2019, and uses that order for the whole document. When there's none, US dollar documents are read month first and everything else day first. You can also fix the order yourself in the input.

Input

  • Invoice or receipt URLs (required): PNG, JPEG, WebP, BMP, GIF, TIFF or PDF, up to 25 MB by default
  • Date order: automatic, day first or month first
  • Maximum pages per document, 5 by default and up to 20
  • Include the full text, on by default
  • PDF render resolution, 200 DPI by default, for scanned PDF pages
  • Minimum OCR confidence, 50% by default

Output

The dataset has one row per document. A link that fails to download, answers with an error status, or isn't a PDF or image gets a row with ok false and the reason in error, and the run moves on. An OUTPUT record in the key value store gives documents processed, documents failed and whether the run stopped at your spending limit.

Pricing

Pay per event: one event per document processed, whatever its page count. Documents that fail aren't charged. Before each document is read, the run checks that the maximum charge you set can still pay for it, and stops there when it can't, so every document row in the dataset is a paid one.

Support

Questions and problems: the Issues tab on this page.

References

[1] GitHub, RapidAI/RapidOCR, LICENSE and python/MODEL_LICENSES.md. https://github.com/RapidAI/RapidOCR [2] Hugging Face, PaddlePaddle/PP-OCRv6_small_rec_onnx model card, license tag. https://huggingface.co/PaddlePaddle/PP-OCRv6_small_rec_onnx [3] GitHub, zzzDavid/ICDAR-2019-SROIE, receipt images and answer keys. https://github.com/zzzDavid/ICDAR-2019-SROIE