Geolocation data for all of the cities in the world as json/csv.
You can generate your own custom list with extra data with the python script.
NPM install planned.
Population Threshold | Meaning |
---|---|
1000 | More precise. Villages, towns, and cities of 1000 or more in population. Bigger file size. |
5000 | Average. Towns and cities of 5000 or more in population. |
15000 | Least precise. Large towns, and cities of 15000 or more in population. Smaller file size. |
JSON example | CSV example |
[
{
"country": "GB",
"name": "London",
"lat": "51.50853",
"lng": "-0.12574",
},
] |
|
Population Threshold | Download JSON | Download CSV |
---|---|---|
1000 | world_cities.json | world_cities.csv |
5000 | world_cities_5000.json | world_cities_5000.csv |
15000 | world_cities_15000.json | world_cities_15000.csv |
JSON example | CSV example |
[
{
"country": "US",
"state": "NY",
"name": "New York City",
"lat": "40.71427",
"lng": "-74.00597"
},
] |
|
Population Threshold | Download JSON | Download CSV |
---|---|---|
1000 | world_cities_(including_US_states).json | world_cities_(including_US_states).csv |
Population Threshold | Download JSON | Download CSV |
---|---|---|
1000 | world_cities_(including_all_states_and_counties).json | world_cities_(including_all_states_and_counties).csv |
Population Threshold | Download JSON | Download CSV |
---|---|---|
1000 | world_cities_(including_states_and_counties_for_duplicate_names).json | world_cities_(including_states_and_counties_for_duplicate_names).csv |
{
"name": "London",
"lat": 51.50853,
"lng": -0.12574,
"geonameid": 2643743,
"altnames": {
"es": [
"Londres"
],
"it": [
"Londra"
],
...
},
"timezone": "Europe/London",
"population": 8961989,
"elevation": "23",
"country": "GB",
"country_name": "United Kingdom",
"state": "England",
"county": "",
"capital": "London",
"continent": "EU",
"currency_code": "GBP",
"currency_name": "Pound",
"phone": "44",
"languages": "en-GB,cy-GB,gd",
"neighbours": "IE"
}
To generate your own list, run python get_world_cities_geo_data.py
and follow the CLI prompts.
You can choose whether you want to include cities/places with a population greater than '500', '1000', '5000', or '15000'.
Basic data:
- Place name
- Latitude
- Longitude
Optional additional data:
- ISO-3166 2-letter country code
- Full country name
- Geonameid
- State
- County
- Alternative names
- Timezone
- Population
- Elevation (metre)
- Continent
- Capital City
- Currency Code
- Currency Name
- Phone Extension
- Spoken Languages
- Country Neighbours
A free Geocoding API key is now required to fetch 'state' and 'county' data.
GeoNames: All data except States and Counties.
Geocoding: States and Counties.
Geo FCC: US Counties
Open Meteo: Elevation
Creative Commons Attribution 4.0 License