Geography

Country by ID

Returns the details of a specific country identified by its internal numeric ID.

get/countries/{id}

Request

  • Base URL
    https://api-dev.despegar.com/v3
  • URL
    https://api-dev.despegar.com/v3/countries/{id}
  • Auth
    API key in header x-apikey

Path parameters

idstring required

Internal numeric identifier of the country. E.g.: 20010 (Argentina).

Query parameters

productstring required

Product type used to filter configurations. E.g.: HOTELS, FLIGHTS, PACKAGES.

languagestring required

Comma-separated list of language codes for the descriptions field. E.g.: ES,PT,EN.

Response

OK

idstring

Internal numeric identifier of the country.

gidstring

Global identifier combining type and id. E.g.: COU_20010.

codestring

ISO 3166-1 alpha-2 country code. E.g.: AR, BR, MX.

alternative_codestring

ISO 3166-1 alpha-3 country code. E.g.: ARG, BRA, MEX.

descriptionsobject

Localized country names keyed by language code. E.g.: { "es": "Argentina", "pt": "Argentina", "en": "Argentina" }.

continent_idstring

Internal numeric identifier of the continent.

continent_gidstring

Global identifier of the continent. E.g.: CON_30003.

capital_idstring

Internal numeric identifier of the capital city.

capital_gidstring

Global identifier of the capital city. E.g.: CIT_982.

phone_codestring

International phone dialing code. E.g.: 54, 55.

intl_access_codestring

International access code used when dialing out of the country. E.g.: 00, 011.

configurationsstring[]

List of product and platform configurations in which this country is available. Not all countries include every configuration (e.g. any_buses_any is only present for select countries).

picturesobject[]

List of pictures associated with the country. Always empty.

last_update_datestring date-time

Date and time of the last update to this record.

Changes

No recorded changes to this operation across all 1 revision of this API.