Visa requirement check
A US passport going to Mexico needs no visa for stays of up to 180 days, according to a small fixed reference table of 25 country pairs. Enter two-letter codes for passport and destination to see visa required, on arrival or not needed. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Passport country
- US
- Destination country
- MX
- Pair key
- US>MX
- Visa status
- visa_free
- Status label
- Visa-free
- Table size
- 25
Planning an international trip almost always starts with the same practical question: does my passport need a visa for that destination?
What the visa status values mean and how the lookup works
This capability answers a narrow, high-value question: for a given passport-issuing country and a destination country, what does the stub reference table say about entry formalities? Three outcomes are supported. Visa required means the traveler should obtain a visa (or approved electronic authorization treated as a pre-travel visa) before boarding or border control; the response does not invent consulate URLs or forms, it only labels the status so your product can route the user to the right next step.
Visa on arrival means the table records that a visa or equivalent permission may be granted at the port of entry under the stub rules, often with a suggested maximum stay in days when the row includes that detail. Visa-free means the table records that short-stay entry does not require a separate visa application for that passport and destination under the stub data.
The algorithm is deliberately simple and deterministic: normalize both country fields to uppercase two-letter ISO 3166-1 alpha-2 codes, reject malformed codes and same-country pairs, build a pair key of the form PASSPORT greater-than DESTINATION, and probe an in-memory hash map. Remember that real visa policy changes with nationality, purpose of travel, prior refusals, and bilateral agreements; this stub freezes a small educational set so engineering teams can wire UX and billing without scraping the web or calling paid visa APIs during development.
Where a quick visa check helps
Travel marketplaces and booking sandboxes need a reliable signal to show visa-required badges before a cart is abandoned, but live government feeds are flaky, rate-limited, or licensed. A parse-tier stub with a fixed table lets product teams ship the UX path, write end-to-end tests, and train support agents on three discrete statuses without depending on the network. Education and exam platforms teaching tourism regulations can quiz learners on ISO country codes and map statuses without scraping Wikipedia.
Internal tools that normalize passenger name records often need a cheap secondary check: given passport issuing country and itinerary destination, attach a stub flag for ops review. Failed validation does not consume balance.
What you can do with it
Booking and checkout visa badges
Show visa-free, visa-on-arrival, or visa-required labels on trip summaries when the passenger passport and destination pair exists in the stub table.
FAQ
What happens if the country pair is not in the reference table?
The stub never invents a visa policy for unknown passport and destination combinations, and failed validation is not billed.
Is this live official visa advice?
No. This is a deterministic stub reference table for product demos, tests, and educational lookups. Always confirm entry rules with embassies or official government sources before travel.
Which country code format is accepted?
Two-letter ISO 3166-1 alpha-2 codes only, case-insensitive (US, us, and Us all normalize to US). Three-letter codes, names like Mexico, and same-country pairs are rejected.
What do the three visa statuses mean?
Visa required means getting a visa or an approved electronic authorization before you travel. Visa on arrival means permission may be granted at the border. No visa needed means a short stay without a separate application.
Does the result tell me how long I can stay?
Only when the table row includes a maximum stay. For a US passport going to Mexico it shows up to 180 days; for pairs without that detail, no stay limit is given.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/travel/visa-required-check-stub \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"passport_country":"US","destination_country":"MX"}'const res = await fetch("https://api.kit.forhosting.com/travel/visa-required-check-stub", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"passport_country": "US",
"destination_country": "MX"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/travel/visa-required-check-stub",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"passport_country": "US",
"destination_country": "MX"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/travel/visa-required-check-stub", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"passport_country":"US","destination_country":"MX"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"passport_country":"US","destination_country":"MX"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/travel/visa-required-check-stub", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"passport_country": "US",
"destination_country": "MX"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "travel.visa_required_check_stub",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
When the pair is not present in the table the call fails with invalid_input instead of inventing a policy.
What the visa status values mean and how the lookup works
A hit returns visa_status, a human-readable status_label, optional max_stay_days when known, notes, and metadata such as table_size and method. A miss throws invalid_input naming the missing pair.
Input contract, response shape, and error behaviour
If both codes are valid and different yet the ordered pair is absent from the built-in reference table, the task fails with a clear message that the country pair is not in the reference table—those failures are not billed. POST a JSON body with two required string fields: passport_country and destination_country. Each value must be a two-letter ISO 3166-1 alpha-2 country code; case is ignored, surrounding whitespace is trimmed, and anything that is not exactly two Latin letters after normalization fails with invalid_input naming the field. Numeric or object payloads for those fields are rejected. On success the body echoes the normalized passport_country and destination_country, the pair_key used for the probe, visa_status as one of visa_required, visa_on_arrival, or visa_free, a status_label suitable for UI display, notes describing the stub row, in_reference_table set to true, method set to stub_reference_table_lookup, and table_size equal to the number of pairs currently shipped. When the row includes a positive maximum stay, max_stay_days is present as an integer; when the stub does not define a stay limit for that pair the field is omitted entirely rather than returned as null, matching the renderer contract for optional output. Example: passport_country US and destination_country MX yields visa_free with a multi-month max_stay_days under the stub table. Example: passport_country US and destination_country CN yields visa_required without max_stay_days. Pair the response with your own eligibility forms, passport photo capture, or embassy deep links if you need a full application funnel; this endpoint only classifies the pair against the reference table and does not process applications, collect biometrics, or check watchlists.
Where a stub visa requirement API earns its keep
That combination gives reproducible visa_status values for demos, LMS plugins, and edge workers without standing up a geopolitical data pipeline of your own.
Integration use cases
QA and golden regression for travel UX
Drive deterministic tests for travel onboarding flows with fixed ISO pairs instead of flaky live embassy scrapers.
Education and content widgets
Let learners and readers look up sample passport-to-destination statuses in the browser with the same logic the API bills at $0.002.
Technical questions
How do I check if a visa is required for my destination?
Send passport_country and destination_country as ISO 3166-1 alpha-2 codes (for example US and MX). The API returns visa_status as visa_required, visa_on_arrival, or visa_free when the pair is in the reference table.
What does the visa requirement check cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.