Intraday Forecast (3 Day, 5 Day, 7 Day, 10 Day)
Overview
- Domain Portfolio: Forecast
- Domain: Forecasts
- Usage Classification: Standard
- Geography: Global
- Attribution Required: NO
- Attribution Requirements: N/A
The Intraday Forecast API is sourced from the The Weather Company Forecast system. This TWC API returns weather forecasts in 6-hour periods starting current day. The 6-hour periods are Morning, Afternoon, Evening, and Overnight. Your content licensing agreement with TWC determines the number of days returned in the API response and is constrained by the API Key that is provided to your company.
HTTP Headers and Data Lifetime - Caching and Expiration
For details on appropriate header values as well as caching and expiration definitions, see The Weather Company Data | API Common Usage Guide.
Understanding Intraday Forecasts
The Intraday Forecast product breaks down the days forecasts into (four) 6-hour segments for each of the included days.
Intraday Segment | Intraday Segment Name | Reference Description |
---|---|---|
1 | Morning | 7 AM - 1 PM Local Apparent Time; the midpoint defined as 10 AM. |
2 | Afternoon | 1 PM - 7 PM Local Apparent Time; the midpoint defined as 4 PM. |
3 | Evening | 7 PM - 1 AM Local Apparent Time; the midpoint defined as 10 PM. |
4 | Overnight | 1 AM - 7 AM Local Apparent Time; the midpoint defined as 4 AM. |
Translated Fields:
This TWC API handles the translation of phrases. However, when formatting a request URL a valid language must be passed along (see the language code table for the supported codes).
- daypart_name
- dow
- phrase32_char
- wdir_cardinal
Unit of Measure Requirement
- e = English units
- m = Metric units
- h = Hybrid units (UK)
v2fcstintraday3
v2fcstintraday5
v2fcstintraday7
v2fcstintraday10
URL Construction
Request by Geocode (Latitude & Longitude): Required Parameters: language, format, units, geocode, postal code apiKey=yourApiKey
https://api.weather.com/v1/geocode/34.063/-84.217/forecast/intraday/3day.json?language=en-US&units=e&apiKey=yourApiKey
https://api.weather.com/v1/geocode/34.063/-84.217/forecast/intraday/5day.json?language=en-US&units=e&apiKey=yourApiKey
https://api.weather.com/v1/geocode/34.063/-84.217/forecast/intraday/7day.json?language=en-US&units=e&apiKey=yourApiKey
https://api.weather.com/v1/geocode/34.063/-84.217/forecast/intraday/10day.json?language=en-US&units=e&apiKey=yourApiKey
Request by Postal Code: Required Parameters: language, format, units, geocode, postal code apiKey=yourApiKey
The Postal Code has a TWC proprietary location type (4) with the following format: location/<postal code>:<location type>:<country code>
https://api.weather.com/v1/location/30339:4:US/forecast/intraday/10day.json?language=en-US&units=e&apiKey=yourApiKey
Data Elements & Definitions
Note: Field names are sorted alphabetically in the table below for presentation purposes. The table below does not represent the sort order of the API response.
Field Name | Description | Type | Range | Sample | Nulls Allowed |
---|---|---|---|---|---|
class | Data identifier | string | fod_long_range_intraday | N | |
clds | 6-hour average cloud cover expressed as a percentage. | integer | 0 to 100 | 82 | N |
daypart_name | The name for the 6-hour period of the day. | string |
Morning Afternoon Evening Overnight |
Morning | N |
dow | Day of week | string | Thursday | N | |
expire_time_gmt | Expiration time in UNIX seconds | epoch | 1369252800 | N | |
fcst_valid | Time forecast is valid in UNIX seconds | epoch | 1369306800 | N | |
fcst_valid_local | Time forecast is valid in local apparent time. | ISO | 2013-08-06T07:00:00-0400 | N | |
icon_code | This number is the key to the weather icon lookup. The data field shows the icon number that is matched to represent the observed weather conditions. Please refer to the Forecast Icon Code, Weather Phrases and Images document. | integer | 26 | N | |
icon_extd | Code representing explicit full set sensible weather. Please refer to the Forecast Icon Code, Weather Phrases and Images document. | integer | 5500 | N | |
num | This data field is the sequential number that identifies each of the forecasted days in the API. They start on day 1, which is the forecast for the current day. Then the forecast for tomorrow uses number 2, then number 3 for the day after tomorrow, and so forth. | Integer | 1 - 15 | 1 | N |
phrase_12char | 6-hour sensible weather phrase | string | Cloudy | N | |
phrase_22char | 6-hour sensible weather phrase | string | Cloudy | N | |
phrase_32char |
6-hour sensible weather phrase Note: The character limit applies to English phrases only. For other languages this phrase may exceed 32 characters. |
string | Fog Late | N | |
pop | Daytime maximum probability of precipitation. | integer | 20 | N | |
precip_type | The short text describing the expected type accumulation associated with the Probability of Precipitation (POP) display for the hour. | string | rain,snow, precip | rain | N |
qualifier | A qualifier sensible weather extension for the 6-hour period. | string | Winds could occasionally gust over 70 mph. | Y | |
qualifier_code | 6-hour sensible weather qualifier code. | string | Q9015 | Y | |
rh | The relative humidity of the air, which is defined as the ratio of the amount of water vapor in the air to the amount of vapor required to bring the air to saturation at a constant temperature. Relative humidity is always expressed as a percentage. | integer | 0 to 100 | 83 | N |
subphrase_pt1 | Part 1 of 3-part daypart sensible weather phrase | string | Cloudy | N | |
subphrase_pt2 | Part 2 of 3-part daypart sensible weather phrase | string | Late | N | |
subphrase_pt3 | Part 3 of 3-part daypart sensible weather phrase | string | Thunder | N | |
temp | The temperature of the air, measured by a thermometer 1.5 meters (4.5 feet) above the ground that is shaded from the other elements. You will receive this data field in Fahrenheit degrees or Celsius degrees. | integer | -140 to 140 (F) | 68 | N |
wdir | 6-hour average wind direction in magnetic notation. | integer | 0 to 359 | 145 | N |
wdir_cardinal | 6-hour average wind direction in cardinal notation. | string | N , NNE , NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW | SE | N |
wspd |
The maximum forecasted 6-hour wind speed. The wind is treated as a vector; hence, winds must have direction and magnitude (speed). The wind information reported in the hourly current conditions corresponds to a 10-minute average called the sustained wind speed. Sudden or brief variations in the wind speed are known as “wind gusts” and are reported in a separate data field. Wind directions are always expressed as "from whence the wind blows" meaning that a North wind blows from North to South. If you face North in a North wind the wind is at your face. Face southward and the North wind is at your back. |
integer | 5 | N |
JSON Sample
{
"metadata": {
"language": "en-US",
"transaction_id": "1471548007907:1671560253",
"version": "1",
"latitude": 34.06,
"longitude": -84.21,
"units": "e",
"expire_time_gmt": 1471548260,
"status_code": 200
},
"forecasts": [
{
"class": "fod_long_range_intraday",
"expire_time_gmt": 1471548260,
"fcst_valid": 1471539600,
"fcst_valid_local": "2016-08-18T13:00:00-0400",
"num": 1,
"temp": 90,
"pop": 24,
"icon_extd": 3000,
"icon_code": 30,
"dow": "Thursday",
"daypart_name": "Afternoon",
"phrase_12char": "P Cloudy",
"phrase_22char": "Partly Cloudy",
"phrase_32char": "Partly Cloudy",
"subphrase_pt1": "Partly",
"subphrase_pt2": "Cloudy",
"subphrase_pt3": "",
"precip_type": "rain",
"rh: 50,
"wspd": 6,
"wdir": 274,
"wdir_cardinal": "W",
"clds": 62,
"qualifier_code": null,
"qualifier": "A stray shower or thunderstorm is possible."
},
{
"class": "fod_long_range_intraday",
"expire_time_gmt": 1471548260,
"fcst_valid": 1471561200,
"fcst_valid_local": "2016-08-18T19:00:00-0400",
"num": 2,
"temp": 79,
"pop": 53,
"icon_extd": 3809,
"icon_code": 47,
"dow": "Thursday",
"daypart_name": "Evening",
"phrase_12char": "Sct T-Storms",
"phrase_22char": "Sct Thunderstorms",
"phrase_32char": "Scattered Thunderstorms",
"subphrase_pt1": "Scattered",
"subphrase_pt2": "T-Storms",
"subphrase_pt3": "",
"precip_type": "rain",
"rh": 77,
"wspd": 6,
"wdir": 281,
"wdir_cardinal": "W",
"clds": 75,
"qualifier_code": null,
"qualifier": null
},
{
"class": "fod_long_range_intraday",
"expire_time_gmt": 1471548260,
"fcst_valid": 1471582800,
"fcst_valid_local": "2016-08-19T01:00:00-0400",
"num": 3,
"temp": 74,
"pop": 15,
"icon_extd": 2900,
"icon_code": 29,
"dow": "Friday",
"daypart_name": "Overnight",
"phrase_12char": "P Cloudy",
"phrase_22char": "Partly Cloudy",
"phrase_32char": "Partly Cloudy",
"subphrase_pt1": "Partly",
"subphrase_pt2": "Cloudy",
"subphrase_pt3": "",
"precip_type": "rain",
"rh": 92,
"wspd": 2,
"wdir": 291,
"wdir_cardinal": "WNW",
"clds": 57,
"qualifier_code": null,
"qualifier": "A stray shower or thunderstorm is possible."
},
{
"class": "fod_long_range_intraday",
"expire_time_gmt": 1471548260,
"fcst_valid": 1471604400,
"fcst_valid_local": "2016-08-19T07:00:00-0400",
"num": 4,
"temp": 78,
"pop": 43,
"icon_extd": 3800,
"icon_code": 38,
"dow": "Friday",
"daypart_name": "Morning",
"phrase_12char": "Sct T-Storms",
"phrase_22char": "Sct Thunderstorms",
"phrase_32char": "Scattered Thunderstorms",
"subphrase_pt1": "Scattered",
"subphrase_pt2": "T-Storms",
"subphrase_pt3": "",
"precip_type": "rain",
"rh": 80,
"wspd": 4,
"wdir": 279,
"wdir_cardinal": "W",
"clds": 52,
"qualifier_code": null,
"qualifier": null
},
//This API will repeat additional times per response ** Collapsed for presentation purposes
{}, // - Response Repeats for Day 2
{}, // - Response Repeats for Day 3…
]
}