IT'S MORE THAN WEATHER—IT'S MyWeather.
Forecast XML Reference
- USA forecast data comes from MyWeather's patented MicroCast forecast model.
- International forecast data comes from a National Weather Service (NWS) global numerical model.
- The MicroCast forecast data is updated 4 times per day, or every six hours.
- The <day> element in the XML provides a summary for the day's weather.
- There are seven day summaries in the XML, starting with the current day.
- The current day (index=0) contains a label attribute to identify the time period as 'Today,' 'Tonight', or 'Overnight.' This is the most accurate label to use with today's forecast.
- The <day>/<segments> elements in the XML provides a summary for four six-hour time segments.
- The segment periods are "Morning," "Afternoon," "Evening," and "Overnight."
- The "Overnight" segment always represents 1:00AM - 6:00AM the next day. For example, the "Overnight" segment for Thursday would forecast for 1:00AM - 6:00AM on Friday.
- The <hours> element in the XML provides an hour-by-hour forecast for 95 hours.
- Hours and segments drop out of the XML four times per day, in accordance with the 6-hour file updates.
- There might be a latency due to processing time required to update the forecast model run.
- There are three possible icon representations in the hourly data: cloud cover ('ccover'), precipitation ('precip'), and a general icon ('icon'). Click here for more details.
| Element | Description |
| location/@key | location request token (zip code) |
| location/@id | location identifier code (see location mapping reference) |
| location/@name | location name |
| location/@state | location state |
| location/@country | location country |
| location/@tz | location time zone |
| location/@to | location time zone (GMT) offset |
| location/@mon | month of last forecast data file update |
| location/@day | day of last forecast data file update |
| location/@hr | hour of last forecast data file update |
| location/@min | minute of last forecast data file update |
| day/@index | day index 0 - 6: index ‘0’ = current day |
| day/@name | day name: ‘Sunday’,’Monday’, etc. |
| day/@label | For Day 0 only: labels current day as 'Today,' 'Tonight,' or 'Overnight' |
| day/forecast/@icon | icon mapping code (see icon mapping reference) |
| day/forecast/@sky | icon description (see icon mapping reference) |
| day/forecast/@wdir | wind direction forecast: ‘CM’ means ‘calm’ or no wind |
| day/forecast/@wlow | lowest forecasted wind speed for the day in miles per hour |
| day/forecast/@whigh | highest forecasted wind speed for the day in miles per hour |
| day/forecast/@bar | sea-level pressure forecast for the day in inches |
| day/forecast/@bar-trend | sea-level pressure trend: ‘0’=steady, ‘-1’=falling, ‘1’=rising |
| day/forecast/@rain | rain total forecast for the day in inches |
| day/forecast/@snow | snowfall total forecast for the day in inches |
| day/forecast/@high | high temperature forecast for the day in degrees F |
| day/forecast/@low | low temperature forecast for the day in degrees F |
| day/forecast/@pop | probability of precipitation forecast for the day in percent |
| day/forecast/@shrs | total hours of sunshine forecast for the day |
| day/forecast/@sunrise | time of sunrise for the day (in the location’s local time) |
| day/forecast/@sunset | time of sunset for the day (in the location’s local time) |
| day/statement | summary description of the day forecast |
| segment/@period | segment period 0-4: ‘0’ = current six hour segment of time |
| segment/@name | segment name: ‘Morning’, ‘Afternoon’, ‘Evening’, ‘Overnight’ |
| segment/@icon | icon mapping code (see icon mapping reference) |
| segment/@sky | icon description (see icon mapping reference) |
| segment/@wdir | wind direction forecast: ‘CM’ means ‘calm’ or no wind |
| segment/@wlow | lowest forecasted wind speed for the segment in mph |
| segment/@whigh | highest forecasted wind speed for the segment in mph |
| segment/@bar | sea-level pressure forecast for the segment in inches |
| segment/@bar-trend | sea-level pressure trend: ‘0’=steady, ‘-1’=falling, ‘1’=rising |
| segment/@rain | rain total forecast for the segment in inches |
| segment/@snow | snowfall total forecast for the segment in inches |
| segment/@pop | probability of precipitation forecast for the segment in percent |
| segment/statement | summary description of the segment forecast |
| hour/@index | hour index 0 - 95: index ‘0’ = first hour of current segment |
| hour/@name | hour label in local time zone: ‘a’ = AM and ‘p’ = PM |
| hour/@temp | temperature forecast for the hour in degrees F |
| hour/@feelslike | feelslike temperature forecast for the hour in degrees F |
| hour/@ttrend | temperature trend: ‘0’=steady, ‘-1’=falling, ‘1’=rising |
| hour/@icon | icon mapping code (see icon mapping reference); if there is no precip value, the icon value will equal the ccover value; otherwise, it will equal the precip value |
| hour/@wind | wind speed forecast for the hour in mph |
| hour/@wdir | wind direction forecast: ‘CM’ means ‘calm’ or no wind |
| hour/@dewpt | dewpoint forecast for the hour in degrees F |
| hour/@hum | relative humidity forecast for the hour in percent |
| hour/@ccover | cloud cover icon code (see icon mapping reference) |
| hour/@precip | precipitation icon code (see icon mapping reference): ‘0’ = no precipitation |