Search code examples
apiweather-api

How to get openweathermap.org info by zip?


I'm trying to retrieve weather info through openweathermap.org. No matter which zipcode I put in, it always return Not found city.

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

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

Anyone know what I'm doing wrong?


Solution

  • I just tried with my id and it didn't work either. It might be a server overload. You may want to fill a support request with openWeatherMap themselves, this is what I found from a while back:

    from https://openweathermap.desk.com/customer/portal/questions/13084185-error-not-found-city: Ivan - Sep 15, 2015 03:51PM UTC - OpenWeatherMap Agent

    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