API Reference

Get a list of up to 1000 cities matching optional query filter critiera in the specified language sorted alphabetically by name

Log in to see full request history
Query Params
string

search by ame using 'contains' in the specified language, english by default

string

search by name using "begins with" in the specified language, english by default

string

search by exact match two letter iso a2 country code

string
Defaults to en

two letter iso code in what language to return results in, if available, otherwise in english

string

search by exact match on state code of city. It is not neccessary to use iso_a2 country code when using state_code.

string

search by timezone name

string

search by exact match hasc state code of city

string

find cities within 10 kilometers of ip address sorted by distance unless 'sort' field is provided

string

sort by field of results. one of population, name, timezone, state_code, state_hasc, iso_a2

integer
1 to 1000

integer limit of results returned. 1000 max.

string
Defaults to asc

sort direction of results by value of 'sort' field. one of asc or desc.

string
Defaults to id,name

comma delimited list of additional fields to return for in result. By default returns name in chosen language

Responses

404

The query has no results. Check your parameters in case there are any spelling issues. The language requested may not be supported.

5XX

Server error, probably a bug.

Language
Click Try It! to start a request and see the response here! Or choose an example:
application/json