{
"count": 252,
"countries": [
{
"alpha2": "AF",
"alpha3": "AFG",
"numeric": "004",
"name": "Afghanistan",
"flag": "🇦🇫",
"capital": "Kabul",
"continent": "Asia",
"continent_code": "AS",
"currency_code": "AFN",
"calling_code": "+93",
"population": 43844111
},
{
"alpha2": "AX",
"alpha3": "ALA",
"numeric": "248",
"name": "Aland Islands",
"flag": "🇦🇽",
"capital": "Mariehamn",
"continent": "Europe",
"continent_code": "EU",
"currency_code": "EUR",
"calling_code": "+358-18",
"population": 26711
},
{
"alpha2": "AL",
"alpha3": "ALB",
"numeric": "008",
"name": "Albania",
"flag": "🇦🇱",
"capital": "Tirana",
"continent": "Europe",
"continent_code": "EU",
"currency_code": "ALL",
"calling_code": "+355",
"population": 2349580
}
],
"attribution": "Country data from GeoNames (geonames.org), CC BY 4.0. Subdivisions from ISO 3166-2."
}
curl --location --request GET 'https://zylalabs.com/api/15050/countries+api/39818/list+or+search+countries?eu_only=false' --header 'Authorization: Bearer YOUR_API_KEY'
{
"code": "EUR",
"name": "Euro",
"numeric": "978",
"countries": [
{
"alpha2": "AX",
"name": "Aland Islands",
"flag": "🇦🇽"
},
{
"alpha2": "AD",
"name": "Andorra",
"flag": "🇦🇩"
},
{
"alpha2": "AT",
"name": "Austria",
"flag": "🇦🇹"
}
]
}
curl --location --request GET 'https://zylalabs.com/api/15050/countries+api/39819/currency+details+and+the+countries+that+use+it&code=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{
"alpha2": "FR",
"alpha3": "FRA",
"numeric": "250",
"name": "France",
"flag": "🇫🇷",
"capital": "Paris",
"continent": "Europe",
"continent_code": "EU",
"currency_code": "EUR",
"calling_code": "+33",
"population": 68720337,
"official_name": "French Republic",
"currency_name": "Euro",
"area_km2": 547030,
"tld": ".fr",
"languages": [
"fr-FR",
"frp",
"br"
],
"neighbours": [
"CH",
"DE",
"BE"
],
"time_zones": [
"Europe/Paris"
],
"eu_member": true,
"eurozone": true,
"postal_code_format": "#####",
"postal_code_regex": "^(\\d{5})$",
"subdivision_count": 124,
"attribution": "Country data from GeoNames (geonames.org), CC BY 4.0. Subdivisions from ISO 3166-2."
}
curl --location --request GET 'https://zylalabs.com/api/15050/countries+api/39820/look+up+one+country&code=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{
"country": "US",
"count": 57,
"subdivisions": [
{
"code": "US-AL",
"name": "Alabama",
"type": "State",
"parent": null
},
{
"code": "US-AK",
"name": "Alaska",
"type": "State",
"parent": null
},
{
"code": "US-AS",
"name": "American Samoa",
"type": "Outlying area",
"parent": null
}
]
}
curl --location --request GET 'https://zylalabs.com/api/15050/countries+api/39821/states+provinces+and+regions+of+a+country&code=Required' --header 'Authorization: Bearer YOUR_API_KEY'
{
"country": "DE",
"count": 9,
"neighbours": [
{
"alpha2": "CH",
"alpha3": "CHE",
"numeric": "756",
"name": "Switzerland",
"flag": "🇨🇭",
"capital": "Bern",
"continent": "Europe",
"continent_code": "EU",
"currency_code": "CHF",
"calling_code": "+41",
"population": 9092436
},
{
"alpha2": "PL",
"alpha3": "POL",
"numeric": "616",
"name": "Poland",
"flag": "🇵🇱",
"capital": "Warsaw",
"continent": "Europe",
"continent_code": "EU",
"currency_code": "PLN",
"calling_code": "+48",
"population": 36435861
},
{
"alpha2": "NL",
"alpha3": "NLD",
"numeric": "528",
"name": "The Netherlands",
"flag": "🇳🇱",
"capital": "Amsterdam",
"continent": "Europe",
"continent_code": "EU",
"currency_code": "EUR",
"calling_code": "+31",
"population": 18087633
}
],
"attribution": "Country data from GeoNames (geonames.org), CC BY 4.0. Subdivisions from ISO 3166-2."
}
curl --location --request GET 'https://zylalabs.com/api/15050/countries+api/39822/countries+sharing+a+land+border&code=Required' --header 'Authorization: Bearer YOUR_API_KEY'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Countries API simply include your bearer token in the Authorization header.
| Header | Description |
|---|---|
Authorization
|
Required
Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.
|
No long-term commitment. Upgrade, downgrade, or cancel anytime.
Country data by ISO code: capital, currency, calling code, languages, time zones, neighbours and subdivisions.
Bundled GeoNames country table (CC BY 4.0) and ISO 3166-2 subdivisions. Responses include the GeoNames attribution.
Population and area are a GeoNames snapshot dated 2026-11-14.
Each endpoint returns JSON data related to countries, including details like capital, currency, calling code, languages, time zones, and geographical neighbors. For example, the "Look up one country" endpoint provides comprehensive information about a specific country, while the "List or search countries" endpoint returns a summary of multiple countries.
Key fields include country codes (alpha2, alpha3, numeric), name, capital, currency code, calling code, population, languages, and time zones. For instance, the "GET Look up one country" endpoint includes fields like "official_name" and "area_km2" for detailed country insights.
The API provides various information types, such as country demographics (population, area), geographical data (neighbors, subdivisions), and economic details (currency, calling codes). Each endpoint focuses on specific aspects, like the "GET Currency details" endpoint listing countries using a particular currency.
Response data is structured in JSON format, typically containing a main object with relevant fields and nested arrays for related data. For example, the "GET States provinces and regions of a country" endpoint returns a count and an array of subdivisions, each with its own attributes like code and name.
Parameters vary by endpoint; for example, the "GET List or search countries" endpoint may accept query parameters for filtering by name or region. Users can customize requests by specifying country codes or currency codes to retrieve targeted data.
Users can leverage the returned data for applications like travel planning, educational resources, or economic analysis. For instance, the "GET Countries sharing a land border" endpoint can help identify neighboring countries for geographical studies or travel itineraries.
Data accuracy is maintained through sourcing from reputable databases like GeoNames and ISO standards. Regular updates and checks ensure that the information reflects current geopolitical realities, enhancing reliability for users.
Typical use cases include developing educational tools, creating travel applications, conducting market research, and analyzing demographic trends. The comprehensive data allows for diverse applications across various sectors, including tourism and international business.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund