Documentation
Getting started
From an empty account to a country record in four steps.
The shape of the API
Five dataset families live under one product: countries, subdivisions, phone metadata, postal code rules and address examples. All of them are versioned under /v1, authenticated with the same bearer token, and share one error envelope.
Because the data is reference material rather than live state, responses carry generous cache headers. Countries are cacheable for an hour, metadata for a day.
Four steps
- Create an account. The free plan activates immediately, with no payment method.
- Subscribe to the Global Data product from the billing page.
- Create an API key. The full secret is displayed once, so store it right away.
- Send the key as a bearer token on any /v1 request.
Your first request
cURL
curl https://api.countrykit-api.com/v1/countries/BR \
-H "Authorization: Bearer data_live_xxxxxxxxxxxxxxxx"Country codes
Every path parameter that identifies a country expects an ISO 3166-1 alpha-2 code, case-insensitive. Subdivisions use the full ISO 3166-2 code including the country prefix, such as BR-SP.
In your language
curl https://api.countrykit-api.com/v1/countries/BR \
-H "Authorization: Bearer data_live_xxxxxxxxxxxxxxxx"