I am looking for a web service that will allow me to get a list of places within a given map area.
The type of place returned should depend on the size of the bounds - for very large bounds I would want a list of countries, and for smaller ones a list of cities, and possibly other levels in between e.g. state or county.
Is there a service (free or paid) that supports this type of query? Either a real-time web based API or something where I can just download all the data at once would be OK.
The National Geospatial Intelligence Agency website has an advanced search function that supports querying on country, type of place, map bounds and many other criteria:
You can also download the whole database as a zip file, but unfortunately they don't seem to have any data on the US.
This website has data for all countries and offers multiple web services including reverse geocoding based on the administrative division level (province, county, city etc): geonames.org