---
title: Get Geolocation details
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

[Radar](https://developers.cloudflare.com/api/go/resources/radar)

[Geolocations](https://developers.cloudflare.com/api/go/resources/radar/subresources/geolocations)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get Geolocation details

client.Radar.Geolocations.Get(ctx, geoID, query) (\*[GeolocationGetResponse](<https://developers.cloudflare.com/api/go/resources/radar#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)>), error)

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

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



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

**Example:**<code>X-Auth-Email: user@example.com</code>

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

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`User Details Write``User Details Read`

##### ParametersExpand Collapse

geoID string

Geolocation ID. Refer to [GeoNames](https://download.geonames.org/export/dump/readme.txt)

maxLength100

[Link to this property](<#(resource)%20radar.geolocations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20geo_id%20%3E%20(schema)>)

<details>

<summary>

query GeolocationGetParams

</summary>

<details>

<summary>

Format param.Field\[<a href="https://developers.cloudflare.com/api/go/resources/radar/subresources/geolocations/methods/get#(resource)%20radar.geolocations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)">GeolocationGetParamsFormat</a>]Optional

Format in which results will be returned.

</summary>

const GeolocationGetParamsFormatJson <a href="https://developers.cloudflare.com/api/go/resources/radar/subresources/geolocations/methods/get#(resource)%20radar.geolocations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)">GeolocationGetParamsFormat</a> = "JSON"

<a href="#(resource)%20radar.geolocations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

const GeolocationGetParamsFormatCsv <a href="https://developers.cloudflare.com/api/go/resources/radar/subresources/geolocations/methods/get#(resource)%20radar.geolocations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)">GeolocationGetParamsFormat</a> = "CSV"

<a href="#(resource)%20radar.geolocations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20radar.geolocations%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20format">Link to this property</a>

</details>

[Link to this property](<#(resource)%20radar.geolocations%20%3E%20(method)%20get%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

type GeolocationGetResponse struct{…}

</summary>

<details>

<summary>

Geolocation GeolocationGetResponseGeolocation

</summary>

GeoID string

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20geoId">Link to this property</a>

Latitude string

A numeric string.

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20latitude">Link to this property</a>

Longitude string

A numeric string.

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20longitude">Link to this property</a>

Name string

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

Parent GeolocationGetResponseGeolocationParent

</summary>

GeoID string

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20geoId">Link to this property</a>

Latitude string

A numeric string.

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20latitude">Link to this property</a>

Longitude string

A numeric string.

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20longitude">Link to this property</a>

Name string

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

Parent GeolocationGetResponseGeolocationParentParent

</summary>

GeoID string

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent%20%3E%20(property)%20geoId">Link to this property</a>

Latitude string

A numeric string.

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent%20%3E%20(property)%20latitude">Link to this property</a>

Longitude string

A numeric string.

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent%20%3E%20(property)%20longitude">Link to this property</a>

Name string

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

Type GeolocationGetResponseGeolocationParentParentType

The type of the geolocation.

</summary>

One of the following:

const GeolocationGetResponseGeolocationParentParentTypeContinent GeolocationGetResponseGeolocationParentParentType = "CONTINENT"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent%20%3E%20(property)%20type%20%3E%20(member)%200">Link to this property</a>

const GeolocationGetResponseGeolocationParentParentTypeCountry GeolocationGetResponseGeolocationParentParentType = "COUNTRY"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent%20%3E%20(property)%20type%20%3E%20(member)%201">Link to this property</a>

const GeolocationGetResponseGeolocationParentParentTypeAdm1 GeolocationGetResponseGeolocationParentParentType = "ADM1"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent%20%3E%20(property)%20type%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent%20%3E%20(property)%20type">Link to this property</a>

Code stringOptional

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent%20%3E%20(property)%20code">Link to this property</a>

Locale stringOptional

BCP 47 locale code used for the geolocation name translation

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent%20%3E%20(property)%20locale">Link to this property</a>

</details>

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20parent">Link to this property</a>

<details>

<summary>

Type GeolocationGetResponseGeolocationParentType

The type of the geolocation.

</summary>

One of the following:

const GeolocationGetResponseGeolocationParentTypeContinent GeolocationGetResponseGeolocationParentType = "CONTINENT"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20type%20%3E%20(member)%200">Link to this property</a>

const GeolocationGetResponseGeolocationParentTypeCountry GeolocationGetResponseGeolocationParentType = "COUNTRY"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20type%20%3E%20(member)%201">Link to this property</a>

const GeolocationGetResponseGeolocationParentTypeAdm1 GeolocationGetResponseGeolocationParentType = "ADM1"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20type%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20type">Link to this property</a>

Code stringOptional

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20code">Link to this property</a>

Locale stringOptional

BCP 47 locale code used for the geolocation name translation

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent%20%3E%20(property)%20locale">Link to this property</a>

</details>

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent">Link to this property</a>

<details>

<summary>

Type GeolocationGetResponseGeolocationType

The type of the geolocation.

</summary>

One of the following:

const GeolocationGetResponseGeolocationTypeContinent GeolocationGetResponseGeolocationType = "CONTINENT"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20type%20%3E%20(member)%200">Link to this property</a>

const GeolocationGetResponseGeolocationTypeCountry GeolocationGetResponseGeolocationType = "COUNTRY"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20type%20%3E%20(member)%201">Link to this property</a>

const GeolocationGetResponseGeolocationTypeAdm1 GeolocationGetResponseGeolocationType = "ADM1"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20type%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20type">Link to this property</a>

Code stringOptional

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20code">Link to this property</a>

Locale stringOptional

BCP 47 locale code used for the geolocation name translation

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20locale">Link to this property</a>

</details>

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)%20%3E%20(property)%20geolocation">Link to this property</a>

</details>

[Link to this property](<#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationGetResponse%20%3E%20(schema)>)

### Get Geolocation details

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/radar"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  geolocation, err := client.Radar.Geolocations.Get(
    context.TODO(),
    "3190509",
    radar.GeolocationGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", geolocation.Geolocation)
}
```

200 example

```
{
  "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

200 example

```
{
  "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
}
```