I started using Yahoo's free weather API to get the weather data I need, but it seems each time I request a city weather data there is a chance that either I get updated data or old data from back to 1 to 8 days.
Here is a simple URL which I make my request with: Click here to see a sample request
The YQL query is simple, which requests the weather data for New York city:
select * from weather.forecast where woeid in (select woeid from geo.places(1) where text="New York")
But each time I refresh that URL, I might get a completely different result. for example I did refresh it right now a couple times (Now is 13th of November 2015, around 22:45 GMT time) and here are some results I got in the query.results.channel.item.condition.date
part:
"date":"Fri, 13 Nov 2015 4:49 pm EST"
"date":"Thu, 12 Nov 2015 2:13 am EST"
"date":"Wed, 11 Nov 2015 1:49 am EST"
"date":"Fri, 13 Nov 2015 1:49 am EST"
This is very wired, how am I supposed to get current weather data like this when the API returns weather data for random dates each time I make a request?
Am I doing something wrong or missing something here?
Notes:
- This behavior is same for many different cities which I tried.
Using same query in YQL Console doesn't seem to be having same problem. (YQL Console)(Actually same problem has been spotted there too)- Same thing is also happening on this XML/RSS request method as well: http://weather.yahooapis.com/forecastrss?w=2459115
Updates:
- I did come across a case which returned me data from 8 days back!
- Using SORT functions of YQL doesn't fix the problem, since the sort is applied after selecting requested record/records.
Today (25th of November 2015), I have tried more than 20 refreshes and seems the data returning is always correct, it seems the problem is fixed.
On 26th of November 2015 Yahoo announced that the problem is fixed: Thanks for your feedback. This issue has been fixed. Please check out the site again. If you are still having this problem, please post a new idea on this forum.