apyhub
Back
β–£ STANDARD DATA

Country Information API

Hosted on ApyHub

What it does

The Country Information API returns everything about one country in a single request. Send its two-letter ISO code, such as DE or IN, and get back the country name, three-letter code, flag emoji, currency (code, name, and symbol), international calling codes, and a list of its states, provinces, or regions with their ISO 3166-2 codes.

Use it to show a state or region dropdown once a user picks their country, fill in currency and dialing prefix automatically in checkout and sign-up forms, or turn a stored country code into a readable name and details.

To get all countries at once, use the Country List API. To validate and format phone numbers with the calling code, use the Phone Number Formatter API.

You can start on ApyHub's free tier with no card required.

GET
Detailed info for a single country
https://api.eu.apyhub.com/apyhub/detailed-info-for-a-single-country

QUICKSTART

GUIDE

Quickstart

Fetch detailed information for a single country by passing its ISO 3166-1 alpha-2 code as a query parameter.

curl -X GET "https://api.eu.apyhub.com/apyhub/detailed-info-for-a-single-country?country=DE" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object field containing country details. The data object may include fields like key, cca3, emoji, value, currency, calling_codes, subdivision, and calling_code.

{
  "data": {
    "key": "DE",
    "cca3": "DEU",
    "emoji": "πŸ‡©πŸ‡ͺ",
    "value": "Germany"
  }
}
TRY ITLIVE Β· 5 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab β€” never sent to orbit or saved.

About this endpoint

What it does

Returns detailed information for a single country identified by its country code passed in the country query parameter. The response is a JSON object containing a data object with country details and, when present in the schema, subdivision and calling code arrays.

Query Parameter(s)

AttributeTypeMandatoryDescription
countryStringYesCountry code to look up.

Response

Returns a JSON object with a data object field. The data object includes country metadata such as key, cca3, emoji, value, and currency, and may also include subdivision and calling_code arrays.

AttributeTypeMandatoryDescription
dataObjectNoCountry details object. Includes key as the ISO 3166-1 alpha-2 code, cca3 as the ISO 3166-1 alpha-3 code, emoji, value as the country name, currency as a nested object, and calling_codes as a string array. It may also include subdivision as an object array and calling_code as a string array.
data.keyStringNoISO 3166-1 alpha-2 code.
data.cca3StringNoISO 3166-1 alpha-3 code.
data.emojiStringNoCountry emoji.
data.valueStringNoCountry name.
data.currencyObjectNoCurrency details object with key, emoji, value, and symbol.
data.currency.keyStringNoISO 4217 currency code.
data.currency.emojiStringNoCurrency emoji.
data.currency.valueStringNoCurrency name in English.
data.currency.symbolStringNoCurrency symbol.
data.calling_codesString ArrayNoCalling codes associated with the country.
data.subdivisionObject ArrayNoCountry subdivisions. Each item contains subdivision code and name.
data.subdivision[].codeStringNoISO 3166-2 subdivision code.
data.subdivision[].nameStringNoSubdivision name.
data.calling_codeString ArrayNoCalling codes associated with the country.

Query parameters

Name
Type
Description
countryREQUIRED
string
β€”
β–£ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.