NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ
for more details.
Not long ago I wrote that Yahoo effectively shut down its Weather API by forcing OAuth 1.0
. After what seems like an uproar by many developers Yahoo
reversed it's decision (in a way) and re-enabled public access to the Weather API
, but there is a catch. You have to use the new YQL
way of fetching data and it seems very slow to respond.
It looks like the examples have been updated and from what I could gather it is possible to make a request to a YQL URL
and fetch the data without authentication.
So it's possible to execute a query like this just by sending it as a URL
...and get results back in the JSON
format (or XML if you wish)...
The whole URL
request looks like this:
All you have to do is URL Encode
statement and pass it in using the 'q'
URL paramether. The 'format' URL
parameter specifies whether the weather data should be returned as JSON
. In case you are wondering, I looked up the WOEID here
Of course you probably don't want to bring back all of the results so you can tailor that query using the YQL Console
I'm glad Yahoo
has reenabled public access but it is definitely too late in my opinion as I would imagine many like myself have switched from this API
to something like OpenWeatherMap
Hope you found this post useful...
...so please read on! I love writing articles that provide beneficial information,
tips and examples to my readers. All information on my blog is provided free of
charge and I encourage you to share it as you wish. There is a small favour I ask in return however -
engage in comments below, provide feedback, and if you see mistakes let me know.
If you want to show additional support and help me pay for web hosting and
domain name registration,
donations, no matter how small, are always welcome!
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...