You have a folder of scanned invoices, or a stack of receipt photos from your phone, and you need the line items in a spreadsheet: item, quantity, price, amount.
Most OCR tools give you one block of text. The words are all there, but the columns are gone: "Toner cartridge K-220 2 64.90 129.80" lands on one line, and on a photo the prices often end up on a different line from their items. Then you fix it by hand.
This guide uses a ready-made tool on Apify that returns each table as rows of cells, also for scans and photos. You paste links to your files, click Start, and get rows like this:
| Item | Qty | Unit price | Amount |
|---|---|---|---|
| A4 copy paper, box | 4 | 21.50 | 86.00 |
| Toner cartridge K-220 | 2 | 64.90 | 129.80 |
| Desk organiser | 3 | 12.75 | 38.25 |
That's the real output for the scanned invoice in the cover image (an invented sample).
What you need
- A free Apify account. The free plan includes $5 of usage every month, enough for over 1,500 pages.
- Your files as links (Google Drive or Dropbox share links work), or one file to upload.
- About 5 minutes. Step 4 uses Python, but it's optional.
Step 1: Open the tool
Open PDF & Image to Text OCR – Tables as Rows on the Apify Store and click Try for free. Sign up or log in, and the tool opens on its Input page. It comes with a sample scanned invoice and a receipt photo already filled in, so you can click Start once just to see what comes back.
Step 2: Add your files
- In File links, paste one link per line. PDFs, JPG, PNG, TIFF, WebP and BMP all work: digital PDFs, scans, phone photos and screenshots. For Google Drive or Dropbox, share the file so that "anyone with the link" can open it, then paste the share link. The tool turns it into a download.
- Or use Or upload one file to upload a single file from your computer.
- In Languages in the documents, pick only the languages your files use. English alone is the most accurate setting for English receipts and photos. Adding more languages than you need makes the results worse.
Click Start.
Step 3: Read the results
When the run finishes, the Output tab shows one row per page. Each page has:
-
text: the whole page in reading order. Table cells are separated by tabs, so if you paste it into a spreadsheet, the columns line up. -
tables: every table on the page as a list of rows, andtablesCsv, the same tables as CSV. -
source:text_layerfor digital PDF pages (read directly, exact) orocrfor scans and photos. -
confidenceandempty: so you can spot faint scans and blank pages. Blank pages are not charged.
For a receipt photo, the items keep their prices:
"tables": [{ "rows": [
["Milk 1L", "1.29"],
["Bread", "2.10"],
["Apples 1kg", "3.45"],
["Coffee 250g", "4.99"],
["TOTAL", "11.83"],
["CARD", "11.83"]
] }]
You can download the output as JSON, CSV or Excel from the Output tab. That gives one row per page. For one spreadsheet row per line item, use step 4.
Step 4 (optional): One CSV with every line item
This short Python script runs the tool on your files and writes every table row from every file into one line-items.csv, with the file name and page in front.
Install the client with pip install apify-client, and copy your API token from Settings → API & Integrations in the Apify Console.
import csv
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("tidelinedata/pdf-image-to-text-ocr").call(run_input={
"fileUrls": [
"https://example.com/invoice-001.pdf",
"https://example.com/receipt-photo.jpg",
],
"languages": ["eng"],
})
with open("line-items.csv", "w", newline="") as f:
out = csv.writer(f)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
for table in item.get("tables", []):
for row in table["rows"]:
out.writerow([item["fileName"], item["page"], *row])
On the two sample files, the CSV looks like this:
02-scanned-invoice.pdf,1,Item,Qty,Unit price,Amount
02-scanned-invoice.pdf,1,"A4 copy paper, box",4,21.50,86.00
02-scanned-invoice.pdf,1,Toner cartridge K-220,2,64.90,129.80
02-scanned-invoice.pdf,1,Desk organiser,3,12.75,38.25
07-receipt-photo.jpg,1,Milk 1L,1.29
07-receipt-photo.jpg,1,Bread,2.10
...
Open it in Excel or Google Sheets, filter by file, and add up the amounts.
Run it on a schedule (no code)
If new invoices land in the same place every day, save your input as a task (top right on the Input page, Save as a new task), then add it to a schedule under Schedules. The task's Integrations tab can upload the results to Google Drive or email them through Gmail. Make and Zapier can also start runs and pick up the results.
What it costs
$3 per 1,000 pages that contain text ($0.003 a page). Blank pages and files that fail to open are free, and there's no separate OCR fee.
- One receipt photo: $0.003
- 500 one-page scanned invoices: $1.50
- A 200-page digital report: $0.60
You can set a maximum cost per run, and the tool stops when it reaches it.
Tips and limits
- Best results: scans at 200–300 DPI, or sharp photos taken straight on with even light. Tilted scans are straightened automatically.
- Printed text only. Handwriting isn't supported.
- A table that continues onto the next page comes back as one table per page.
-
Check
confidenceon faint or tiny print. Low values mean some characters may be wrong. - Two-column pages come out column by column, in reading order.
- Password-protected PDFs aren't supported yet.
Your files are read inside your own run, and the results go only to your own Apify storage. Nothing is kept by the tool's maker.
Tideline Data built this tool. This article was drafted with AI and checked against real runs. Questions or a file it gets wrong? Open an issue on the tool's Issues tab.
Top comments (0)