Passports Pick your passport

Travel Visa Requirements API for Developers

Who needs a visa, and for how long? The Travel Buddy API answers it for 200 passports and 211 destinations, with stay lengths, passport-validity rules, mandatory arrival forms and links to official eVisa portals. Checked against government sources and updated daily.

Free plan with 120 requests a month. Paid plans from $4.99.

/v2/visa/map · passport CN China to
01 POST/v2/visa/check

Two country codes in. Everything a traveler needs back.

Send a passport and a destination as ISO alpha-2 codes. The response carries the primary and secondary visa rules with stay lengths, any exception, mandatory arrival registration, passport validity, an embassy link, and destination basics like capital, currency, phone code and time zone.

curl -X POST https://visa-requirement.p.rapidapi.com/v2/visa/check \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Proxy-Secret: ${RAPIDAPI_SECRET}" \
  -d '{"passport":"CN","destination":"ID"}'
200 · responseCN → ID
{
  "data": {
    "passport": {
      "code": "CN",
      "name": "China",
      "currency_code": "CNY"
    },
    "destination": {
      "code": "ID",
      "name": "Indonesia",
      "continent": "Asia",
      "capital": "Jakarta",
      "currency_code": "IDR",
      "currency": "Indonesian Rupiah",
      "exchange": "0.00425",
      "passport_validity": "3 months beyond the period of stay",
      "phone_code": "+62",
      "timezone": "+08:00",
      "population": 277329163,
      "area_km2": 1916907,
      "embassy_url": "https://www.embassypages.com/china#titlePlaceholder2"
    },
    "mandatory_registration": {
      "name": "e-Arrival",
      "color": "yellow",
      "link": "https://link.travel-buddy.ai/?link=76E321T3"
    },
    "visa_rules": {
      "primary_rule": {
        "name": "Visa on arrival",
        "duration": "30 days",
        "color": "blue"
      },
      "secondary_rule": {
        "name": "eVisa",
        "duration": "30 days",
        "color": "blue",
        "link": "https://link.travel-buddy.ai/?link=76E323T2"
      }
    }
  },
  "meta": {
    "version": "2.0",
    "language": "en",
    "generated_at": "2025-09-28T11:47:00+00:00"
  }
}
How it reads in your app
CN→ID·Asia
Indonesia
For holders of a passport from China
Visa on arrival / eVisa – 30 days
Apply for the eVisa on the official site
Mandatory registration: e-Arrival Free, and required before you arrive. Complete the official form
Passport validity
3 months beyond the period of stay
Capital
Jakarta
Currency
Rupiah (IDR)
Phone code
+62
Time zone
UTC+08:00
Embassies and consulates Find one
Hover a row to find its fields in the response.

Two rules, one line

Use primary_rule as the authoritative color for the badge, and combine it with secondary_rule into one customer-facing line.

Visa on arrival / eVisa – 30 days

If neither rule has a duration, drop the days suffix: “Visa required / eTA”.

SituationConditionDisplayDays from
Only a primary rulesecondary_rule is absentprimary – XXX daysprimary_rule.duration
Both have durationsBoth duration fields are presentprimary / secondary – XXX daysprimary_rule.duration
Primary has no durationPrimary is null or empty, secondary has oneprimary / secondary – XXX dayssecondary_rule.duration
exception_rule

When a condition overrides the rule

An exception applies to travelers who meet specific criteria, such as holding a valid visa or residence permit for another country, traveling on an organized tour, or meeting transit-waiver conditions. It comes with a name, an exception type, the full condition text, the related country codes and an official link.

Exception: Visa waiver available for holders of US/CA visas

Show it beneath the rule line. Keep the primary badge color unless your UI lets travelers confirm they meet the criteria.

mandatory_registration

The form travelers forget

Some destinations require a pre-arrival form online, like e-Arrival, pre-registration or an ED card. It is always free, mandatory for all or most travelers, and separate from any visa or eVisa.

Mandatory registration: e-Arrival

Show it near the top of the result and link to mandatory_registration.link so travelers use the official form. It never replaces a visa requirement.

02 POST/v2/visa/map

One passport, every destination, four colors.

Send a passport code and get all 210 destinations grouped by color, ready for a passport-index style map. The map behind this card is the example response for a Chinese passport.

Visa-freeVisa not required, freedom of movement 41
On arrival or eVisaVisa on arrival, eVisa 66
RegistrationeTA, visa-waiver registration 5
Visa requiredVisa or online visa required, not admitted 98
The dark dots are China, the passport country. Hover a color to isolate it, or the map to read a country.
Free color-map example (HTML, jQuery + SimpleMap)
03 POST/v2/passport/rank/custom

Rank passports by what matters to your users.

Give each visa category a weight: positive, zero or negative, integer or float. Every passport scores the sum of its count in each category times that category’s weight, and the list comes back ranked. Categories you leave out count as zero.

