How to scan a receipt and extract data from it


Receipts have usually a line by line format, very similar to tables. Other document types like invoices, contracts and more also follow the same layout. For all these documents we recommend that you enable check the Receipt scanning and/or table recognition option on the front page. If you use the OCR API, you get the same result by turning on the receipt scanning mode. The result is that the OCR'ed text is sorted line by line - just like you find it on your receipt. This makes the OCR API the perfect receipt capture SDK.

Receipt Capture Example

The screenshot below shows the OCR result of a scanned Walmart receipt. The structure of the text output is the same as on the receipt.

Walmart Receipt Scanning OCR Text Result
We highlighted a few lines in yellow to visually help with the comparison of the left input image and the OCR text result on the right.

Receipt OCR API

In the OCR API the isTable = true switch triggers the receipt and table scanning logic. More details are available in the receipt scanning flag section of the OCR API documentation

Test Receipt OCR

You can test receipt parsing and data extraction directly on our front page. Here is the original receipt scan:

Receipt OCR Walmart
The link to the Walmart receipt image is https://ocr.space/Content/Images/receipt-ocr-original.jpg - just paste it into the URL box on the front page.

Copyfish for Chrome/Firefox
Follow OCR API on Twitter
View the OCR API Status
Try Kantu Web Automation
Selenium IDE for Chrome
Try our Copyfish 🐟 Free OCR Software Chrome and Firefox extension: Extract and translate text from any image, video or PDF. It's fun to use - and powered by our OCR API. The full source code is available on GitHub (OSI-certified Open-Source).

OCR software or OCR API questions? Please contact the OCR team - we love to answer OCR questions.