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.
-
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 AI 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: image to JSON with fetch, idempotency 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.