---
title: List Geolocations
---

[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**

# List Geolocations

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

GET/radar/geolocations

Retrieves a list of geolocations. 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

<details>

<summary>

query GeolocationListParams

</summary>

<details>

<summary>

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

Format in which results will be returned.

</summary>

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

<a href="#(resource)%20radar.geolocations%20%3E%20(method)%20list%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 GeolocationListParamsFormatCsv <a href="https://developers.cloudflare.com/api/go/resources/radar/subresources/geolocations/methods/list#(resource)%20radar.geolocations%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20format%20%3E%20(schema)">GeolocationListParamsFormat</a> = "CSV"

<a href="#(resource)%20radar.geolocations%20%3E%20(method)%20list%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)%20list%20%3E%20(params)%20default%20%3E%20(param)%20format">Link to this property</a>

GeoID param.Field\[string]Optional

Filters results by geolocation. Specify a comma-separated list of GeoNames IDs.

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

Limit param.Field\[int64]Optional

Limits the number of objects returned in the response.

exclusiveMinimum

minimum0

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

Location param.Field\[string]Optional

Filters results by location. Specify a comma-separated list of alpha-2 location codes.

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

Offset param.Field\[int64]Optional

Skips the specified number of objects before fetching the results.

minimum0

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

</details>

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

##### ReturnsExpand Collapse

<details>

<summary>

type GeolocationListResponse struct{…}

</summary>

<details>

<summary>

Geolocations \[]GeolocationListResponseGeolocation

</summary>

GeoID string

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

Latitude string

A numeric string.

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

Longitude string

A numeric string.

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

Name string

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

<details>

<summary>

Parent GeolocationListResponseGeolocationsParent

</summary>

GeoID string

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

<details>

<summary>

Parent GeolocationListResponseGeolocationsParentParent

</summary>

GeoID string

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

<details>

<summary>

Type GeolocationListResponseGeolocationsParentParentType

The type of the geolocation.

</summary>

One of the following:

const GeolocationListResponseGeolocationsParentParentTypeContinent GeolocationListResponseGeolocationsParentParentType = "CONTINENT"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationListResponse%20%3E%20(schema)%20%3E%20(property)%20geolocations%20%3E%20(items)%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 GeolocationListResponseGeolocationsParentParentTypeCountry GeolocationListResponseGeolocationsParentParentType = "COUNTRY"

<a href="#(resource)%20radar.geolocations%20%3E%20(model)%20GeolocationListResponse%20%3E%20(schema)%20%3E%20(property)%20geolocations%20%3E%20(items)%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 GeolocationListResponseGeolocationsParentParentTypeAdm1 GeolocationListResponseGeolocationsParentParentType = "ADM1"

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

<details>

<summary>

Type GeolocationListResponseGeolocationsParentType

The type of the geolocation.

</summary>

One of the following:

const GeolocationListResponseGeolocationsParentTypeContinent GeolocationListResponseGeolocationsParentType = "CONTINENT"

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

const GeolocationListResponseGeolocationsParentTypeCountry GeolocationListResponseGeolocationsParentType = "COUNTRY"

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

const GeolocationListResponseGeolocationsParentTypeAdm1 GeolocationListResponseGeolocationsParentType = "ADM1"

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

<details>

<summary>

Type GeolocationListResponseGeolocationsType

The type of the geolocation.

</summary>

One of the following:

const GeolocationListResponseGeolocationsTypeContinent GeolocationListResponseGeolocationsType = "CONTINENT"

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

const GeolocationListResponseGeolocationsTypeCountry GeolocationListResponseGeolocationsType = "COUNTRY"

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

const GeolocationListResponseGeolocationsTypeAdm1 GeolocationListResponseGeolocationsType = "ADM1"

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

Code stringOptional

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

</details>

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

</details>

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

### List Geolocations

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"),
  )
  geolocations, err := client.Radar.Geolocations.List(context.TODO(), radar.GeolocationListParams{

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

200 example

```
{
  "result": {
    "geolocations": [
      {
        "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": {
    "geolocations": [
      {
        "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
}
```