Blog
How to read passports and identity cards in code, and what the answers mean – written by the people who build doc.cheap, with every claim about the product checked against it.
doc.cheap is a Passport and ID OCR API that returns a document as JSON, and the free passport OCR API takes its first calls with no account.
-
What an MRZ check catches and what it cannot: a screening primer
What an MRZ check catches in KYC screening – misreads and most swaps – and what it cannot: consistent forgeries, copied data, expiry, photo swaps.
-
Names in the MRZ: transliteration, truncation and the << separator
How a passport MRZ writes a name: the << separator, fillers, transliteration to A–Z and truncation, with a Python parser and test vectors.
-
Passport OCR in PHP and Laravel: read the MRZ with curl and the Http client
Read a passport MRZ in PHP with plain curl or Laravel's Http client: one request, retries under one idempotency key, error codes and the billed flag.
-
Reading passports from Claude Code and Cursor: three workflows
Three passport OCR workflows for Claude Code and Cursor: a folder of scans into a CSV, one passport against a form, and offline test fixtures.
-
Guest registration in Spain, Italy and Germany: what a check-in form must capture
The guest data hotels in Spain, Italy and Germany must record at check-in, which fields come off the passport, and the deadlines and retention periods.
-
TD1 ID cards and the MRZ: which national IDs must carry one under EU law
Where the national ID card MRZ sits on a TD1 card, what its 90 characters mean, and which EU identity cards must carry a working MRZ from 3 August 2026.
-
Passport OCR in C#: read the MRZ with HttpClient, records and safe retries
Read a passport MRZ in C# with one HttpClient call: typed records for the result, retries that reuse one idempotency key, and the billed flag.
-
The MCP specification of 2026-07-28 for tool servers: what a document-reading server changes
MCP 2026-07-28 drops sessions and the initialize handshake. What that means for a tool server that reads passports, and what is still left to build.
-
Read, return, forget: processing passport scans without storing the image
What the GDPR asks of a passport image, where copies leak in a typical upload flow, and a read, return, forget pattern that keeps none on the API side.
-
Passport OCR in Python: one request, safe retries and the billed flag
Read a passport photo into JSON from Python with requests: one call, retries under an idempotency key that cannot double-charge, and the billed flag.
-
MRZ dates have no century: reading YYMMDD without year-2000 bugs
MRZ dates are YYMMDD with no century. The rule for birth and expiry dates, the 29 February trap, and Python and JavaScript code with test vectors.
-
EU Digital Identity Wallets are due by 24 December 2026: what changes for apps that scan passports
Where the 24 December 2026 wallet deadline comes from, what a wallet hands over, and why a passport or ID card scan stays as the fallback.
-
How passport MRZ check digits work (with a validator in Python and JavaScript)
The 7-3-1 algorithm behind every passport and ID card MRZ, where each check digit sits in TD1, TD2 and TD3, and a validator you can paste.
-
Letting an agent read identity documents over MCP
Give Claude, Cursor or any MCP client a tool that reads passports and ID cards into JSON: setup, the three tools, cost control and privacy.
-
Passport OCR in Node.js: fetch, safe retries and the billed flag
Read a passport or ID card photo into JSON from Node.js with plain fetch: retries that cannot double-charge, and failed scans that cost nothing.