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

header photo

Getting Cities Starting with a given prefix

You can find all cities whose name starts with a specific prefix by issuing the following request:

curl --get --include '{namePrefix}&sort={sort}&offset=0&limit=10' \
    -H 'X-Mashape-Key: YOUR_API_KEY' \
    -H 'X-Mashape-Host:'


namePrefix The first few letters of the city's name (including any spaces in it). Not case-sensitive.
sort Optionally, how to sort the results. Format: ±SORT_FIELD,±SORT_FIELD where SORT_FIELD = countryCode | elevation | name | population


You could use this for something like an autocomplete/autosuggest widget.