- Home
- AI Services
- Visa Document Scan API
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.
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 extraction
Visa number, application number, visa type, holder details, passport number, place of issue, dates and duration of stay.
Validity check
validity (valid / expired / unknown) with days_remaining, computed against the current date.
Cross-verification
The bottom code lines are checked against the printed table; mismatching fields are surfaced, never silently resolved.
PDF and image input
Send the original visa PDF or a photo of the sheet — up to 10 MB per file.
Hosted copies
A hosted document copy plus an auto-cropped holder photo are returned as URLs.
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”.
The code lines parsed, the passport-number check digit is valid, and no field mismatched. Highest confidence.
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:
| Field | Type | Description |
|---|---|---|
visa_no | string | Visa number. |
application_no | string | Application number. |
visa_type | string | Visa type (e.g. Umrah). |
name | string | Holder full name. |
nationality / nationality_iso3 | string | Holder nationality, as printed and as ISO alpha-3. |
birth_date | date | Holder date of birth (YYYY-MM-DD). |
passport_no | string | Passport number. |
date_of_issue / valid_until | date | Issue and expiry dates (YYYY-MM-DD). |
duration_of_stay_days | int | Permitted stay in days. |
validity | string | valid / expired / unknown. |
days_remaining | int | Days until expiry (negative once expired). |
verification | string | cross-checked or visual. |
mismatches | array | Fields where the code lines disagree with the printed table. |
photo_url | string | Auto-cropped holder portrait, or null. |
Quick start
A single authenticated request returns structured JSON. Use your scoped key in the request header.
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.