Hi everyone, I have a list of city names say, all the cities in Germany, and I want to get lat/lng coordinates for each one of them.<p>Is there any API I can use to get this kind of data? Google and Foursquare did not seem to help with that<p>thanks for your time<p>UPDATE: you people are amazing, thanks for the responses!
It's called geocoding. There are several free services who provide API. Here are two of them from the first page of my search results:<p><a href="https://geoservices.tamu.edu/Services/Geocode/WebService/" rel="nofollow">https://geoservices.tamu.edu/Services/Geocode/WebService/</a><p><a href="http://developer.mapquest.com/web/products/dev-services/geocoding-ws" rel="nofollow">http://developer.mapquest.com/web/products/dev-services/geoc...</a>
Geonames.org has files containing zip code, city and, lat/lon:
<a href="http://download.geonames.org/export/zip/" rel="nofollow">http://download.geonames.org/export/zip/</a><p>Hope this helps.
Google's Geocoding API does just that.<p>Example:<p><pre><code> https://maps.googleapis.com/maps/api/geocode/json?address=Berlin&sensor=false</code></pre>