Endpoint
Authentication
| Header | Required | Value |
|---|---|---|
X-API-Key | Yes | Your API key (bun_...) |
Overview
Retrieve structured country data using an ISO 3166-1 alpha-2 code (e.g.BR), alpha-3 code (e.g. BRA), or a country name search query. The response covers geography, demographics, currencies, languages, calling codes, and more in a single call.
Use cases
- Pre-fill country fields and validate user input in registration forms
- Enrich address records with region, capital, and calling code data
- Power shipping calculators with area, borders, and timezone information
- Drive localization logic based on languages, currencies, and TLDs
Request
Pass the ISO 3166-1 alpha-2 or alpha-3 code as a path parameter, or use thesearch query parameter for name-based lookup.
Examples:
Response
200 OK
| Field | Type | Description |
|---|---|---|
cca2 | string | ISO 3166-1 alpha-2 code |
cca3 | string | ISO 3166-1 alpha-3 code |
name | string | Common country name |
official_name | string | Official country name |
capital | string | Capital city |
region | string | Geographic region |
subregion | string | Geographic subregion |
population | integer | Estimated population |
area_km2 | number | Area in square kilometers |
flag | string | Flag emoji |
currencies | array of objects | List of currencies with code, name, and symbol |
languages | array of strings | Official languages |
calling_code | string | International dialing code |
tld | string | Top-level domain |
borders | array of strings | Bordering country codes (alpha-3) |
timezones | array of strings | IANA timezone identifiers |
continents | array of strings | Continent(s) |

