【问题标题】:How to get openweathermap.org info by zip?如何通过 zip 获取 openweathermap.org 信息?
【发布时间】:2017-01-25 09:06:42
【问题描述】:

我正在尝试通过 openweathermap.org 检索天气信息。无论我输入哪个邮政编码,它总是返回 Not found city。

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

{"cod":"404","message":"错误:未找到城市"}

有人知道我做错了什么吗?

【问题讨论】:

    标签: api weather-api


    【解决方案1】:

    我刚刚尝试使用我的 id,但它也不起作用。可能是服务器过载。 您可能想自己使用 openWeatherMap 填写支持请求,这是我不久前发现的:

    来自https://openweathermap.desk.com/customer/portal/questions/13084185-error-not-found-city: Ivan - UTC 时间 2015 年 9 月 15 日下午 3:51 - OpenWeatherMap 代理

    明确一点:我们的 API 的一个问题是这样的错误不会 一定是他们所说的意思。可能会发生 404 或 503 错误 即使您的请求完全有效并且该地点实际 在数据库中,背后的原因是免费服务器过载。我们 尽最大努力不断扩展容量,但不要总是 管理适合我们拥有的资源

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-02-20
      • 2017-12-08
      • 1970-01-01
      • 1970-01-01
      • 2022-01-10
      • 2020-08-27
      • 2015-10-10
      相关资源
      最近更新 更多