You need a current list of countries your travel application can offer, without maintaining that list by hand. The Visa Checker API has a Countries Available endpoint for that list and separate endpoints for visa information; by the end of this guide, you can fetch the list and use an available country in a requirements request.
Getting started on Zyla API Hub
Open the Visa Checker API listing on Zyla API Hub, create a free account, and select Subscribe or Start Free Trial when available. Get your API key and send it in the Authorization: Bearer YOUR_API_KEY header. Check the API page for current access options and pricing.
The first API offers a 7-day trial or 50 requests. Access uses a subscription and quota rather than pay-per-call billing. Zyla API Hub lists more than 10,000 public APIs under one account and API key, which is useful if your travel application later needs another integration.
Endpoints for countries and visa requirements
The three endpoints serve different parts of a travel workflow. Start with Countries Available when you need to populate a nationality selector, then request visa information for the selected country.
Countries Available
Method: GET
URL: https://zylalabs.com/api/2154/visa-checker-api/22522/countries-available
This endpoint returns the complete list of countries available in the API. Send the bearer authorization header; no request parameters are needed. The response contains a countries array, with names such as Argentina, Australia, and Bolivia, Plurinational State of.
Keep the returned names intact in your selector. Some include punctuation or longer official names, so splitting labels on commas or assuming every name is a single word can change the value your application stores.
Requirements
Method: POST
URL: https://zylalabs.com/api/2154/visa-checker-api/21672/requirements
Provide the required string parameter country, such as Argentina. For a compound country name, the endpoint description instructs you to use a hyphen, as in south-korea. The official request below sends the parameter as form data using --data-urlencode.
The example response includes a page title, the requested country, and visa-access data. In particular, visa_free_access contains a count and a list of countries. The response is about passport access for the supplied country, not the complete Countries Available list.
Requirements Information
Method: GET
URL: https://zylalabs.com/api/2154/visa-checker-api/22528/requirements-information
Supply the required string query parameter nationality, for example Argentina. This endpoint returns destinations grouped by visa category for the specified nationality, including required visas, visas on arrival, eVisas, and visa-free destinations.
Use this endpoint when your interface needs category-oriented results. Use Requirements when the nested passport-ranking response fits your application. Neither endpoint replaces Countries Available as the source for the API’s available-country selector.
Make the official Requirements request
Replace YOUR_API_KEY with your Zyla API key. This request uses the documented Argentina example:
curl -s -X POST "https://zylalabs.com/api/2154/visa-checker-api/21672/requirements" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "country=Argentina"
The following official response example is an excerpt; it ends partway through the countries array and is not a complete JSON document.
{
"page_title": "Argentina Passport Ranking",
"data_extracted": {
"country": "Argentina",
"visa_access_by_type": {
"visa_free_access": {
"count": 129,
"countries": [
"Albania",
"Andorra",
"Angola",
"Anguilla",
"Antigua and Barbuda",
"Armenia",
"Aruba",
"Austria",
"Bahamas",
"Barbados",
"Belarus",
"Belgium",
"Bolivia",
"Bosnia and Herzegovina",
"Botswana",
"Brazil",
"British Virgin Islands",
"Brunei",
"Bulgaria",
"Burkina Faso",
"Burundi",
"Cape Verde",
"Cayman Islands",
"Central African Republic",
"Chad",
"Chile",
"Colombia",
"Comoros",
"Congo",
"Congo (Dem. Rep.)",
"Costa Rica",
"Croatia",
"Cuba",
"Cyprus",
"Czech Republic",
"Denmark",
"Djibouti",
"Dominica",
"Dominican Republic",
"Ecuador",
"Egypt",
"El Salvador",
"Equatorial Guinea",
"Estonia",
"Eswatini",
"Ethiopia",
"Fiji",
"Finland",
"France",
"Gabon",
"Gambia",
"Georgia",
"Germany",
"Ghana",
"Greece",
"Grenada",
"Guam",
"Guatemala",
"Guinea",
"Guinea-Bissau",
"Guyana",
"Haiti",
"Honduras",
"Hong Kong SAR",
"Hungary",
"Iceland",
"India",
"Indonesia",
"Iran",
"I…
For a working response, read data_extracted.country to identify the country and data_extracted.visa_access_by_type.visa_free_access for its count and countries. The count in the example describes that visa-free category; it is not the number of entries in Countries Available.
Fetch the country list and requirements in Python
This sample uses Python’s standard library. It first reads the countries array, checks for Argentina, and then makes the same Requirements request as the official curl. Replace YOUR_API_KEY before running it.
import json
from urllib.error import HTTPError, URLError
from urllib.parse import urlencode
from urllib.request import Request, urlopen
api_key = "YOUR_API_KEY"
headers = {"Authorization": f"Bearer {api_key}"}
countries_url = (
"https://zylalabs.com/api/2154/visa-checker-api/22522/countries-available"
)
requirements_url = (
"https://zylalabs.com/api/2154/visa-checker-api/21672/requirements"
)
try:
countries_request = Request(countries_url, headers=headers, method="GET")
with urlopen(countries_request, timeout=30) as response:
countries_data = json.load(response)
countries = countries_data["countries"]
print("Available countries:", len(countries))
if "Argentina" not in countries:
raise ValueError("Argentina was not present in the available-country list")
form_data = urlencode({"country": "Argentina"}).encode("utf-8")
requirements_request = Request(
requirements_url,
data=form_data,
headers=headers,
method="POST",
)
with urlopen(requirements_request, timeout=30) as response:
requirements = json.load(response)
extracted = requirements["data_extracted"]
visa_free = extracted["visa_access_by_type"]["visa_free_access"]
print("Passport country:", extracted["country"])
print("Visa-free count:", visa_free["count"])
print("Visa-free destinations:", visa_free["countries"])
except HTTPError as error:
print("API request failed with HTTP status:", error.code)
except URLError as error:
print("Could not reach the API:", error.reason)
except (KeyError, ValueError) as error:
print("Could not use the response:", error)
The two requests consume access under your subscription and quota, so avoid making both for every keystroke in a search box. Fetch the country list when your application needs it and consider caching it for your interface; choose a refresh policy appropriate to your product rather than assuming the list never changes.
The sample intentionally uses the documented Argentina value. For compound names, account for the Requirements endpoint’s hyphen instruction instead of assuming every displayed country name can be sent unchanged. The examples use different forms for some destination names, so avoid joining results from different endpoints solely on a display label without checking your mapping.
Where this fits in a travel application
- Nationality selector: Load Countries Available and render its
countriesarray as choices. Preserve each original value alongside any presentation-specific label. - Travel planning screen: After a traveler selects Argentina, request requirements and show the returned visa-free count and destinations. Treat the count and list as response data, not hard-coded application constants.
- Category-based destination view: Use Requirements Information when the UI needs to separate destinations by visa required, visa on arrival, eVisa, and visa-free categories.
Handle request failures separately from an empty or missing result. A failed network request should not silently turn into an empty nationality selector, and an unexpected response shape should not be presented as a confirmed visa outcome. Visa rules can change, so give travelers a way to verify requirements with the relevant authorities before booking or travel.
Call the API from an AI agent
Zyla APIs can also be called by AI agents through MCP. Configure an MCP-compatible client, such as Claude Code, Cursor, or Windsurf, with the endpoint below and replace the key placeholder:
https://mcp.zylalabs.com/mcp?apikey=YOUR_API_KEY
An agent can use the country list as a starting point before requesting visa information for a nationality. Keep the API key out of prompts or output that other users can see, and review the returned data before using it in a travel recommendation.
FAQ
Which endpoint returns the countries available in the API?
Use Countries Available with GET. It returns a countries array and requires the bearer authorization header; no request parameters are needed.
Can I use the country list as a list of visa-free destinations?
No. Countries Available lists countries available in the API. Visa-free destinations are part of the visa information returned for a specified country or nationality.
How do I request requirements for Argentina?
POST to Requirements with country=Argentina, as shown in the curl example. Alternatively, Requirements Information accepts nationality=Argentina as a GET query parameter and groups destinations by visa category.
What should I do with compound country names?
For Requirements, follow the endpoint’s instruction to use a hyphen for a compound name, such as south-korea. Keep the original Countries Available label for display and check how your application converts a selection into the endpoint’s input.
Create a free account on Zyla API Hub, get your API key, and Start 7-day trial on Visa Checker API. Check the listing for current access options and pricing before integrating it into your application.