For Agents
Look up countries by name, capital, language, currency, region, regional bloc, calling code, or alpha code, and retrieve canonical country metadata. Returns JSON arrays of matching countries.
Get started with Countrylayer API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"look up a country by name"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Countrylayer API API.
Retrieve a complete list of countries with metadata in one call
Search countries by full or partial name match
Resolve a capital city to its country record
Filter countries by official or spoken language
Filter countries by currency code
GET STARTED
Use for: I need to fetch a list of all countries with their currencies, Search for a country by its capital city, Find all countries that speak a given language, Get the calling code for a specific country
Not supported: Does not provide IP geolocation, state or city data, or live political news — use for static country reference metadata only.
Jentic publishes the only available OpenAPI document for Countrylayer API, keeping it validated and agent-ready.
The Countrylayer API is a REST service that returns rich country reference data — names, capitals, regions, languages, currencies, calling codes, regional blocs, and alpha codes — across 9 search and lookup endpoints. Authentication is via an `access_key` query parameter on the v2 base URL. It suits localisation, registration form dropdowns, shipping and tax rules, and any workflow that needs to resolve or validate country attributes without bundling a static dataset into the application.
Look up countries by ISO alpha-2 or alpha-3 code
Filter countries by region or regional bloc such as EU or ASEAN
Patterns agents use Countrylayer API API for, with concrete tasks.
★ Localised Registration and Checkout
Populate country dropdowns, format phone numbers, and pick the right currency at signup or checkout by pulling fresh country data from the API rather than shipping a static list. The /all endpoint returns every country in one call which can be cached client-side, while /alpha/{code} resolves a stored ISO code back into a display name and calling code at runtime.
Call GET /all and cache the response, then on each checkout call GET /alpha/{code} to pull the calling code and currency for the user's stored country
Tax and Shipping Region Rules
Resolve a customer's country into the regional bloc, currency, and capital required for tax calculation or shipping zone selection. Use GET /regionalbloc/{regionalbloc} to enumerate the countries inside a bloc such as EU or NAFTA, or GET /currency/{currency} to list every country that uses a particular currency. Useful for e-commerce platforms applying VAT or duty rules.
Call GET /regionalbloc/EU and use the resulting list to apply VAT rules for orders shipping inside the European Union
Country Search and Autocomplete
Power a country search box that handles fuzzy name matches, capital city searches, and language filters. The API exposes /name/{name}, /capital/{capital}, and /language/{language} endpoints that all return JSON arrays of matching country records, so the front end can build a single autocomplete that pivots on whatever the user typed.
On each keystroke, call GET /name/{partial} and merge results with GET /capital/{partial} to rank country suggestions
AI Agent Country Enrichment
Let an AI agent enrich an unstructured 'country' string from a CRM record, support email, or scraped form into a canonical country record with currency, language, and calling code. Through Jentic, the agent searches by intent and the access_key is held in the encrypted vault so it never leaks into prompts or logs.
Use Jentic to search 'look up a country by name', load the schema for GET /name/{name}, and execute it with the user-supplied string
9 endpoints — the countrylayer api is a rest service that returns rich country reference data — names, capitals, regions, languages, currencies, calling codes, regional blocs, and alpha codes — across 9 search and lookup endpoints.
METHOD
PATH
DESCRIPTION
/all
Get all countries
/name/{name}
Search by country name
/capital/{capital}
Search by capital city
/language/{language}
Search by language
/currency/{currency}
Search by currency
/regionalbloc/{regionalbloc}
Search by regional bloc
/callingcode/{callingcode}
Search by calling code
/alpha/{code}
Search by ISO alpha code
/all
Get all countries
/name/{name}
Search by country name
/capital/{capital}
Search by capital city
/language/{language}
Search by language
/currency/{currency}
Search by currency
Three things that make agents converge on Jentic-routed access.
Credential isolation
Countrylayer access_key values are stored encrypted in the Jentic MAXsystem vault. Agents call the API through Jentic with a scoped session token, so the raw key never enters prompts or logs even though Countrylayer accepts it as a query parameter.
Intent-based discovery
Agents search Jentic with intents like 'find countries that use the euro' and Jentic returns the matching Countrylayer operation with its parameter schema, so the agent calls the right endpoint without reading the spec.
Time to first call
Direct integration: 2-4 hours to handle access_key plumbing, error responses, and pagination of large lists. Through Jentic: under 30 minutes to search, load, and execute.
Alternatives and complements available in the Jentic catalogue.
country.is
Free no-auth IP-to-country code lookup
Use country.is first to resolve an IP to a country code, then call Countrylayer to expand that code into rich metadata
Country State City API
Hierarchical country, state, and city dataset
Choose Country State City when you also need state and city data, not just country-level metadata
ipapi
Returns rich geolocation including country, currency, and calling code from an IP
Choose ipapi when the input is an IP and you need country plus currency and calling code in one call
Abstract Geolocation API
Commercial geolocation with country, region, and ISP enrichment
Choose Abstract Geolocation when the use case is IP-based enrichment rather than country reference lookups
Specific to using Countrylayer API API through Jentic.
What authentication does the Countrylayer API use?
Countrylayer uses an API access key passed as the `access_key` query parameter on every request. When called via Jentic, the key is stored encrypted in the MAXsystem vault and the agent receives a scoped session token rather than the raw key.
Can I list every country in a single API call?
Yes. GET /all returns the full country dataset including names, capitals, regions, languages, currencies, calling codes, and alpha codes. Cache the response for 24 hours or longer because the underlying dataset changes rarely.
How do I find every country that uses the euro?
Call GET /currency/EUR. The response is a JSON array of country records, each containing the canonical name, capital, region, and other metadata. The same pattern works for any ISO 4217 currency code.
What are the rate limits for the Countrylayer API?
Rate limits and request quotas are determined by the Countrylayer subscription plan tied to the access_key. Free plans typically cap monthly requests in the low thousands while paid plans raise the cap; check the plan dashboard for exact numbers.
How do I look up a country by ISO code through Jentic?
Search Jentic for 'look up a country by alpha code', load the schema for GET /alpha/{code}, and execute it with the alpha-2 or alpha-3 code. Jentic supplies the access_key from the vault automatically.
Does Countrylayer return real-time political or border data?
No. The dataset reflects ISO and CIA World Factbook style reference data — names, capitals, currencies, languages, calling codes, and blocs. It is not a live news feed and does not track sanctions, conflicts, or border changes.
/regionalbloc/{regionalbloc}
Search by regional bloc
/callingcode/{callingcode}
Search by calling code
/alpha/{code}
Search by ISO alpha code