GeoDB City API - Find Cities For Your Criteria | Wirefree Thought

header photo

Getting Cities & Suburbs For a metropolitan area

1. First, find the metropolitan city from the list of cities with populations greater than some number defining a metropolis for your case (500,000 in the example below):

curl --get --include '' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host:'

2. Now find all cities within some regional radius of some city from the previous results:

curl --get --include '{cityId}/nearbyCities?nearLocationRadius={nearLocationRadius}&nearLocationRadiusUnit={nearLocationRadiusUnit}&minPopulation={minPopulation}&offset=0&limit=500' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host:'


minPopulation Only cities having at least this population
nearLocationRadius The location radius in which to find cities
nearLocationRadiusUnit MI (radius given in miles) or KM (radius given in kilometers)