GET
/
Country
curl --request GET \
  --url https://greipapi.com/Country \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "countryCode": "US",
    "countryName": "United States",
    "countryGeoNameID": 6252001,
    "capital": "Washington, D.C.",
    "population": 331000000,
    "phoneCode": "1",
    "currency": {
      "currencyName": "United States Dollar",
      "currencyCode": "USD",
      "currencySymbol": "$"
    },
    "language": {
      "name": "Portuguese",
      "code": "pt",
      "native": "Português"
    },
    "timezone": {
      "name": "America/Adak",
      "abbreviation": "HST",
      "offset": -36000,
      "currentTime": "11:51:19",
      "currentTimestamp": 1643406679,
      "isDST": false,
      "sunInfo": {
        "sunset": "08:17:34",
        "sunrise": "20:08:16",
        "transit": "02:12:55",
        "civilTwilightBegin": "19:47:39",
        "civilTwilightEnd": "08:38:10",
        "nauticalTwilightBegin": "19:22:22",
        "nauticalTwilightEnd": "09:03:28",
        "astronomicalTwilightBegin": "18:57:01",
        "astronomicalTwilightEnd": "09:28:49",
        "dayLength": "11:50:42"
      }
    },
    "flag": {
      "emoji": "🇺🇸",
      "unicode": "U+1F1FA U+1F1F8",
      "png": {
        "1000px": "https://www.gredev.io/img/flags/png1000px/us.png",
        "250px": "https://www.gredev.io/img/flags/png250px/us.png",
        "100px": "https://www.gredev.io/img/flags/png100px/us.png"
      },
      "svg": "https://www.gredev.io/img/flags/svg/us.svg"
    },
    "countryIsEU": false,
    "countryNeighbours": "CA,MX,CU",
    "tld": ".us",
    "continentName": "North America",
    "continentCode": "NA",
    "continentGeoNameID": 6255149
  },
  "status": "success",
  "executionTime": 0
}

Query Parameters

CountryCode
string
required

The ISO 3166-1 alpha-2 format of the country code. Learn more

Sample value: GB

params
string

The params command is used to determine the data you need in the response.

Expected values: language, flag, currency, and/or timezone.

Sample value: language,currency,timezone

format
string
default: "JSON"

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

Expected values: JSON, XML, CSV, or Newline

For more information please refer to Response Format.

mode
string
default: "live"

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.

For more information please refer to Development Environment.

callback
string

The callback command can help you make the response as a JSONP format.

Expected values: any name that can be used as a function name in Javascript, e.g: myFunctionName.

For more information please refer to JSONP Callback.