---
title: Get Geolocation details
---

[Skip to content](#_top)

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

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

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

Copy Markdown

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

---

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

# Get Geolocation details

radar.geolocations.get(strgeo\_id, GeolocationGetParams\*\*kwargs) -> [GeolocationGetResponse](<https://developers.cloudflare.com/api/python/resources/radar#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%20%3E%20(schema)>)

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

geo\_id: str

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>

format: Optional\[Literal\["JSON", "CSV"]]

Format in which results will be returned.

</summary>

One of the following:

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

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

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

##### ReturnsExpand Collapse

<details>

<summary>

class GeolocationGetResponse: …

</summary>

<details>

<summary>

geolocation: Geolocation

</summary>

geo\_id: str

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

latitude: str

A numeric string.

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

longitude: str

A numeric string.

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

name: str

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

<details>

<summary>

parent: GeolocationParent

</summary>

geo\_id: str

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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: str

A numeric string.

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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: str

A numeric string.

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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: str

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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: GeolocationParentParent

</summary>

geo\_id: str

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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: str

A numeric string.

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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: str

A numeric string.

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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: str

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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: Literal\["CONTINENT", "COUNTRY", "ADM1"]

The type of the geolocation.

</summary>

One of the following:

"CONTINENT"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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>

"COUNTRY"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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>

"ADM1"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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)%20geolocation_get_response%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: Optional\[str]

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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: Optional\[str]

BCP 47 locale code used for the geolocation name translation

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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)%20geolocation_get_response%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: Literal\["CONTINENT", "COUNTRY", "ADM1"]

The type of the geolocation.

</summary>

One of the following:

"CONTINENT"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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>

"COUNTRY"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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>

"ADM1"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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)%20geolocation_get_response%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: Optional\[str]

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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: Optional\[str]

BCP 47 locale code used for the geolocation name translation

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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)%20geolocation_get_response%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20parent">Link to this property</a>

<details>

<summary>

type: Literal\["CONTINENT", "COUNTRY", "ADM1"]

The type of the geolocation.

</summary>

One of the following:

"CONTINENT"

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

"COUNTRY"

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

"ADM1"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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)%20geolocation_get_response%20%3E%20(schema)%20%3E%20(property)%20geolocation%20%3E%20(property)%20type">Link to this property</a>

code: Optional\[str]

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

locale: Optional\[str]

BCP 47 locale code used for the geolocation name translation

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20geolocation_get_response%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)%20geolocation_get_response%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)%20geolocation_get_response%20%3E%20(schema)>)

### Get Geolocation details

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
geolocation = client.radar.geolocations.get(
    geo_id="3190509",
)
print(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
}
```