Igor's Blog

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.
I've put together an example of this new API, read about it here: Example Yahoo Weather YQL to fetch forecasts and render with JQuery.


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 parameter...
 YQL
select * from weather.forecast where woeid=1100661


...and get results back in the JSON format (or XML if you wish)...
yqlweather2.png


The whole URL request looks like this:
 URL
https://query.yahooapis.com/v1/public/yql?q=select+%2A+from+weather.forecast+where+woeid%3D1100661&format=json


All you have to do is URL Encode the YQL statement and pass it in using the 'q' URL paramether. The 'format' URL parameter specifies whether the weather data should be returned as JSON or XML. 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 first...
yqlweather1.png


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.

-i

comments powered by Disqus
Other posts you may like...
Programming, DIY, Games, Hacks, and Tech

Recent Blog Posts

A guide for plotting your hard drive for Burstcoin mining on a Mac using mjminer

Replacing a broken hard drive in a Samsung Story Station

Fix Java applications slow start and net connection times on macOS sierra

Pierre Cardin Leather Computer Bag (PC2278)

How to stop SSH remote host disconnecting your session

Using PayPal PHP SDK on Google App Engine

Use the Touch Bar to lock your Mac with a single button press

Multi module builds with Maven 3.5 and the parent-child pom version management

Google App Engine local dev server DataStore becoming corrupted after a bad GQL statement is run

Unboxing my new 2017 2.9Ghz 15" MacBook Pro

Recent Galleries

Monument Valley 2 is released and does not disappoint

Space Food - Chocolate Ice Cream with Chocolate Chips

Legeod Star Wars AT-DP kit

DIY spare parts computer build with a RAIDMAX Anura case

Fake 'Lepin' brand Lego packaging

Hardwood garden bench with clear resin void filler

Fixing a 3D printer extruder that stopped heating up

Easily increase disk space in a Lenovo Ideapad 100S 14" laptop with an M.2 SSD

Making a multi-piece 3D printed solder spool holder stand

DIY indoor apartment grow light wiring

My Other Web Sites

Igor and Elise's Travels
Riverside Expressway Cam
300 George St Blogumentary

My Online Tools

UUID to OID Converter
Guru JSON-RPC Tester
Extrudifier Object Designer
Travel ┬ÁBlog

Blogs and Friends

Matt Moores Blog
Georgi's FlatPress Guide
Perplexing Permutations
The Security Sleuth
Ilia Rogatchevski
Travelling Fairy

Blog Activity

Blog Activity
Don't feel obliged, but you could follow me for more great content!
     
Don't show this again