Translations
Get Country Translations
Retrieves translation data for a specific country. A valid country code is required to fetch translations. You can retrieve all available translations for the requested country or filter the results by specific language codes.
GET /v1/geo/countries/translation
Request
curl -X GET "https://api.geoapi.net/v1/geo/countries/translation?iso=DE&lang=en,fr" \
-H "X-API-HOST: your_api_host" \
-H "X-API-KEY: your_api_key"
Response
200 OKReturns a list of translation objects.
response example
[
{
"countryIso2": "DE",
"countryIso3": "DEU",
"name": "Germany",
"languageNameNative": "Afar",
"languageName": "Afar",
"languageCode": "aa",
"languageToCountry": [
"aa-DJ",
"aa-ER",
"aa-ET"
]
},
{
"countryIso2": "DE",
"countryIso3": "DEU",
"name": "Duitsland",
"languageNameNative": "Afrikaans",
"languageName": "Afrikaans",
"languageCode": "af",
"languageToCountry": [
"af-ZA",
"af-NA"
]
},
{
"countryIso2": "DE",
"countryIso3": "DEU",
"name": "Gyaaman",
"languageNameNative": "Akan",
"languageName": "Akan",
"languageCode": "ak",
"languageToCountry": [
"ak-GH"
]
},
...
]
Occurs if the iso parameter is missing, invalid, or not 2-3 letters long.
response example
{
"status": 400,
"message": "Invalid country ISO code (please use 2 or 3 letters ISO code)"
}
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
iso | string | Yes | The ISO 3166-1 alpha-2 (2 letters) or alpha-3 (3 letters) country code. Case-insensitive (e.g., US, usa). |
lang | string | No | A comma-separated list of language codes to filter the results (e.g., fr,de,es). If omitted, all available translations for the country are returned. |