TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: API to discover lat/long coordinates from a city name and country

2 点作者 rodrigoavie超过 10 年前
Hi everyone, I have a list of city names say, all the cities in Germany, and I want to get lat&#x2F;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!

3 条评论

conductor超过 10 年前
It&#x27;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:&#x2F;&#x2F;geoservices.tamu.edu&#x2F;Services&#x2F;Geocode&#x2F;WebService&#x2F;</a><p><a href="http://developer.mapquest.com/web/products/dev-services/geocoding-ws" rel="nofollow">http:&#x2F;&#x2F;developer.mapquest.com&#x2F;web&#x2F;products&#x2F;dev-services&#x2F;geoc...</a>
评论 #8423611 未加载
taurenk超过 10 年前
Geonames.org has files containing zip code, city and, lat&#x2F;lon: <a href="http://download.geonames.org/export/zip/" rel="nofollow">http:&#x2F;&#x2F;download.geonames.org&#x2F;export&#x2F;zip&#x2F;</a><p>Hope this helps.
评论 #8423619 未加载
runlevel1超过 10 年前
Google&#x27;s Geocoding API does just that.<p>Example:<p><pre><code> https:&#x2F;&#x2F;maps.googleapis.com&#x2F;maps&#x2F;api&#x2F;geocode&#x2F;json?address=Berlin&amp;sensor=false</code></pre>
评论 #8423610 未加载