Geolocation data for all of the cities in the world as json/csv. See Examples.
You can generate your own custom list with extra data with the python script.
NPM install coming soon.
To generate your own list, run python get_world_cities.py
and follow the CLI prompts.
Available data:
- ISO-3166 2-letter country code
- Full country name
- State
- County
- City/place name
- Alternative names
- Latitude
- Longitude
- Timezone
- Population
- Altitude
You can choose whether you want to include cities/places with greater than '1000', '5000', or '15000' in population.
A free Geocoding API key is now required to fetch 'state' and 'county' data.
world_cities.json
[
{
"country": "GB",
"name": "London",
"lat": "51.50853",
"lng": "-0.12574"
},
...
]
world_cities.csv
country,name,lat,lng
GB,London,51.50853,-0.12574
...
world_cities_(including_US_states).json
[
{
"country": "US",
"state": "NY",
"name": "New York City",
"lat": "40.71427",
"lng": "-74.00597"
},
...
]
world_cities_(including_US_states).csv
country,state,name,lat,lng
US,NY,New York City,40.71427,-74.00597
...
GeoNames: Country Code, City/Place Name, Alternative Names, Latitude, Longitude, Timezone, Population, and Altitude.
Geocoding: States and Counties.
annexare: Full Country Names.