I'm writing an application that needs to plot a user's location on the map, and the user could be anywhere in the world, but I only need city/town level resolution, not street address. Is there a single open source database that contains this information?


2 Answers 2


Since you are interested in city/town level resolution, the best one is geonames.org.

"The GeoNames geographical database covers all countries and contains over eight million placenames that are available for download free of charge."

In case you are interested in your user's IP address, you can use ipinfodb. It returns the location of an IP address (country, region, city, zipcode, latitude and longitude) and the associated timezone in JSON format.


For geocoding up to street level, but can also only request a city, this could be useful: http://wiki.openstreetmap.org/wiki/Nominatim

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.