Menu

GeoDB Cities API

Authentication

Authentication is based on passing your API key as a header parameter to any request you make. This API key will be assigned to you when you register with RapidAPI.

Specifically, all requests will require the following header parameter:

X-Mashape-Key: YOUR_API_KEY

For example, here is a cURL request you could execute right from your local shell to find all cities in the US and Canada with a population over 100,000:

curl --get --include 'https://wft-geo-db.p.mashape.com/v1/geo/cities?countryCodes=US,CA&minPopulation=100000'  \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host: wft-geo-db.p.mashape.com'

Note: Unless you specify an offset and limit, you will automatically get back the first 10 results. (Also, for the Basic plan, you are limited to 10 results at a time.)