Here's the minimum viable receipt OCR implementation in Python. Get your API key at docuparseapi.com/signup — free, no credit card — and run this:
What the response looks like
Every field is already named, typed, and normalized. Access receipt['merchant'] directly — no parsing required. Missing fields return null rather than being omitted, so you never need to check for key existence.
Supported formats
The API accepts JPG, PNG, and PDF files up to 10MB. It handles both digital receipts and scanned or photographed paper receipts — OCR is applied automatically when needed.
Processing a folder of receipts
Also works with *.png and *.pdf — just add more glob patterns.
Async version for FastAPI and asyncio
Install httpx with pip install httpx if you don't have it.
Error handling
Storing results
Use document_id as your deduplication key — it's unique per extraction, so storing it prevents double-processing the same receipt.