GET /city/{name} · /{name}/nearby · ?lat=&lon=
Pass a name, a search, or coordinates. Get the city, then what is around it.
You have a city name. The largest match wins a tie.
Try it
name
City name
type
What the place is in its own country's words (city, town, commune, ward)
capital_of
country when it is a national capital, state when it is a state or region capital, null otherwise
district
District code the city sits in (US FIPS, FR INSEE, GB GSS)
country
ISO2 country code
elevation
Elevation in meters at the city center
area
Total area in km² (land + water, or the official total)
id
Stable city id (city_...). Fetch again at /city/id/{id}
nearby
Cities inside the radius, nearest first, each with distance and distance_mi
distance
Kilometers from query point (coords and nearby)
distance_mi
Miles from query point (coords and nearby)
1
The largest match wins a tie. Native name when it differs.
2
q for typeahead. lat/lon for the nearest place. /nearby for the towns around it.
3
27 countries. Not a worldwide filler dump.
Official sources. Every plan.
Find a city by exact name, typeahead search (?q=), coordinates, or the towns around it. Name lookups pin one city (the largest, if there is a tie). /city/{name}/nearby lists the places around an anchor. Coordinate lookups return the nearest place plus distance in miles and kilometers.
Type, capital, district, elevation, and land area ride every record. name is the English catalog name. local_name carries the native form when it differs. Tokyo's local_name reads 東京. Twenty-seven countries, each from its official national gazetteer.
Need the state or postal record itself? Use /state/{code} or /postal/{code}.
RESPONSE
$ curl "https://api.parseapi.com/city/charlotte" \ -H "X-API-Key: YOUR_API_KEY" // 200 · ~37ms US · ~113ms worldwide { "name": "Charlotte", "local_name": null, "type": "city", "capital_of": null, "state": "NC", "state_name": "North Carolina", "district": "37119", "district_name": "Mecklenburg", "country": "US", "country_name": "United States", "latitude": 35.209045, "longitude": -80.83099, "elevation": 209, "elevation_ft": 686, "population": 943476, "area": 813.48, "land_area": 808.33, "water_area": 5.15, "timezone": "America/New_York", "id": "city_mb8mbqrkz8zb" }
Response fields
QUESTIONS
SPEED
US
37ms
EU
91ms
APAC
144ms
LatAm
18ms
ME
121ms
Twenty-seven countries, each from its official national gazetteer.
Miles and kilometers between two cities with the city distance tool.