2016-09-17 96 views
3

我試圖通過openweathermap.org檢索天氣信息。無論我輸入哪個郵政編碼,它總是返回未找到城市。如何通過zip獲取openweathermap.org信息?

http://api.openweathermap.org/data/2.5/weather?zip=98104,us&APPID=xxx 

{"cod":"404","message":"Error: Not found city"}

任何人都知道我做錯了嗎?

回答

2

我只是試着用我的ID,它也沒有工作。這可能是服務器超載。 您可能需要填充openWeatherMap自己支持請求,這是我從前陣子發現:

https://openweathermap.desk.com/customer/portal/questions/13084185-error-not-found-city: 伊萬 - 2015年9月15日下午3點51分UTC - OpenWeatherMap代理

To make it clear: a problem of our API is that errors like this don’t necessarily mean what they say. A 404 or, say, 503 error can happen even when your request is perfectly valid and when the place actually is in the database, the reason behind is the free servers overload. We do our best to extend the capacity continuously but don’t always manage fitting in the resources we have