Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

open weather map api call by city confusion

BRUCE CHO Apr 10, 2019 11:17PM BST


I'm learning how to use your open weather map api for a class assignment. I've been playing around with multiple api calls (by city, by id).

One thing I have a question about is the call by city. in the ?q={cityname} parameter, I was messing around and put in my zipcode instead of the cityname (In my case it would be I was fully expecting to see this fail because i thought the ?q={cityname} expects a city name and not a zipcode.

What I found was the open weather map api returning an object (in this case somewhere called Fresnillo). Can someone explain what is happening? I'm very confused how the call by city is getting this data.

Up 0 rated Down
Pavel Zuykov Apr 11, 2019 02:26PM BST OpenWeatherMap Agent


Seems like it still use ZIP search even if you use q parameter.

Please try to use right parameters for every type of requests.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found