I spent my afternoon looking for open databases with the most important cities all over the world,
most of them are premium and costs something like $400, but since I’m working on a open source project I would like to use open data, is there somewhere where I can download the name of important cities?
I found open street map but it is 16gb of things such as nodes relations, but I only need name of cities and coordinates,
thank you very much,
g
This might be more than you’re after, but you could use the Overpass API to query all nodes with a key value pair of
["place"="city"].E.g. go to http://www.overpass-api.de/query_form.html and enter the following:
for XML output, or the following for JSON:
The output took a minute or so to return to me (it returned 5,000+ nodes), but looks like the following:
or the following for JSON:
More info:
http://wiki.openstreetmap.org/wiki/Tag:place%3Dcity
http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Find_something