Document extraction, in practice
What things cost, what breaks in production, and how to build the pipeline properly. Written for developers, with numbers we measured ourselves.
5 min readExtraction that verifies: numbers, codes and IDs
Totals that reconcile, codes that carry the real payload, IBANs that pass their checksum, and raw text whenever a value cannot be verified. What that changes, field by field.
ReadExtract QR codes and barcodes, decoded not guessed
A QR code read by eye comes back plausible and wrong. Veralens returns the exact payload, character for character, and null when the page carries no readable code.
Read5 min readExtracted totals that reconcile to the cent
A total that is off in the last decimal looks right and reconciles wrong. How calculated fields come back exact, how to pin money to two decimals, and how to check the result.
Read6 min readIBANs, countries and dates: normalized or left alone
Countries to ISO codes, IBANs verified by checksum, phones to E.164, dates to ISO 8601. And the rule that makes it safe: anything that does not resolve comes back exactly as printed.
Read7 min readBuild a Cal AI clone: meal photo to calories and macros
A meal photo becomes calories and macros in two jobs with a free nutrition lookup between them. The full recipe, including what you still have to build.
Read5 min readBuild a receipt scanner and bill splitter
One job turns a receipt photo into typed line items and a decoded fiscal QR. Then split it to the exact cent with about fifteen lines of your own code.
Read5 min readBuild a pantry tracker on barcodes and expiry dates
One photo gives you a decoded barcode and an ISO expiry date per product. Open Food Facts fills in the rest, free and with no key. The whole pipeline.
Read5 min readBuild a business card scanner that writes to your CRM
Front and back of a card in one job returns E.164 phones, ISO country codes and a decoded QR. Then one POST to your CRM. Here is the whole pipeline.
Read8 min readBest OCR model in 2026: how to choose
Transcription and extraction are different jobs with different winners. What the benchmarks measure, the four ways a score misleads, and what to use when you need typed fields.
Read6 min readHow to parse unstructured data properly
Skip the classify, route and normalize pipeline. One schema with a typed branch per document shape handles a mixed batch in a single call, and returns values already typed.
Read7 min readPDF to JSON: how to actually get structured data out
Digital PDFs and scanned PDFs are different problems. Code for both routes, why page one is not the document, and the checks that catch errors before they reach your database.
Read6 min readOCR vs LLM extraction: which one you need
OCR gives you characters, extraction gives you typed fields. When plain OCR is the cheaper right answer, when you need a schema, and the two weaknesses of building it yourself.
Read6 min readWhat document extraction costs per 1,000 pages
Published rates hide extract surcharges and creative page definitions. Here is what a page costs on Veralens, measured across 1,651 real pages, and how the market compares.
Read5 min readYour function times out before the document finishes
Extraction takes 3 seconds on a good page and 17 on a bad one, so long documents outlive the request. Why bigger timeouts and retries make it worse, and the job pattern that fixes it.
Read7 min readExtract invoice data as typed JSON with a schema
A working guide to invoice extraction with a JSON Schema: which fields to mark required, how to send a PDF, reading the result, and the four things that actually go wrong.
Read