Introducing TravoPilot — the AI layer travel businesses build on. Book a demo →
✦ AI Service · Passport

Passport Scan API

Read a passport bio-data page and get a clean, integration-ready JSON structure — the Machine Readable Zone and printed fields extracted in one pass and validated against the ICAO 9303 standard.

POST /api/ai/passport/scan PNG / JPG / WebP Max 10 MB ICAO-9303

What it does

A single vision pass transcribes both the Machine Readable Zone (MRZ) and the printed Visual Inspection Zone (VIZ) of a passport. The MRZ is then validated against the ICAO 9303 standard in deterministic code, so values are reported as MRZ-verified when every check digit passes, or as a clearly-labelled visual read otherwise.

The holder photo is auto-cropped and a hosted copy of the page is returned. When the Personal Data & Emergency Contact page is included in the same shot, father, mother and spouse names, addresses and emergency contact are returned too.

Features

// mrz + viz

MRZ + VIZ extraction

Both the machine-readable zone and the printed fields are read in a single pass.

// icao 9303

ICAO 9303 validation

Passport, birth-date, expiry, personal-number and composite check digits are recomputed and compared.

// states

Four verification states

Every read is labelled verified, mismatch, mrz_failed or visual_only.

// expiry

Expiry logic

days_remaining and a six-month-validity flag, computed deterministically.

// personal data

Personal Data page

Optional family names, addresses and emergency contact when that page is in frame.

// photo

Auto-cropped photo

The holder portrait is cropped automatically and hosted copies are returned.

How verification works

The MRZ check digits are recomputed under ICAO 9303 and compared against the printed page. Every read is reported in one of four states, and per field the authoritative value is the MRZ value when verified, otherwise the printed-page value. Conflicts are surfaced, never silently resolved.

verified

All MRZ check digits valid and every printed field matches. Fully trustworthy.

mismatch

MRZ check digits valid, but a printed field differs. Flagged for review.

mrz_failed

MRZ present but a check digit failed. Values fall back to the printed page; not checksum-verified.

visual_only

No readable MRZ. Printed-page values only; not checksum-verified.

Response fields

A successful read returns HTTP 200 with a flat status / data envelope. A representative subset of the data fields:

FieldTypeDescription
given_names / surnamestringHolder name (authoritative source).
title / genderstringMr/Ms; M/F/X.
dobdateDate of birth (YYYY-MM-DD).
pax_ageintAge computed from date of birth.
doc_countrystringIssuing country (ISO alpha-2).
doc_nostringPassport number.
doc_dateofexpirydateExpiry date (YYYY-MM-DD).
personal_nostringPersonal No. / national ID (when printed).
verificationstringverified / mismatch / mrz_failed / visual_only.
photo_urlstringAuto-cropped holder portrait, or null.

Quick start

A single authenticated request returns structured JSON. Use your scoped key in the request header.

// POST /api/ai/passport/scan
curl -X POST https://apps.travopilot.com/api/ai/passport/scan \
  -H "X-Passport-Key: psk_YOUR_KEY" \
  -F "[email protected]"

Replace psk_YOUR_KEY with your scoped Passport key. SDK examples for PHP, Node.js and Python are included in the full integration reference, available on request.

Pricing on request

The Passport Scan API is priced separately from the core TravoPilot platform, based on your volume and use case. For a quote, scoped API keys and the full integration reference, email [email protected].

Other AI services

Add AI document intelligence
to your travel workflows.

Tell us what you’re building and we’ll set you up with scoped API keys, the full integration reference and custom pricing.

SCOPED KEYS · FULL REFERENCE ON REQUEST · CUSTOM PRICING

Questions, answered.

It reads a passport bio-data page and returns a flat JSON object with the holder’s name, date of birth, document number, issuing country, expiry date and more — plus an auto-cropped holder photo and a hosted copy of the page.

The Machine Readable Zone (MRZ) is validated against the ICAO 9303 standard in deterministic code. Each check digit is recomputed and compared with the printed page, and the result is reported as one of four verification states so you know how much to trust it.

PNG, JPG and WebP, up to 10 MB per file. Rotation is handled automatically. For the most reliable MRZ check-digit validation, prefer a clear scan over an angled phone photo.

Yes. The raw image is never written to the application database, every read is logged for admin review, and credentials are never written into logs. A passport is sensitive PII, so all traffic is over HTTPS only.

The Passport Scan API is priced separately from the core platform, based on your volume. Email [email protected] for a quote and scoped API keys.