Lookup

Get the full information of a country

Changed on

This method allows you to retrieve detailed information about a country by providing its country code in the request.

The API returns valuable data, such as the country’s name, capital, population, region, and other relevant attributes, enabling you to enrich your applications with geographic context and enhance user experiences.

get/lookup/countries/{country_code}

Request

  • Base URL
    https://v2.greipapi.com
  • URL
    https://v2.greipapi.com/lookup/countries/{country_code}
  • Auth
    HTTP bearer

Path parameters

country_codestring required

Query parameters

paramsstring
Example:language,currency,flag

The params command selects optional country modules. A base geo object is always returned.

Optional modules: language, flag, and/or currency.

Sample value: language,currency,flag.

formatstring
Example:JSON

The format command is used to get a response in a specific format.

modestring
Example:test

The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.

Expected values: live, or test.

sourcestring
user_idstring
Example:UID-12345

The user_id query parameter identifies requests from specific users for monitoring in the Events page. See the user identifier options page for details.

Response

OK

successboolean required
dataobject required

Endpoint-specific payload.

execution_msinteger required

Example response

{
  "success": true,
  "execution_ms": 42
}

Changes