How to get 3,5 or 7 day forecasts from Yahoo Weather API instead of just today and tomorrow?
http://weather.yahooapis.com/forecastrss?w=location gives response which has weather forecast of just today and tomorrow.
In what way we can have more forecasts in the response?
Thanks,
As stated on the API explanation there are only two parameters:
w
for the WOEID (where on earth id) andu
for the unit (Fahrenheit or Celsius). There are no parameters for the number of days to fetch.I recommend to switch to some other weather API with more features.
Update : It's not working anymore
It's much easier. Just add the parameter
&d=5
to the string, like:if you want 5 days. Change
json
torss
for the RSS version.Not working anymore!
I know it is late and already had an accepted answer. But I will leave my thought just to benefit whoever came to here in search for more info.
Yahoo weather api has another format JSON.
http://weather.yahooapis.com/forecastjson?w=2459115&d=1
This API is undocumented but it will be useful for those who needs more forecasts. Adding parameter "d" will include more forecasts to returned data. I tried with different value for parameter "d". Unfortunately, it will only return forecasts for 4 more days regardless of different values I put in (1,2,3,4,5,a,c,d,...) .However, I believe this should be good enough for most cases.
**Note.. It is not working for rss though.
Limit parameter is working fine:
and URL:
Hello all I checked it today you will get maximum of a 10 dyas forcast adding a parameter d. I checked it with 1,2,3..10 and its working perfectly. If you submitt it with 10+ number it only returns 10 days (its maximum).
http://weather.yahooapis.com/forecastrss?w=2442047&u=c&d=10
I checkout with the above url.