Skip to content
Start here

Get Geolocation details

GET/radar/geolocations/{geo_id}

Retrieves the requested Geolocation information. Geolocation names can be localized by sending an Accept-Language HTTP header with a BCP 47 language tag (e.g., Accept-Language: pt-PT). The full quality-value chain is supported (e.g., pt-PT,pt;q=0.9,en;q=0.8).

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
User Details WriteUser Details Read
Path ParametersExpand Collapse
geo_id: string

Geolocation ID. Refer to GeoNames

maxLength100
Query ParametersExpand Collapse
format: optional "JSON" or "CSV"

Format in which results will be returned.

One of the following:
"JSON"
"CSV"
ReturnsExpand Collapse
result: { geolocation }
geolocation: { geoId, latitude, longitude, 5 more }
geoId: string
latitude: string

A numeric string.

longitude: string

A numeric string.

name: string
parent: { geoId, latitude, longitude, 5 more }
geoId: string
latitude: string

A numeric string.

longitude: string

A numeric string.

name: string
parent: { geoId, latitude, longitude, 4 more }
geoId: string
latitude: string

A numeric string.

longitude: string

A numeric string.

name: string
type: "CONTINENT" or "COUNTRY" or "ADM1"

The type of the geolocation.

One of the following:
"CONTINENT"
"COUNTRY"
"ADM1"
code: optional string
locale: optional string

BCP 47 locale code used for the geolocation name translation

type: "CONTINENT" or "COUNTRY" or "ADM1"

The type of the geolocation.

One of the following:
"CONTINENT"
"COUNTRY"
"ADM1"
code: optional string
locale: optional string

BCP 47 locale code used for the geolocation name translation

type: "CONTINENT" or "COUNTRY" or "ADM1"

The type of the geolocation.

One of the following:
"CONTINENT"
"COUNTRY"
"ADM1"
code: optional string
locale: optional string

BCP 47 locale code used for the geolocation name translation

success: boolean

Get Geolocation details

curl https://api.cloudflare.com/client/v4/radar/geolocations/$GEO_ID \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "result": {
    "geolocation": {
      "geoId": "2267056",
      "latitude": "10",
      "longitude": "10",
      "name": "Lisbon",
      "parent": {
        "geoId": "2267056",
        "latitude": "10",
        "longitude": "10",
        "name": "Lisbon",
        "parent": {
          "geoId": "2267056",
          "latitude": "10",
          "longitude": "10",
          "name": "Lisbon",
          "type": "CONTINENT",
          "code": "PT-11",
          "locale": "pt-PT"
        },
        "type": "CONTINENT",
        "code": "PT-11",
        "locale": "pt-PT"
      },
      "type": "CONTINENT",
      "code": "PT-11",
      "locale": "pt-PT"
    }
  },
  "success": true
}
Returns Examples
{
  "result": {
    "geolocation": {
      "geoId": "2267056",
      "latitude": "10",
      "longitude": "10",
      "name": "Lisbon",
      "parent": {
        "geoId": "2267056",
        "latitude": "10",
        "longitude": "10",
        "name": "Lisbon",
        "parent": {
          "geoId": "2267056",
          "latitude": "10",
          "longitude": "10",
          "name": "Lisbon",
          "type": "CONTINENT",
          "code": "PT-11",
          "locale": "pt-PT"
        },
        "type": "CONTINENT",
        "code": "PT-11",
        "locale": "pt-PT"
      },
      "type": "CONTINENT",
      "code": "PT-11",
      "locale": "pt-PT"
    }
  },
  "success": true
}