Passport and ID OCR API – one HTTP call, 1¢ per document
doc.cheap is a passport and ID OCR API that turns a photo of a travel document into structured JSON in a single HTTP request. Send an image, get the machine-readable zone parsed, the ICAO 9303 check digits verified and the visual-inspection-zone fields extracted – in the same response, with no queue to poll and no SDK to install. Your first successful call takes under 60 seconds and needs no registration: a public sandbox key is already in the example below. An account gets 100 free documents every month. After that every recognised document costs one cent, the same price from your first document to your ten-millionth, and a scan that finds nothing costs nothing at all.
- ✓ One synchronous call
- ✓ First call in 60 seconds
- ✓ No registration to start
- ✓ Flat JSON, no parsing
A decorative animation: the Earth, with its continents drawn in the characters of a machine-readable zone, turning and then unfolding into a flat map. Underneath it, the machine-readable zone of the specimen passport used throughout this site is typed out.
Try it now – no account, no card, no trial
Upload a document image and get the recognised fields on screen. The demo runs your own image through the public sandbox key – a real recognition, free, with no account – and the request beside it is the same one, ready to paste into a terminal. When you want it in your own code, the first-recognition guide takes it from here.
Try it now – no account
Drop a passport or ID image and recognition starts straight away. It is resized in your browser and sent to the public sandbox; the image is never stored.
The same call, in your terminal
curl -X POST https://api.doc.cheap/v1/scans \
-H "Authorization: Bearer sk_sandbox_public" \
-H "Content-Type: application/json" \
-d "{\"image\": \"$(base64 < document.jpg | tr -d '\n')\"}" The recognition result appears below the moment you pick an image – every field, in every language it was read in, with the machine-readable zone checked digit by digit.
What comes back: every field, cross-checked
One response carries the whole reading. The machine-readable zone is checked digit by digit against ICAO 9303 and comes back as one verdict, with the lines it was read from beside it; every field printed on the page comes back re-keyed to a stable name, once per language it was read in. Every field states its own confidence. Recognising a passport walks the whole call, and the field explorer lists every key with its type.
meta
What this scan is and how it went: its id, its status, whether it drew a credit, and where the time went.
schema_version · id · status · billed · confidence · timing · created_at · reference
document
What kind of document was recognised, which state issued it, its number and dates, and whether it has expired. Null when nothing was recognised.
kind · country · country_name · issuing_state · issuing_state_detail · type_name · type_confidence · number · series · issue_date · expiry_date · is_expired · days_remaining
holder
The person the document identifies. Null when nothing was recognised.
given_names · surname · full_name · birth_date · sex · nationality · nationality_detail
fields[]
Every field read off the printed page, re-keyed to a stable name. One entry per reading, each with its own language and confidence band.
id · name · label · category · value · language · confidence
mrz
The machine-readable zone: a verdict on whether it checks out, the reason when it does not, and the lines themselves exactly as read.
status · reason · lines · text
images
Crops taken from the picture you sent, each one a data URL.
document_crop · rear · main_photo · signature · watermark_face · barcode · chip
quality
Whether the picture you sent was good enough to recognise from.
overall
authenticity
Authenticity verification. It does not run under the recognition-only call, which reports it as not checked.
overall · checks
A specimen zone, and what the parser does with it
Invented holder, invented numbers, check digits computed from them. Paste it into the MRZ parser to see every digit recomputed in your own browser, or read how TD1, TD2 and TD3 differ.
P<GRCPARADEIGMA<<ELENI<SOFIA<<<<<<<<<<<<<<<<
AM73045184GRC9403084F3203101PN48291630<<<<72Pricing: 1¢ per document – and only when it works
1¢ per document
Same price for everyone, at any volume – the first document and the ten-millionth cost the same.
Free – 100 documents every month on your own account, then 1¢ per recognised document.
You pay only for documents we actually recognise.
Blurry photo, no document in frame, unknown type – free. You never pay for a failed scan.
- ✓ 10 free recognised documents per address on the public sandbox key, with no account at all – at most 10 requests an hour, whatever their answer.
- ✓ Free – 100 documents every month on your own account, once you confirm your email – back to 100 at 00:00 UTC on the 1st. No card needed.
How doc.cheap compares
List prices, each read on the vendor's own pricing page and linked to it. A vendor whose prices are not readable from its public pages is left out rather than estimated: one unverifiable number would make the whole table worthless. The full comparison adds what a failed scan costs and which of them can be called without an account.
| Provider | Published price | Free to start |
|---|---|---|
| doc.cheap | $0.01 per document, flat at any volume | Free – 100 documents every month; public sandbox, no signup |
| AWS Textract – Analyze ID | $0.025 a page up to 100,000 a month; $0.01 a page above that (us-west-2) source | 100 pages a month for the first three months |
| Google Document AI | $0.10 per document (US passport parser); $0.10 (driver licence) source | – |
| Mindee | Additional credits "starting from $0.05", plus a 20 % overage charge source | – |
| doc.cheap | $0 – a scan that finds no document is not billed, and the response says so in a billed flag. |
|---|---|
| The three above | No exception is published on any of their pricing pages. |
We physically do not store your documents
The uploaded image lives in memory only, for the length of the request, and is never written to disk. What is kept is the result – the outcome and the extracted fields, never a picture of the document – for as long as you choose: a year, a month, a week, a day, or nothing at all.
Passport OCR for agents: the MCP server
An agent that has to read a passport does not need an HTTP client written for it. doc.cheap ships a Model Context Protocol server, so an assistant calls recognition as a tool: hand it an image, get the same structured fields back. Same key, same price, same response shape as the API – nothing is a separate product.
Questions developers ask
What is OCR in a passport?
Optical character recognition reads the printed characters off a photograph of the document and turns them into text. In a passport there are two things to read: the two lines of the machine-readable zone at the foot of the page, which are printed in a font designed to be read by machine, and the visual-inspection zone above it, which is ordinary print laid out differently by every issuer.
What is an MRZ?
A machine-readable zone is the block of fixed-width lines at the foot of a passport or identity card, standardised by ICAO Doc 9303. It encodes the document number, issuing state, name, nationality, date of birth, sex and expiry date, each at a fixed offset, with check digits that verify the reading.
What is ICAO Doc 9303?
ICAO Doc 9303, Machine Readable Travel Documents, is the specification every passport and machine-readable identity card follows. It is published in parts: Part 3 carries the specifications common to all machine-readable travel documents, and Parts 4, 5 and 6 carry the TD3 passport, the TD1 card and the TD2 card respectively. It is what makes a passport issued anywhere readable by a reader built anywhere.
Is the Passport OCR API prone to mistakes?
Any reading of a photograph can be wrong, so the answer is built to be checkable rather than trusted. Every machine-readable zone is verified against its own ICAO 9303 check digits and the verdict is in the response; every field carries a confidence band; and where the zone and the visual-inspection zone disagree, both readings are returned rather than one being silently preferred.
Do you store any of my data?
The uploaded image is held in memory for the length of the request and is never written to disk. What can be kept is the result – the outcome and the extracted fields – for a window you choose on the account or per request, from a year down to zero, and zero means nothing is written at all.
Are there free trials or demo versions available?
There is no trial to sign up for, because there is nothing to sign up for first. A public sandbox key is printed in the documentation and in the example on this page, and it performs real recognitions. An account gets 100 free documents every month, back to 100 on the 1st; beyond them you top the balance up and every recognised document draws one credit.
Can fake or manipulated documents be detected?
No, and the response says so rather than staying quiet: the authenticity field reads not_checked. This service performs recognition, and recognition is not authentication – nothing here inspects a document's security features. Check digits that pass prove the zone is internally consistent, which anybody producing a counterfeit also gets right; what they catch is damage, glare and misreading.
What is an MCP server for document processing?
The Model Context Protocol is the standard by which an assistant reaches a tool. An MCP server for document processing exposes recognition as a tool the assistant can call, so an agent can hand it a passport image and get structured fields back without anybody writing HTTP code. doc.cheap ships one, and it uses the same key and the same price as the API.