Passport VIZ Extraction API for Airlines

Eliminate boarding friction and check-in queues. Accurately extract passenger data from both the MRZ and Visual Inspection Zone (VIZ) using a fast API with 24-hour data retention.

200 free credits = 100 Passport scans, no credit card. Then from $5 for 500 credits, pay as you go. See pricing

Extracting passport VIZ and MRZ data for airline passenger verification.

The Vulnerability of MRZ-Only Scanning

For airlines and Online Travel Agencies (OTAs), seamless passenger check-in is critical. However, relying solely on Machine Readable Zone (MRZ) scanners often leads to bottlenecks when passports are damaged, obscured, or non-standard. When the MRZ fails, human agents must manually verify documents against the Passenger Name Record (PNR), causing flight delays and frustrating travelers. For a broader look at modernizing passenger flows, explore our travel identity verification solutions.

StructOCR: The MRZ + VIZ Dual Engine

Powered by our core Passport OCR engine, StructOCR automatically prioritizes the MRZ but intelligently falls back to the Visual Inspection Zone (VIZ) when needed. Operating entirely on Cloudflare's global edge network, our API-first architecture eliminates the need for bulky SDKs, allowing you to instantly deploy fast passport parsing directly into custom airport kiosks or web booking engines.

Live Demo: Passport scanner

No registration required. Upload a file to test the extraction.

1
Upload
2
Results
↑

Drop files here or click to browse

JPG · PNG · PDF · TIFF  ·  up to 500 files · max 4.5 MB each

No document handy?

No files selected
Need more testing? Create a free account to get 200 free credits (equals 100 Passport scans).

Core Aviation & Travel Applications

Self-Service Airport Kiosks

Integrate pure HTTP API calls directly into Linux or Windows-based kiosks where traditional mobile SDKs cannot be deployed, ensuring fast baggage drop and check-in.

Global OTA Flight Booking

Autofill passenger details instantly from user uploads. We natively support USDT/Crypto payments to bypass traditional fiat friction for global SaaS and travel platforms. View our straightforward API pricing.

Automated PNR Matching

Extract deterministic, ISO 8601 formatted names and dates from the VIZ to programmatically cross-reference with Amadeus or Sabre PNR databases.

Pre-Flight Visa & APIS Checks

Capture accurate passport expiry dates and issuing countries in seconds to validate Advance Passenger Information Systems (APIS) requirements before boarding.

Technical Specs

  • Dual Engine Fallback: Automatically targets the MRZ and seamlessly falls back to VIZ layout parsing if optical data is degraded.
  • Strict ISO 8601 Normalization: Guarantees dates are returned as `YYYY-MM-DD` for flawless integration with global GDS (Global Distribution Systems).
  • Edge Deployment: Deployed across Cloudflare's network to guarantee sub-1.2s latency for kiosks located in international airports.
  • API-First Architecture: 100% RESTful integration eliminates the need to install mobile SDKs on diverse proprietary kiosk hardware.

Key Features

  • Universal Coverage: Supports visual layout extraction from over 195+ countries, including complex non-standard passports.
  • Base64 & File Native: Stream passenger document data securely without exposing PII on intermediary public URLs.
  • 24-Hour Data Retention: Images and results are deleted within 24 hours.

Integration & AI Prompts

Bypass SDK compatibility issues completely. Stream Base64 image data directly from your check-in terminal to our edge nodes. For complete payload schemas, consult our official Passport OCR Developer Documentation.

import requests
import base64

# 📚 Developer Docs: https://structocr.com/developers/passport-ocr

# Note: StructOCR is strictly API-first. Send Base64 directly 
# from any kiosk backend or booking server—no SDK required.

with open("passenger_passport.jpg", "rb") as image_file:
    base64_image = base64.b64encode(image_file.read()).decode('utf-8')

url = "https://api.structocr.com/v1/passport"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "img": base64_image
}

try:
    # Processed at the edge; images are deleted within 24 hours
    print("Extracting VIZ/MRZ Data for PNR Match...")
    response = requests.post(url, headers=headers, json=payload)
    result = response.json()

    if result.get('success'):
        print("✅ Passenger Data Extraction Complete!\n")
        
        # Standardized ISO 8601 Data for Airline Systems (Amadeus/Sabre)
        core = result['data']
        print(f"Passenger: {core.get('surname')}, {core.get('given_names')}")
        print(f"Doc No:    {core.get('passport_number')} ({core.get('country_code')})")
        print(f"DOB:       {core.get('date_of_birth')} (ISO 8601 Validated)")
        print(f"Expiry:    {core.get('date_of_expiry')} (ISO 8601 Validated)")
    else:
        print(f"❌ Extraction Failed: {result.get('error')} - {result.get('message')}")
except Exception as e:
    print(f"Error: {e}")

Standardized JSON Output

Receive highly deterministic, cleanly structured passenger data ready for immediate insertion into your departure control system.

{
  "success": true,
  "data": {
    "type": "passport",
    "country_code": "IND",
    "nationality": "INDIAN",
    "passport_number": "Z1234567",
    "surname": "SHARMA",
    "given_names": "RAHUL",
    "sex": "M",
    "date_of_birth": "1988-07-22",
    "place_of_birth": "NEW DELHI",
    "date_of_issue": "2021-04-10",
    "date_of_expiry": "2031-04-09",
    "issuing_authority": "MINISTRY OF EXTERNAL AFFAIRS",
    "country_specific": {
      "last_page": {
        "father_name": "AMIT SHARMA",
        "mother_name": "SITA SHARMA",
        "spouse_name": "PRIYA SHARMA",
        "address": "FLAT 4B, GREENWOOD APARTMENTS, NEW DELHI PIN: 110001, INDIA",
        "old_passport_number": "P7654321",
        "old_passport_issue_date": "2010-01-05",
        "old_passport_issue_place": "DELHI",
        "file_no": "DL1076071103622",
        "ecr_status": null
      }
    }
  }
}

Frequently Asked Questions

Why extract data from the VIZ instead of just the MRZ?

While the MRZ is highly standardized, physical damage, glare, or poor lighting at airport kiosks frequently cause MRZ scans to fail. By falling back to the Visual Inspection Zone (VIZ), our API can still extract critical passenger details, dramatically reducing the need for manual agent intervention.

Can we integrate this directly into airport check-in kiosks?

Yes. Because StructOCR is a pure REST API and does not rely on mobile SDKs, it can be integrated instantly into any internet-connected kiosk running Linux, Windows, or a web-based UI by simply sending a Base64 image via HTTP POST.

How does the API handle date formatting for airline systems?

Our engine strictly normalizes all extracted dates (Date of Birth, Issue, Expiry) into the ISO 8601 `YYYY-MM-DD` format. This ensures deterministic, error-free data matching when cross-referencing passenger identities against legacy GDS platforms like Amadeus or Sabre.

Explore More Travel & KYC Solutions

SOLUTION

Proof of Address (PoA) OCR India

Automate PoA verification. Extract and validate permanent residential addresses from Indian passport back pages. API-first integration with 24-hour data retention.

Travel & KYC
SOLUTION

Remote Hiring Identity OCR API

Automate global remote hiring with our identity OCR API; images are deleted within 24 hours. Extract passport data securely without SDKs. Upload an image to test our free live demo.

Travel & KYC
SOLUTION

REST API for Global Passport MRZ

Extract global passport MRZ data instantly via our fast REST API. No SDK required. Upload an image to test our live demo for free.

Travel & KYC
SOLUTION

Right to Work Passport Verification API

Automate global HR compliance. Extract passport data instantly with our OCR API; images are deleted within 24 hours. No SDK required. Upload an image to test our free live demo.

Travel & KYC
SOLUTION

Passport OCR for Neo-Banks: 24-Hour Retention, SOC 2 Type II

Passport OCR API for neo-bank onboarding: MRZ and VIZ fields as JSON, SOC 2 Type II, and images deleted within 24 hours. No SDK needed. Upload an image to test free.

Travel & KYC
SOLUTION

Automated Hotel Check-In Passport Scanner API

Streamline hotel check-ins with our automated passport scanner API. Extract global guest data instantly without SDKs. Upload an image to test our free live demo.

Travel & KYC
SOLUTION

Crypto KYC Passport API (No SDK)

Passport OCR API for Web3 and Crypto KYC, with 24-hour data retention. Extract global MRZ and VIZ data instantly without SDK bloat. Upload an image to test our free live demo.

Travel & KYC
SOLUTION

DPDP Compliant Indian Passport OCR API

DPDP-friendly OCR API for Indian passports, with 24-hour data retention. Securely extract back-page PII (Address, Parents' Names) for KYC workflows. File, Base64, and URL supported.

Travel & KYC
SOLUTION

GDPR Compliant Passport OCR API

Extract passport data securely with our OCR API; images are deleted within 24 hours. Upload an image to test our free live demo.

Travel & KYC
SOLUTION

India Passport Address Extraction API

Extract highly complex address blocks and PII from Indian passport back pages. OCR API built for global KYC workflows, with 24-hour data retention. Supports Base64, URLs, and direct file uploads.

Travel & KYC

Technical Comparisons & Integrations

Explore platform integrations and competitive analysis

From tutorial to production in 5 minutes.

You've seen the code. Now get your API key, grab your 200 free credits, and see it work with your own images. No credit card required.

Instant Access Cancel Anytime No Credit Card