Your weights
CategorySEBGWeight
Visa-free 120 95
2
Visa on arrival 30 25
1
Visa required 10 15
0
eVisa 5 8
1
eTA 2 1
1
Tourist card 3 5
0
Freedom of movement 12 5
3
Not admitted 1 2
−1

Counts are the sample values from the documentation. Live responses cover every passport.

Ranked with your weights score = Σ(count × weight)
1
SwedenSE
312
2
BulgariaBG
237
curl -X POST https://visa-requirement.p.rapidapi.com/v2/passport/rank/custom \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Proxy-Secret: ${RAPIDAPI_SECRET}" \
  -d '{
    "weights": {
      "Visa-free": 2,
      "Visa on arrival": 1,
      "Visa required": 0,
      "eVisa": 1,
      "eTA": 1,
      "Tourist card": 0,
      "Freedom of movement": 3,
      "Not admitted": -1
    }
  }'
The request updates as you change the weights.
04 GET/v2/visa/check/history/{passport}/{destination}/{fromDate}

When did the rule change, and what was it before?

Ask for one passport and destination from a start date. The response says whether the primary rule has changed, lists every change with its date and the old and new rule, and gives you the rule in force today. Use it for visa-change alerts, mobility dashboards, booking engines and compliance research.

Kazakhstan to Montenegro GET …/history/KZ/ME/2024-01-01
29 Jul 2024
Visa required
Visa not required · 30 days
2024-01-01 2025 2026 2026-05-01
curl https://visa-requirement.p.rapidapi.com/v2/visa/check/history/KZ/ME/2024-01-01 \
  -H "X-RapidAPI-Proxy-Secret: ${RAPIDAPI_SECRET}"
passport
ISO 3166-1 alpha-2 passport country code, like KZ
destination
ISO 3166-1 alpha-2 destination country code, like ME
fromDate
Start date as YYYY-MM-DD, YYYYMMDD or DDMMYYYY
Real history is on the MEGA and VIP plans Every other key can test the endpoint with demo data, marked in the response as "data_mode": "demo" and "is_demo": true.
200 · response, trimmedKZ → ME
{
  "data": {
    "pcc": "KZ",
    "dcc": "ME",
    "from_date": "2024-01-01",
    "has_changes_since_from_date": true,
    "current_rule": {
      "name": "Visa not required",
      "duration": "30 days",
      "duration_days": 30,
      "color": "green"
    },
    "changes": [
      {
        "date": "2024-07-29",
        "old_rule": { "name": "Visa required", "color": "red" },
        "new_rule": { "name": "Visa not required", "color": "green" }
      }
    ]
  },
  "meta": { "data_mode": "real", "is_demo": false }
}
Moving from v1

Three changes

  1. Switch endpoint paths from /v1/* to /v2/*.
  2. Send a JSON body instead of x-www-form-urlencoded. The fields stay passport and destination.
  3. Read the nested data.* object and visa_rules with its primary, secondary and exception rules.
Errors

What a failed request means

400
Other domain errors (rare).
401
Authentication or quota issues.
404
Resource not found, such as no visa or map data.
405
Wrong method on the / root helper route.
422
Validation problems: missing parameters, invalid weights, identical passport and destination, or bad JSON.
500
Unhandled errors, logged server-side.
Pricing

Start free. Pay when it ships.

Four public plans on RapidAPI take you from a free tier to millions of requests a month. For high-volume or custom needs there is a private enterprise plan for select partners.

Free 120 requests
a month
$4.99 a month for
3,000 requests
Millions of requests a month
on the larger plans
Private enterprise plan
for select partners
Compare plans Subscribe and test for free Real historic visa data comes with MEGA and VIP.
FAQ

Questions developers ask

Something else? Write to [email protected].

Yes. The free plan includes 120 requests a month, so you can prototype and test at no cost.

Yes. The API returns up-to-date visa status, allowed stay duration, minimum passport-validity rules, and whether an eTA or eVisa is available, plus embassy links and other helpful fields when available.

Yes. We include links only to official government or authorized application websites. No third-party agency links.

Visa requirements are the baseline rules that decide whether a traveler needs a visa, eTA or eVisa and how long they may stay, for example visa-free for 90 days with a passport valid for 6 months. Travel restrictions are temporary or conditional measures that can change quickly, like health or vaccination rules, sudden policy updates, strikes or regional advisories. The API covers visa requirements and core entry rules. Always verify fast-changing restrictions with official sources before travel.

Our content team continuously monitors official government and consular sources and updates the data as soon as changes are verified. We prioritize ministries of foreign affairs, embassy and consulate sites, and official eVisa portals.

No. Travel Buddy is not a replacement for IATA Timatic and is not intended for airline check-in or boarding compliance. The API is for informational and pre-trip planning use in apps and websites. For operational compliance and final travel authorization, always check the airline’s requirements and official government guidance.

Questions about coverage, keys or plans?

The support team answers API questions at [email protected].