Countrylayer
Status: Live
The Countrylayer API provides a simple and efficient way to access detailed information about countries around the world. With this API, users can retrieve data based on various filters such as country name, language, currency, capital city, calling code, region, and regional bloc. This makes it an invaluable tool for developers and businesses looking to integrate country-specific data into their applications.
Key Features
- Access to comprehensive country data including population, area, languages, currencies, and more.
- Filter results by various parameters such as name, capital, language, and region.
- Supports both alpha-2 and alpha-3 country codes for precise queries.
- Easy integration with RESTful API structure and JSON responses.
Why Choose Countrylayer?
- Reliable Country Data
CountryLayer provides accurate, up-to-date, and structured information for every country in the world—ideal for apps, dashboards, and global platforms. - Simple REST API Design
With clean, intuitive endpoints and straightforward query parameters, CountryLayer is easy to integrate into any tech stack. - Comprehensive Coverage
Access a wide range of data points, including names, capitals, currencies, languages, regions, calling codes, and more—all in one place. - Flexible Search Options
Look up countries using names, capitals, languages, currencies, regions, regional blocs, calling codes, or alpha codes, giving developers complete versatility. - Lightning-Fast Responses
Built for speed and reliability, the API delivers fast JSON responses optimized for both small and large-scale applications. - Secure by Default
All API requests support 256-bit SSL encryption, ensuring your data exchange remains encrypted and fully secure. - Scalable for Any Project
Whether you’re building a hobby project or a global enterprise app, CountryLayer scales with your needs through flexible subscription plans and generous quotas. - Clear Usage & Monitoring Tools
Track API usage easily through the dashboard, receive notifications as you approach limits, and avoid unexpected downtime. - Developer-Friendly Documentation
Well-structured documentation and predictable endpoints make integration smooth for developers of all experience levels. - Dedicated Support Options
From standard assistance to premium enterprise support, CountryLayer ensures you get help when you need it.
Examples
1. Get All Countries
GET https://api.apilayer.net/countrylayer/v2/all?access_key=YOUR_ACCESS_KEYResponse:
[
{
"name": "Afghanistan",
"topLevelDomain": [".af"],
"alpha2Code": "AF",
"alpha3Code": "AFG",
"callingCodes": ["93"],
"capital": "Kabul",
"region": "Asia",
"subregion": "Southern Asia",
"population": 27657145,
"area": 652230,
"languages": [
{
"iso639_1": "ps",
"name": "Pashto"
}
],
"currencies": [
{
"code": "AFN",
"name": "Afghan afghani"
}
],
"flag": "https://restcountries.eu/data/afg.svg"
},
...
]2. Get Country by Name
GET https://api.apilayer.net/countrylayer/v2/name/Germany?access_key=YOUR_ACCESS_KEYResponse:
[
{
"name": "Germany",
"topLevelDomain": [".de"],
"alpha2Code": "DE",
"alpha3Code": "DEU",
"callingCodes": ["49"],
"capital": "Berlin",
"region": "Europe",
"subregion": "Western Europe",
"population": 83783942,
"area": 357022,
"languages": [
{
"iso639_1": "de",
"name": "German"
}
],
"currencies": [
{
"code": "EUR",
"name": "Euro"
}
],
"flag": "https://restcountries.eu/data/deu.svg"
}
]3. Get Countries by Language
GET https://api.apilayer.net/countrylayer/v2/language/ita?access_key=YOUR_ACCESS_KEYResponse:
[
{
"name": "Italy",
"topLevelDomain": [".it"],
"alpha2Code": "IT",
"alpha3Code": "ITA",
"callingCodes": ["39"],
"capital": "Rome",
"region": "Europe",
"subregion": "Southern Europe",
"population": 60244639,
"area": 301340,
"languages": [
{
"iso639_1": "it",
"name": "Italian"
}
],
"currencies": [
{
"code": "EUR",
"name": "Euro"
}
],
"flag": "https://restcountries.eu/data/ita.svg"
},
...
]