Geo & Travel

World Cities API

Instant access to a vast database of cities from around the world. Whether you're a travel planner, a real estate investor, or just curious about the world's urban landscapes, our API offers unparalleled insights into global geography and urbanization.

Request Headers

Name Required Description
X-RapidAPI-Key required Your RapidAPI key. Get one free.
X-RapidAPI-Host required cities.p.rapidapi.com

Endpoints

GET /v1/cities

Search world cities by name, country, or minimum population

Parameters

NameTypeRequiredDefaultConstraints
countrystringoptional——
limitintegeroptional——
min_populationintegeroptional—>= 0
namestringoptional——
offsetintegeroptional——

Code Examples

curl --request GET \
  --url 'https://cities.p.rapidapi.com/v1/cities?country=example&limit=0' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: cities.p.rapidapi.com'
GET /v1/cities/countries

List all countries that have cities in the dataset, sorted alphabetically by ISO code.

Code Examples

curl --request GET \
  --url 'https://cities.p.rapidapi.com/v1/cities/countries' \
  --header 'x-rapidapi-key: YOUR_API_KEY' \
  --header 'x-rapidapi-host: cities.p.rapidapi.com'

Interactive Example

cities
$ GET /v1/cities?name=sofia&country=BG
{"data":[{"name":"Sofia","ascii":"Sofia","country":"BG","latitude":42.6977,"longitude":23.3219,"population":1152556,"timezone":"Europe/Sofia"}],"meta":{"total":1,"limit":10,"offset":0}}

Integration & Usage Guide

Explore the globe like never before with our comprehensive World Cities API!

Our World Cities API provides instant access to a vast database of cities from around the world. Whether you’re a travel planner, a real estate investor, or just curious about the world’s urban landscapes, our API offers unparalleled insights into global geography and urbanization.

Key Features

  • Global Coverage: Access a worldwide list of cities
  • Flexible Filtering: Easily filter results by name, country, or other criteria
  • Pagination Support: Manage large result sets with ease
  • Random City Selection: Get instant inspiration with random city retrieval
  • Comprehensive City Information: Retrieve extensive details about each city

Endpoints

Our API offers two endpoints to cater to different needs:

  1. /v1/cities: Get a list of cities
  2. /v1/cities/random: Get a random city

Why Choose Our API?

  • Comprehensive Global Database: Access detailed information on millions of cities worldwide
  • Real-time Updates: Stay current with the ever-changing urban landscape
  • Customizable Insights: Tailor your data to meet specific research or analytical needs
  • Scalable Solutions: Handle large volumes of requests efficiently
  • Easy Integration: Simple RESTful API design for seamless incorporation into your projects

Subscribe & License

Access this API with commercial-ready tiers on RapidAPI. Flexible plans designed for side-projects, startups, and high-volume production architectures.

View Pricing & Subscribe

Developer Support

Need help integrating or have a custom endpoint request? Our engineering team is here to assist with authentication, payload schemas, and high-frequency rate limit increases.

Contact API Engineering

System Performance

Monitored 24/7 with a 99.9% uptime SLA. Built atop cloud-native microservices with globally distributed edge caching to ensure ultra-low latency response times.

All Systems Operational