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

Visa Document Scan API

Structured Saudi visa extraction from PDF or image, with deterministic validity and code-line cross-verification — returned as a clean, flat JSON object.

POST /api/ai/visadoc/scan PDF / PNG / JPG / WebP Max 10 MB KSA eVisa

What it does

The Visa Document Scan API reads a Saudi Arabia visa document (the KSA eVisa / Umrah visa sheet) and returns structured, validated visa details as flat JSON. It accepts the original PDF directly — page 1 is rendered and read — as well as PNG, JPG and WebP photos of the sheet.

A single vision pass transcribes the printed bilingual table and the machine-readable code lines; all dates, validity and cross-checks are then computed deterministically in code. A hosted document copy and an auto-cropped holder photo are returned as URLs.

Features

// structured

Structured extraction

Visa number, application number, visa type, holder details, passport number, place of issue, dates and duration of stay.

// validity

Validity check

validity (valid / expired / unknown) with days_remaining, computed against the current date.

// cross-verify

Cross-verification

The bottom code lines are checked against the printed table; mismatching fields are surfaced, never silently resolved.

// pdf + image

PDF and image input

Send the original visa PDF or a photo of the sheet — up to 10 MB per file.

// hosted

Hosted copies

A hosted document copy plus an auto-cropped holder photo are returned as URLs.

// deterministic

Deterministic by design

Date normalization, validity and the code-line cross-check are performed in code, never by the model.

Verification & validity

The two machine-readable lines at the bottom of the visa are checked against the printed table. The passport-number block carries a valid ICAO 7-3-1 check digit; nationality, name and birth date are compared field by field. Because the code zone is not an ICAO TD3 MRZ, results are never reported as “MRZ-verified”.

cross-checked

The code lines parsed, the passport-number check digit is valid, and no field mismatched. Highest confidence.

visual

The code lines were absent or unreadable, or a field mismatched. Values are read from the printed table only — always verify mismatches against the physical document.

Response fields

A successful read returns HTTP 200 with a flat status / data envelope. Key data fields:

FieldTypeDescription
visa_nostringVisa number.
application_nostringApplication number.
visa_typestringVisa type (e.g. Umrah).
namestringHolder full name.
nationality / nationality_iso3stringHolder nationality, as printed and as ISO alpha-3.
birth_datedateHolder date of birth (YYYY-MM-DD).
passport_nostringPassport number.
date_of_issue / valid_untildateIssue and expiry dates (YYYY-MM-DD).
duration_of_stay_daysintPermitted stay in days.
validitystringvalid / expired / unknown.
days_remainingintDays until expiry (negative once expired).
verificationstringcross-checked or visual.
mismatchesarrayFields where the code lines disagree with the printed table.
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/visadoc/scan
curl -X POST https://apps.travopilot.com/api/ai/visadoc/scan \
  -H "X-VisaDoc-Key: vdk_YOUR_KEY" \
  -F "[email protected]"

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

Pricing on request

The Visa Document 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 Saudi Arabia visa document — the KSA eVisa / Umrah visa sheet issued via visa.mofa.gov.sa — and returns structured, validated visa details as flat JSON, including visa number, holder details, dates, validity and cross-verification.

Yes. It accepts the original visa PDF (page 1 is rendered and read) as well as PNG, JPG and WebP photos of the sheet, up to 10 MB. Rendered PDF pages read more reliably than phone photos.

Every date is normalized and the validity (valid / expired / unknown) with days_remaining is computed in deterministic code against the current date — never by the language model. Use valid_until and days_remaining for eligibility logic.

No. The Saudi eVisa code zone is not an ICAO TD3 MRZ, so results are never reported as MRZ-verified. The bottom code lines are cross-checked against the printed table, and any mismatches are surfaced as a signal to verify against the physical document.

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