---
title: "Geolocation"
description: "<p>Geolocation, in the context of personalization, is about using a user's geographic location to tailor the experience, making services or content more relevant to their specific physical location. Geolocation APIs in Personalize allow you to access the underlying dataset of Countries, Regions and Cities that you can target.</p><p>This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com.</p>"
url: "https://www.contentstack.com/docs/developers/apis/personalize-management-api/geolocation"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-04-24"
---

# Geolocation

Geolocation, in the context of personalization, is about using a user's geographic location to tailor the experience, making services or content more relevant to their specific physical location. Geolocation APIs in Personalize allow you to access the underlying dataset of Countries, Regions and Cities that you can target.

This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com.

## Get all Regions

### Get all Regions

**GET** `/geolocation/regions`

The Get all Regions request fetches all the region-based information based on the provided search query. Regions are administrative divisions of a country, such as states or provinces, defined according to ISO 3166-2 (https://en.wikipedia.org/wiki/ISO\_3166-2) standard. You can also filter the list by name and region codes.

To configure the permissions for your application via OAuth, include the personalize:read or personalize:manage scope.

#### Query Parameters

- **skip** (optional)
  The skip parameter will allow you to skip the specified number of regions from the response. Along with the limit parameter, the skip parameter helps you to paginate the response. If there are 1000 regions and you skip 900 with a limit of 100, the last 100 cities in the list will be returned.
- **limit** (optional)
  The limit parameter will return a specific number of regions (in between 1-1000) in your response based on the value you provide. If there are 1000 regions and you want to fetch only 100 regions, set the limit as 100. If omited, then only 10 regions are returned by default.
- **code[]** (optional)
  The code\[\] parameter will return the regions with the matching code in your response based on the query you provide. This query should be in string format. You can specify multiple codes by repeating the parameter. The region code is case sensitive, and based on the ISO 3166-2 standard.
- **name** (optional)
  The name parameter will return the regions with the matching name in your response based on the value you provide.

#### Headers

- **authorization** (optional)
  Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth
- **authtoken** (optional)
  Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens

#### Sample Response

```json
[
  {
    "code": "US-TX",
    "name": "Texas",
    "parent": "US",
    "displayName": "Texas, United States of America"
  }
]
```

## Get all Countries

### Get all Countries

**GET** `/geolocation/countries`

The Get all Countries request fetches all the country-based information based on the provided search query. The country list is based on the current ISO 3166-1 (https://en.wikipedia.org/wiki/ISO\_3166-1) standard.

To configure the permissions for your application via OAuth, include the personalize:read or personalize:manage scope.

#### Query Parameters

- **skip** (optional)
  The skip parameter will allow you to skip the specified number of countries from the response. Along with the limit parameter, the skip parameter helps you to paginate the response. If there are 200 countries and you skip 150 with a limit of 50, the last 50 countries in the list will be returned.
- **limit** (optional)
  The limit parameter will return a specific number of countries (in between 1-1000) in your response based on the value you provide. If there are 200 countries and you want to fetch only 100 countries, set the limit as 100. If omited, then only 10 countries are returned by default.
- **code[]** (optional)
  The code\[\] parameter will return the countries with the matching code in your response based on the query you provide. This query should be in string format. You can specify multiple codes by repeating the parameter. The country code is case sensitive, and based on the ISO 3166-1 standard.
- **name** (optional)
  The name parameter will return the countries with the matching name in your response based on the value you provide.

#### Headers

- **authorization** (optional)
  Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth
- **authtoken** (optional)
  Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens

#### Sample Response

```json
[
  {
    "name": "United States of America",
    "code": "US"
  }
]
```

## Get all Cities

### Get all Cities

**GET** `/geolocation/cities`

The Get all Cities request fetches all the city-based information based on the provided search query. You can also filter the list by name and city codes.

To configure the permissions for your application via OAuth, include the personalize:read or personalize:manage scope.

#### Query Parameters

- **skip** (optional)
  The skip parameter will allow you to skip the specified number of cities from the response. Along with the limit parameter, the skip parameter helps you to paginate the response. If there are 1000 cities and you skip 900 with a limit of 100, the last 100 cities in the list will be returned.
- **limit** (optional)
  The limit parameter will return a specific number of cities (in between 1-1000) in your response based on the value you provide. If there are 1000 cities and you want to fetch only 100 cities, set the limit as 100. If omited, then only 10 cities are returned by default.
- **code[]** (optional)
  The code\[\] parameter will return the cities with the matching code in your response based on the query you provide. This query should be in string format. You can specify multiple codes by repeating the parameter. The city code is case sensitive.
- **name** (optional)
  The name parameter will return the cities with the matching name in your response based on the value you provide.

#### Headers

- **authorization** (optional)
  Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth
- **authtoken** (optional)
  Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens

#### Sample Response

```json
[
  {
    "code": "austin,TX,US",
    "displayName": "Austin, Texas, United States"
  }
]
```