Get inspired at ContentCon Europe. See the agenda and register for free.
Get inspired at ContentCon Europe. See the agenda and register for free.
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. Personalize Management API
  4. Geolocation

Geolocation

markdownView as Markdown

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

GEThttps://personalize-api.contentstack.com/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.

Sample Response
Status|200 OK
12345678
[
  {
    "code": "US-TX",
    "name": "Texas",
    "parent": "US",
    "displayName": "Texas, United States of America"
  }
]

Get all Countries

GEThttps://personalize-api.contentstack.com/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.

Sample Response
Status|200 OK
123456
[
  {
    "name": "United States of America",
    "code": "US"
  }
]

Get all Cities

GEThttps://personalize-api.contentstack.com/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.

Sample Response
Status|200 OK
123456
[
  {
    "code": "austin,TX,US",
    "displayName": "Austin, Texas, United States"
  }
]
Hide Parameters

Query Parameters

skipoptionalstring

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.

limitoptionalstring

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[]optionalstring

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.

nameoptionalstring

The name parameter will return the regions with the matching name in your response based on the value you provide.

Headers

authorizationoptionalstring

Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth

authtokenoptionalstring

Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens

Hide Parameters

Query Parameters

skipoptionalstring

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.

limitoptionalstring

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[]optionalstring

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.

nameoptionalstring

The name parameter will return the countries with the matching name in your response based on the value you provide.

Headers

authorizationoptionalstring

Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth

authtokenoptionalstring

Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens

Hide Parameters

Query Parameters

skipoptionalstring

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.

limitoptionalstring

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[]optionalstring

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.

nameoptionalstring

The name parameter will return the cities with the matching name in your response based on the value you provide.

Headers

authorizationoptionalstring

Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth

authtokenoptionalstring

Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens