Sign Up

Log In

GeoDB Cities

FREEMIUM
By wirefreethought
Updated 5 months ago
Data
9.3/10
Popularity Score
159ms
Latency
99%
Success Rate

GeoDB Cities API Documentation

Get global city, region, and country data. Filter cities by name prefix, country, location, time-zone, and even minimum population (currently over 113,000 cities and towns). Display results in multiple languages. Sort by name, country code, elevation, and population - or any combination of these. Get distances between cities. Get all country regions. Get all cities in a given region. RESTful API adheres to industry best-practices, including HATEOAS-style links to facilitate paging results. Data is periodically refreshed from GeoNames and WikiData. (All data licensed under Creative Commons, http://creativecommons.org/licenses/by/3.0). Backed by cloud-based load-balanced infrastructure for resiliency and performance! (If you'd like to host the service internally, contact us for details through the dev portal site.)
View API Details

Supercharge your App

Discover and connect to thousands of APIs in the world's largest API Hub

locale
GETLocales
GETCurrencies
GETTime-Zones
GETTime-Zone Date-Time
GETTime-Zone Time
GETLanguages
geo
GETCities
GETCity Details
GETCountries
GETCountry Details
GETCountry Regions
GETCountry Region Details
GETCountry Region Cities
GETCities Near City
GETCity Date-Time
GETCity Time
GETCity Distance
GETCities Near Location
GETCities

Find cities, filtering by optional criteria. If no criteria are set, you will get back all known cities with a population of at least 1000.

FreemiumThis API has a free, limited plan and paid plans. You can subscribe directly to it from RapidAPI.
Sign up to test this endpoint
Log in
Header Parameters
X-RapidAPI-KeySTRING
REQUIRED
Optional Parameters
limitNUMBER
OPTIONALThe maximum number of results to retrieve
countryIdsSTRING
OPTIONALOnly cities in these countries (comma-delimited country codes or WikiData ids)
includeDeletedSTRING
OPTIONALWhether to include any cities marked deleted: ALL | SINCE_YESTERDAY | SINCE_LAST_WEEK | NONE
minPopulationNUMBER
OPTIONALOnly cities having at least this population
namePrefixSTRING
OPTIONALOnly cities whose names start with this prefix. If languageCode is set, the prefix will be matched on the name as it appears in that language.
locationSTRING
OPTIONALOnly cities near this location. Latitude/longitude in ISO-6709 format: ±DD.DDDD±DDD.DDDD
radiusNUMBER
OPTIONALThe location radius within which to find cities
distanceUnitSTRING
OPTIONALThe unit of distance to use: MI | KM
offsetSTRING
OPTIONALThe zero-ary offset into the results
excludedCountryIdsSTRING
OPTIONALOnly cities NOT in these countries (comma-delimited country codes or WikiData ids)
sortSTRING
OPTIONALHow to sort the results. Format: ±SORT_FIELD,±SORT_FIELD where SORT_FIELD = countryCode | elevation | name | population
timeZoneIdsSTRING
OPTIONALOnly cities in these time-zones
asciiModeBOOLEAN
OPTIONALDisplay results using ASCII characters
languageCodeSTRING
OPTIONALDisplay results in this language
hateoasModeBOOLEAN
OPTIONALInclude HATEOAS-style links in results
Request Snippet
unirest.get("https://wft-geo-db.p.rapidapi.com/v1/geo/cities?limit=undefined&countryIds=undefined&includeDeleted=undefined&minPopulation=undefined&namePrefix=undefined&location=undefined&radius=undefined&distanceUnit=undefined&offset=undefined&excludedCountryIds=undefined&sort=undefined&timeZoneIds=undefined&asciiMode=undefined&languageCode=undefined&hateoasMode=undefined")
.header("X-RapidAPI-Key", "undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response

loading...

Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://wft-geo-db.p.rapidapi.com/v1/geo/cities?limit=undefined&countryIds=undefined&includeDeleted=undefined&minPopulation=undefined&namePrefix=undefined&location=undefined&radius=undefined&distanceUnit=undefined&offset=undefined&excludedCountryIds=undefined&sort=undefined&timeZoneIds=undefined&asciiMode=undefined&languageCode=undefined&hateoasMode=undefined")
.header("X-RapidAPI-Key", "undefined")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication
Sign up for freeto test this endpoint
Join the world’s largest API marketplace with over half a million developers and thousands of APIs.
DiscoverAPIs
Testfrom the browser
Connectusing code snippets
Managefrom one dashboard