Yahoo Weather API is not working


i have used yahoo weather YQL in one of my sharepoint project and it was working fine but since last month it is not displaying the weather , below is the json query.

$.getJSON('http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20location%20in%20(%0A%20%20select%20id%20from%20weather.search%20where%20query%3D%22' + place + '%22%0A)%20limit%201&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=?', function (data) {

please let me know if there is any update so that i can change the query.

Thansk & Regards,

2 Replies
    • k
    • Dec 9, 2013

    I had the same problem. I changed the query to this:

    $.getJSON('<http://query.yahooapis.com/v1/public/yql?q=select%20>*%20from%20weather.bylocation%20where%20location%3D%22' + place + '%22&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=?', function (data) {....

    where instead of a subquery to get the code from the location name, you search directly weather.bylocation (instead of weather.forecast). I also had to change how I accessed the variables, because they are in a different level in the output of this query: e.g. data.query.results.channel.item.condition.temp was changed to data.query.results.weather.rss.channel.item.condition.temp

  • hi,

    thanks for the update , i will try the query and let you know if it is working or not.



Recent Posts

in General Discussion at YDN