cd /news/ai-tools/local-receipt-extractor · home › topics › ai-tools › article
[ARTICLE · art-152402] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Local Receipt Extractor

A developer built a command-line tool that extracts structured data—vendor, date, total, currency, and expense category—from receipt and invoice images using an open-weight vision model (qwen2.5vl:7b by default) run locally through Ollama. The tool outputs one JSON line per receipt, supports batch processing to CSV, and lets users swap models via a flag such as --model gemma3:4b, keeping sensitive financial documents off cloud services. The developer notes small local models can misread blurry or unusual receipts and recommends spot-checking output before handing it to an accountant.

by read2 min views1 publishedOct 18, 2026

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

A small command-line tool that reads receipt and invoice images and returns clean, structured data: vendor, date, total, currency, and expense category.

Who would pay for it: freelancers and small-business owners who spend every quarter digging through photos and screenshots of receipts before tax season. A bookkeeper handling several clients' receipts could use it too.

The problem it solves: manual data entry is slow and tedious, and receipts contain client names and payment details that people don't want to upload to a cloud service. This tool turns a folder of messy images into structured data, and everything stays on the user's machine.

Example output:

{"file": "receipt_01.jpg", "vendor": "Starbucks", "date": "2024-03-12", "total": 8.45, "currency": "USD", "category": "meals"}

A tiny script that reads receipt images with an open-weight vision model running locally via Ollama and returns structured data: vendor, date, total, currency, and expense category.

No cloud API, no per-page fees, and receipts never leave your machine.

ollama pull qwen2.5vl:7b

pip install ollama pydantic
python receipt_extract.py receipt.jpg
python receipt_extract.py ./receipts --csv results.csv
python receipt_extract.py ./receipts --model gemma3:4b

Example output (one JSON line per receipt):

{"file": "receipt.jpg", "vendor": "Starbucks", "date": "2024-03-12", "total": 8.45, "currency": "USD", "category": "meals"}

Usage is one line:

python receipt_extract.py ./receipts --csv results.csv

The model is a command-line flag (--model gemma3:4b), so swapping models needs no code changes.

Where it fell short: small local models can misread blurry or unusual receipts. A larger closed model would probably do better on those. For a tool that handles sensitive financial documents, I think the privacy and zero-cost trade is worth it, as long as the output is spot-checked before it goes to an accountant.

── more in #ai-tools 4 stories · sorted by recency
── more on @ollama 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/local-receipt-extrac…] indexed:0 read:2min 2026-10-18 · —