*** September 2026 Major Release ***Read and watch
Document type

Extracting data from passports

Every country designs its own passport, and an ICAO standard fixes the machine-readable zone at its foot. An airline boarding a passenger and a bank opening an account both read one to confirm who someone is. A large onboarding team checks thousands a month, arriving as phone photographs through an app.

A verifier needs the passport number, the issuing country, the date of expiry and the two machine-readable lines. An identity platform recomputes the MRZ check digits against the printed fields, then screens the holder against sanctions lists.

Page 1 of a sample Passport, with extracted values outlined
606Markdown characters
1parse blocks
10fields extracted
The problem

What makes passports hard

The MRZ repeats everything

Two lines of fixed-format text at the foot of the page carry the identity data again, with check digits over each group.

Labels come in two scripts

A passport labels each field in its own language and again in a second, and carries fields particular to the country that issued it.

Curved pages and laminate glare

The identity page is photographed open, so it curves at the spine and the laminate throws glare across the print.

How it works

Parse, extract, verify

1

Parse

Parse turns the document into reading-order Markdown and a hierarchy of blocks (text, tables, figures), and grounds each block to its exact location on the page.

2

Extract

You define the fields in a JSON schema, and Extract returns their values in a consistent, structured format, each linked back to where it appears in the Markdown.

3

Verify

Each value links back to where it appears, down to the character range in the Markdown, and the page and bounding box in the source document, so every result can be verified.

Worked example

One passport, end to end

About this document: The official specimen of the identity page of Japan's passport, published by the Ministry of Foreign Affairs. One landscape image, bilingual throughout, with a two-line machine-readable zone along the foot and a handwritten signature in kanji and hiragana. Every value is specimen data, with SPECIMEN printed across the page, so no redaction was needed.

Processing objective: The objective is to read the document's identity off a single image: what it is, who issued it and when it was issued. The issue date is returned as an ISO date, normalized from the day-month-year the page prints.

Demonstration fields: Document type, Passport number, Issuing country, Sex, Date of issue

The document

1 page
  • Page 1 of the sample PassportPage 1shown below

Where each value came from

Page 1 of the sample Passport, with every featured field outlined
Document typedocument_type
Passport
The region of the sample Passport containing Document type, with the extracted value outlined
extraction_metadata["document_type"]
{
  "value": "Passport",
  "page": 1,
  "range": {
    "end": 46,
    "start": 38
  },
  "box": {
    "xmin": 0.16032,
    "ymin": 0.21425,
    "xmax": 0.29217,
    "ymax": 0.25035
  }
}
Passport numberdocument_info.document_number
ZZ0000826
The region of the sample Passport containing Passport number, with the extracted value outlined
extraction_metadata["document_info.document_number"]
{
  "value": "ZZ0000826",
  "page": 1,
  "range": {
    "end": 114,
    "start": 105
  },
  "box": {
    "xmin": 0.66971,
    "ymin": 0.2445,
    "xmax": 0.84877,
    "ymax": 0.28703
  }
}
Issuing countrydocument_info.issuing_country
JAPAN
The region of the sample Passport containing Issuing country, with the extracted value outlined
extraction_metadata["document_info.issuing_country"]
{
  "value": "JAPAN",
  "page": 1,
  "range": {
    "end": 9,
    "start": 4
  },
  "box": {
    "xmin": 0.70137,
    "ymin": 0.15423,
    "xmax": 0.83184,
    "ymax": 0.19791
  }
}
Sexpersonal_info.sex
F
The region of the sample Passport containing Sex, with the extracted value outlined
extraction_metadata["personal_info.sex"]
{
  "value": "F",
  "page": 1,
  "range": {
    "end": 205,
    "start": 204
  },
  "box": {
    "xmin": 0.33046,
    "ymin": 0.52174,
    "xmax": 0.35816,
    "ymax": 0.5586
  }
}
Date of issuedocument_info.date_of_issue
2025-03-24
The region of the sample Passport containing Date of issue, with the extracted value outlined

Printed on the page as 24 MAR 2025, normalized on extraction.

extraction_metadata["document_info.date_of_issue"]
{
  "value": "2025-03-24",
  "page": 1,
  "range": {
    "end": 320,
    "start": 309
  },
  "box": {
    "xmin": 0.3312,
    "ymin": 0.58968,
    "xmax": 0.56773,
    "ymax": 0.62824
  }
}

How to try it yourself

Everything on this page is reproducible. The sample, its schema, and the Parse and Extract API outputs are published. You can repeat the same two calls from whichever surface you already build on.

  • Claude Skilldescribe the job; the agent writes it
  • CLIno code at all
  • MCPexpose ADE docs as an agent tool
  • REST APIany language
  • Pythonlandingai-ade
  • TypeScriptlandingai-ade
Why LandingAI?

Documents into data

Accurate

The best accuracy on the difficult documents other tools get wrong, such as messy scans, complicated tables, checkboxes and handwriting.

Auditable

Every answer cites its sources. Values come back with an audit trail (page, bounding box, character range) so a human can review them.

Agentic

Applies multi-step reasoning, and plans before it acts. Handles documents it has never seen before and adapts to variations.

API-first

Composable APIs that drop into any tech stack and can be called from anywhere. Easy to build on and embed in your pipelines and products.

Affordable

Cost-competitive rates with complete price transparency. Spend controls before you run, and every job reports its exact cost.

Enterprise-grade

Built for production and scale from day one. Fully observable and monitored, running securely in our cloud or yours.

Built for high-volume, high-throughput production

  • Zero data retention
  • Priority rate limits
  • Enhanced support
  • VPC and on-prem deployment

Available on Team and Enterprise plans.

Compare plans
Capabilities

Passport processing highlights

Every country's passport design
Machine-readable zone lines
Bilingual field labels
Non-Latin scripts
Handwritten signatures
Passport and document numbers
Issue and expiry dates
Nationality and issuing country
Photographed identity pages
Country-specific fields
Dates normalized to ISO
Bounding box for every value
FAQs

Questions, answered

Yes. Both MRZ lines come back character for character, including the filler characters, so the check digits can be recomputed and compared against the printed fields above them.

Yes. Labels and values in a non-Latin script parse as text, alongside the Latin transliteration a passport prints beside them. A handwritten signature comes back as text too.

No. One schema covers passports from any issuing authority. A field a particular country does not print comes back null, and the fields it does print come back attributed to the names you gave them.

Every value comes back with its page, a bounding box and the character range in the parsed Markdown. A date returned in ISO form still points at the day-month-year printed on the page, so a reviewer sees both.

A passport carries a name, a date of birth, a document number and a portrait. A schema can ask for the document fields alone. Accounts are available with zero data retention, alongside SOC 2 Type II, GDPR and HIPAA compliance.

Start extracting passport data

Reliable, structured outputs with full traceability in minutes