Loading
Loading
Use the Countries API to retrieve country information, ISO country codes, capitals, regions, subregions, phone codes, currencies, and other geographical metadata through a simple and developer-friendly API. This API enables applications to fetch structured country datasets for global platforms, travel services, analytics systems, ecommerce applications, localization workflows, SaaS products, and GIS-based solutions.
Use it to build country dropdowns, international onboarding systems, geo-targeted applications, region-based filtering, global business platforms, localization engines, shipping systems, travel applications, and country intelligence tools.
Access structured country-level geographical information including country names, ISO 3166 codes, capitals, regions, subregions, currencies, phone codes, nationalities, and top-level domains.
Retrieve countries belonging to specific regions and subregions for geo-based filtering, regional segmentation, and analytics workflows.
Work with ISO alpha-2, alpha-3, and numeric country codes for standardized international compatibility across platforms and databases.
Fetch detailed country information including currencies, symbols, capitals, phone prefixes, nationalities, flag emoji, and official country identifiers.
Supports both json and xml response formats for compatibility with modern applications and enterprise integrations.
Retrieve country records quickly for international applications, onboarding systems, and global search experiences.
Use country data to power localization workflows, multi-country applications, language systems, payment flows, and region-aware user experiences.
Retrieve a complete list of countries with ISO codes, capitals, regions, and subregions. Use the optional region and subregion parameters to filter results.
$ pip install requestsimport requests
url = "https://api.apifreaks.com/v1.0/geo/countries?region=Asia"
payload = {}
headers = {
'X-apiKey': 'API-KEY'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Retrieve detailed metadata for a specific country using its ISO 3166-1 alpha-2 code, including currency, phone code, nationality, flag emoji, native name, and top-level domain.
$ pip install requestsimport requests
url = "https://api.apifreaks.com/v1.0/geo/country/details?country=PK"
payload = {}
headers = {
'X-apiKey': 'API-KEY'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Retrieve a complete list of all countries along with their ISO codes, capitals, regions, and subregions.
# Response { "countries": [ { "name": "Andorra", "iso_alpha_2": "AD", "iso_alpha_3": "AND", "iso_numeric": 20, "capital": "Andorra la Vella", "region": "Europe", "subregion": "Southern Europe" }, { "name": "United Arab Emirates", "iso_alpha_2": "AE", "iso_alpha_3": "ARE", "iso_numeric": 784, "capital": "Abu Dhabi", "region": "Asia", "subregion": "Western Asia" }, { "name": "Afghanistan", "iso_alpha_2": "AF", "iso_alpha_3": "AFG", "iso_numeric": 4, "capital": "Kabul", "region": "Asia", "subregion": "Southern Asia" }, { "name": "Albania", "iso_alpha_2": "AL", "iso_alpha_3": "ALB", "iso_numeric": 8, "capital": "Tirana", "region": "Europe", "subregion": "Southern Europe" } ] }curl "https://api.apifreaks.com/v1.0/geo/countries?apiKey=YOUR_API_KEY"
Use the region and optional subregion parameters to narrow countries to a specific geographic area.
# Response { "countries": [ { "name": "Afghanistan", "iso_alpha_2": "AF", "iso_alpha_3": "AFG", "iso_numeric": 4, "capital": "Kabul", "region": "Asia", "subregion": "Southern Asia" }, { "name": "Bangladesh", "iso_alpha_2": "BD", "iso_alpha_3": "BGD", "iso_numeric": 50, "capital": "Dhaka", "region": "Asia", "subregion": "Southern Asia" }, { "name": "Bhutan", "iso_alpha_2": "BT", "iso_alpha_3": "BTN", "iso_numeric": 64, "capital": "Thimphu", "region": "Asia", "subregion": "Southern Asia" }, { "name": "India", "iso_alpha_2": "IN", "iso_alpha_3": "IND", "iso_numeric": 356, "capital": "New Delhi", "region": "Asia", "subregion": "Southern Asia" }, { "name": "Pakistan", "iso_alpha_2": "PK", "iso_alpha_3": "PAK", "iso_numeric": 586, "capital": "Islamabad", "region": "Asia", "subregion": "Southern Asia" } ] }curl "https://api.apifreaks.com/v1.0/geo/countries?apiKey=YOUR_API_KEY®ion=Asia&subregion=Southern%20Asia"
Retrieve detailed metadata for a country using its ISO 3166-1 alpha-2 code, including currency, phone code, nationality, and flag emoji.
# Response { "name": "Pakistan", "iso_alpha_2": "PK", "iso_alpha_3": "PAK", "iso_numeric": 586, "phone_code": 92, "capital": "Islamabad", "top_level_domain": ".pk", "native_name": "پاکستان", "region": "Asia", "subregion": "Southern Asia", "nationality": "Pakistani", "flag_emoji": "🇵🇰", "currency_code": "PKR", "currency_name": "Pakistani rupee", "currency_symbol": "₨" }curl "https://api.apifreaks.com/v1.0/geo/country/details?apiKey=YOUR_API_KEY&country=PK"
currency_code, currency_name, currency_symbol, and phone_code for each country. This is useful for ecommerce systems, international payment flows, fintech applications, and global communication platforms.region and subregion. This is useful for geo-targeted applications, regional analytics, localization systems, and continent-based filtering workflows.To use the Countries API, you will need API credits. We only charge for successful queries, defined by a 2xx status code. If your request results in a 4xx or 5xx status code, no credits will be charged, and any deducted credits will be returned.
For each successful request, 1 credit will be charged.
Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.