apyhub
STANDARD DATA

Country Information API

Hosted on ApyHub

What it does

Country Details returns reference data for a single country when you send an ISO 3166-1 alpha-2 country code in the country query parameter. It is built for lookups where you need a compact, machine-readable country record without pulling a larger dataset.

The response includes data.key for the alpha-2 code, data.cca3 for the alpha-3 code, data.emoji, data.value for the country name, and data.currency with the currency code, emoji, English name, and symbol. You also get data.calling_codes for the country’s telephone calling codes.

If you need administrative detail, the response can also include data.subdivision, an array of subdivision objects with ISO 3166-2 code values and name values. That makes it useful for country pickers, checkout forms, profile defaults, locale-aware onboarding, and systems that need to map a country code to its display name, currency, and dialing prefix.

Use Country Details when your app stores a country code and you want the canonical metadata back in one response, without maintaining your own reference tables.

GET
Detailed info for a single country
http://localhost:8080/apyhub/detailed-info-for-a-single-country
QUICKSTARTGUIDE

Quickstart

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

curl -X GET "http://localhost:8080/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.