I need a list of locations in the world, including countries, cities, counties, etc. in order to use these in my social network's location sharing feature.

Where can I find a database like that? (free/paid)

4 Answers 4


The US National Geospatial Intelligence Agency (NGA) has what you are looking for all countries in the world. The datasets (one per country) have country, administrative level divisions (e.g., states/counties), incorporated and unincorporated places, both in native language/script and in English.


I also have converted all the country datasets into Linked CSV format:


The United Nations Multilingual Terminology Database has administrative divisions/city names in the 6 UN languages. I don't think they have a direct dump, so you may need to scrap it:


The US/NGA also took over maintaining the GEC (Geopolitical Codes):


Here's my archive of the updates in the original FIPS/XLS format:

http://www.opengeocode.org/cude1.2/NGA/GEC/index.php http://www.opengeocode.com/

Per Deer Hunter's comments, here are links to the US Census Gazetteer files:


Here's my version converted to linked CSV:


There is also the USGS Geographic Name Information System (GNIS) database for domestic and Antarctic names:


Here's my version converted to linked CSV:


The Canadian (2011) census would also have geographic name information. Here's my version converted to linked CSV:


  • Lacks the US gazetteer, though. Commented Feb 24, 2015 at 18:56

The OpenStreetMap project is an excellent source of worldwide data. They offer extracts on this page or via a map browser. Because it is a crowd-sourced dataset, it tends to be more complete in more developed countries, where internet and GPS availability is higher.

There are various tools for importing OSM data into Postgres, such as osm2pgsql. Nominatum is an address lookup service, based on OSM.

You might also find the Global Urban Extents from Global Rural-Urban Mapping Project dataset to be helpful.


I'd use http://geonames.org - it provides alternate names for many different languages for many of the cities in the database, which may be useful if your app is used worldwide.


You may be interested in Poplus APIs MapIt and Represent http://mapit.poplus.org/ http://represent.poplus.org/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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