Welcome, guest Sign In
The Weather RSS feed enables you to get up-to-date weather information for your location. You can save this feed in My Yahoo! or your favorite feed aggregator, or incorporate the RSS data into your own web site or client application. The Weather RSS feed is a dynamically-generated feed based on zip code or Location ID.
This page describes the format of the request URL and the RSS response for developers. It contains these sections:
The Weather RSS feed request follows simple HTTP GET syntax: start with a base URL and then add parameters and values after a question mark (?). Multiple parameters are separated by an ampersand (&).
The base URL for the Weather RSS feed is
http://weather.yahooapis.com/forecastrss
In this section, Summary shows how to make an RSS request with different parameters; Request Parameters shows a table summarizing those parameters.
The Weather RSS feed request follows simple HTTP GET syntax: start with a base URL and then add parameters and values after a question mark (?). Multiple parameters are separated by an ampersand (&). For the Weather RSS feed there are two parameters:
p for location.u for degrees units (Fahrenheit or Celsius).The location parameter p is required. Use this parameter to indicate the location for the weather forecast as a zip code or Location ID.
http://weather.yahooapis.com/forecastrss?p=location
For example, to get weather for Yahoo! Headquarters in Sunnyvale, CA, use the zip code for Sunnyvale (94089):
http://weather.yahooapis.com/forecastrss?p=94089
Or use the Location ID for Sunnyvale (USCA1116):
http://weather.yahooapis.com/forecastrss?p=USCA1116
The location parameter can be a US Zip code or a location ID. To find your location ID, browse or search for your city from the home page. The weather ID is in the URL for the forecast page for that city. You can also get the location ID by entering your zip code on the home page. For example, if you search for Los Angeles on the home page, the forecast page for that city is http://weather.yahoo.com/forecast/USCA0638.html. The location ID is USCA0638.
The optional u (units) parameter indicates the degree units for the weather forecast. By default, Yahoo! Weather returns temperature information in degrees Fahrenheit. Use the u parameter to explicitly specify the degree units in Fahrenheit (f) or Celsius (c). The units parameter is case sensitive. For example, to get the weather forecast in Sunnyvale, CA in Celsius:
http://weather.yahooapis.com/forecastrss?p=94089&u=c
Note that choosing Celsius degree units changes all the weather units to metric, for example, wind speed will be reported as kilometers per hour and barometric pressure as millibars.
Yahoo! Weather returns an RSS 2.0 feed in response to this request. You can subscribe to the request URL with My Yahoo! or another RSS feed aggregator, or you can incorporate the information in the RSS response into your own application. See RSS Response Elements for information on the elements contained in the RSS feed.
p=95089
p=USCA1116 u=c The Weather RSS feed is an XML document that conforms to the RSS 2.0 specification. RSS is an XML document containing a single channel element representing the feed, several elements containing metadata about the feed itself, and one or more item elements describing individual items within the feed.
The Weather RSS feed also includes additional elements from the geo vocabulary as well as a custom yweather vocabulary.
The channel element contains metadata about the feed and its contents.
Element Descriptionhttp://us.rd.yahoo.com/dailynews/rss/weather/ Sunnyvale__CA/ *http://weather.yahoo.com/ forecast/94089_f.html The image element describes an image or icon used to identify the feed.
Element DescriptionThe item element contains current conditions and forecast for the given location. There are multiple yweather:forecast elements for today and tomorrow.
Element DescriptionCondition codes are used in the yweather:forecast element to describe the current conditions.
Code DescriptionTo get the forecast for Yahoo! Headquarters in Sunnyvale, CA, use the zip code:
http://weather.yahooapis.com/forecastrss?p=94089
Or use the Location ID for Sunnyvale (USCA1116):
http://weather.yahooapis.com/forecastrss?p=USCA1116
To get the forecast for New York City, use the Location ID USNY0996:
http://weather.yahooapis.com/forecastrss?p=USNY0996
To get the forecast for Paris, France, use the Location ID FRXX0076:
http://weather.yahooapis.com/forecastrss?p=FRXX0076
To get the forecast for Paris, France, with degrees Celsius and other metric units:
http://weather.yahooapis.com/forecastrss?p=FRXX0076&u=c
A sample RSS response is shown below:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <rss version="2.0" xmlns:yweather="http://weather.yahooapis.com/ns/rss/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"> <channel> <title>Yahoo! Weather - Sunnyvale, CA</title> <link>http://us.rd.yahoo.com/dailynews/rss/weather/Sunnyvale__CA/ *http://weather.yahoo.com/forecast/94089_f.html</link> <description>Yahoo! Weather for Sunnyvale, CA</description> <language>en-us</language> <lastBuildDate>Tue, 29 Nov 2005 3:56 pm PST</lastBuildDate> <ttl>60</ttl> <yweather:location city="Sunnyvale" region="CA" country="US"></yweather:location> <yweather:units temperature="F" distance="mi" pressure="in" speed="mph"></yweather:units> <yweather:wind chill="57" direction="350" speed="7"></yweather:wind> <yweather:atmosphere humidity="93" visibility="1609" pressure="30.12" rising="0"></yweather:atmosphere> <yweather:astronomy sunrise="7:02 am" sunset="4:51 pm"></yweather:astronomy> <image> <title>Yahoo! Weather</title> <width>142</width> <height>18</height> <link>http://weather.yahoo.com/</link> <url>http://us.i1.yimg.com/us.yimg.com/i/us/nws/th/main_142b.gif</url> </image> <item> <title>Conditions for Sunnyvale, CA at 3:56 pm PST</title> <geo:lat>37.39</geo:lat> <geo:long>-122.03</geo:long> <link>http://us.rd.yahoo.com/dailynews/rss/weather/ Sunnyvale__CA/* http://weather.yahoo.com/ forecast/94089_f.html </link> <pubDate>Tue, 29 Nov 2005 3:56 pm PST</pubDate> <yweather:condition text="Mostly Cloudy" code="26" temp="57" date="Tue, 29 Nov 2005 3:56 pm PST"></yweather:condition> <description><![CDATA[ <img src=http://developer.yahoo.com/weather/"http://us.i1.yimg.com/us.yimg.com/i/us/we/52/26.gif" /><br /> <b>Current Conditions:</b><br /> Mostly Cloudy, 57 F<p /> <b>Forecast:</b><BR /> Tue - Mostly Cloudy. High: 62 Low: 45<br /> Wed - Mostly Cloudy. High: 60 Low: 52<br /> Thu - Rain. High: 61 Low: 46<br /> <br /> <a href=index.php?i=1&m=1&u=http%3A%2F%2Fdeveloper.yahoo.com%2Fweather%2F%22http%3A%2F%2Fus.rd.yahoo.com%2Fdailynews%2Frss%2Fweather%2FSunnyvale__CA%2F%2Ahttp%3A%2F%2Fweather.yahoo.com%2Fforecast%2F94089_f.html%22%3EFull Forecast at Yahoo! Weather</a><BR/> (provided by The Weather Channel)<br/>]]> </description> <yweather:forecast day="Tue" date="29 Nov 2005" low="45" high="62" text="Mostly Cloudy" code="27"></yweather:forecast> <yweather:forecast day="Wed" date="30 Nov 2005" low="52" high="60" text="Mostly Cloudy" code="28"></yweather:forecast> <guid isPermaLink="false">94089_2005_11_29_15_56_PST</guid> </item> </channel> </rss>
The feeds are provided free of charge for use by individuals and non-profit organizations for personal, non-commercial uses. We ask that you provide attribution to Yahoo! Weather in connection with your use of the feeds.
If you provide this attribution in text, please use: "Yahoo! Weather." If you provide this attribution with a graphic, please use the Yahoo! Weather logo that we have included in the feed itself.
We reserve all rights in and to the Yahoo! Weather logo, and your right to use the Yahoo! Weather logo is limited to providing attribution in connection with these RSS feeds.
Yahoo! also reserves the right to require you to cease distributing these feeds at any time for any reason.
Copyright © 2008 Yahoo! Inc. All rights reserved. Copyright | Privacy Policy
Help us continue to improve the Yahoo! Developer Network: Send Your Suggestions

CorporateMassageServices-PA; NJ; DE
Mobilized by PhoneFavs
Click here for the original version.