Media Forecast API
home
The forecast service covers urban, district and coastal forecasts. The forecast service also provides tides and fire danger ratings.
• Urban forecasts cover a single location and have a defined latitude and longitude.
• Urban forecasts cover a single location and have a defined latitude and longitude.
• Coastal forecasts cover an offshore region.
• Fire Danger Ratings (FDR) cover an inland region.
• Tides cover a small region around a fixed point.
The forecast service uses a key which can represent an individual location or an area. To find out what keys to use, use the Weather Resources call (see Location Services).
1 Urban or City Forecasts
These calls are spot forecasts usually for an urban or city location. The forecasts normally provided as daily forecasts which cover a 24-hour period. Forecasts for different time periods are provided using a subtype field.
The calls are accessed by an ID which identifies an individual location.
1.1 By ID:
Description: This call gets an array of the forecast data for either a single forecast location or a group of forecast locations. Currently only daily forecasts are available.
See Additional Parameters below for additional filtering options.
API Call – single forecast location:
GET /countries/{countryCode}/forecasts/urbans/{urbanID}/daily
API Call – multiple forecast locations:
GET /countries/{countryCode}/forecasts/urbans?urbanIDs=[urbanIDs]&subtype={forecastSubtype}
Parameters:
Parameter | Example | Description |
---|---|---|
countryCode | au | This is the short code of the country that the weather information relates to. Available codes are: au – Australia This parameter is Mandatory. |
urbanID | SAU000462 | This is the urban key supplied by Location Services. In the case of urban forecasts, it can represent a single location. This parameter is Mandatory. When requesting multiple forecasts locations, urbanIDs is a comma separated list of identifiers. A maximum of ten Ids can be supplied. |
subtype | daily | This is the subtype of forecast required when requesting multiple locations. This parameter is Optional. Currently only available forecast subtype is daily. |
Example:
GET /countries/au/forecasts/urbans/SAU000205/daily
This example would return the urban forecast for Acacia Hills.
API Response:
This table shows the details of a 2-day urban forecast
{
"results":[
{
"ID":"SAU000205",
"city":"Acacia Hills",
"forecasts":[
{
"plainValidity":"Fri",
"startTime":"2017-03-17 00:00:00",
"endTime":"2017-03-18 00:00:00",
"expectedWeatherIcon":"Thunder",
"expectedBomIcon":"Storm",
"expectedWeatherDescription":"Shower or two. Possible storm",
"maxTemperature":34,
"minTemperature":24,
"spaStartTime":"9:10 am",
"spaEndTime":"4:50 pm",
"uvIndex":15,
"uvDescription":"Extreme",
"RainfallProbability":70,
"dailyRainfallRangeMin":3,
"dailyRainfallRangeMax":15,
"dailyRainfallRange":"3 to 15 mm",
"expectedWindDirection":"SW",
"expectedWindSpeedkph":7,
"sunRise":"06:49 am",
"sunRiseUTC":"20170316T211900Z",
"sunSet":"06:59 pm",
"sunSetUTC":"20170317T092900Z",
"moonRise":"10:20 pm",
"moonRiseUTC":"20170317T125000Z",
"moonSet":"10:21 am",
"moonSetUTC":"20170317T005100Z",
"firstLight":"06:28 am",
"firstLightUTC":"20170316T205800Z",
"lastLight":"07:21 pm",
"lastLightUTC":"20170317T095100Z",
"moonPhase":"WaningGibbous",
"rainDay":true
},
{
"plainValidity":"Sat",
"startTime":"2017-03-18 00:00:00",
"endTime":"2017-03-19 00:00:00",
"expectedWeatherIcon":"Thunder",
"expectedBomIcon":"Storm",
"expectedWeatherDescription":"Shower or two. Possible storm",
"maxTemperature":33,
"minTemperature":25,
"spaStartTime":"9:10 am",
"spaEndTime":"5:00 pm",
"uvIndex":16,
"uvDescription":"Extreme",
"RainfallProbability":70,
"dailyRainfallRangeMin":3,
"dailyRainfallRangeMax":15,
"dailyRainfallRange":"3 to 15 mm",
"expectedWindDirection":"N",
"expectedWindSpeedkph":9,
"sunRise":"06:49 am",
"sunRiseUTC":"20170317T211900Z",
"sunSet":"06:59 pm",
"sunSetUTC":"20170318T092900Z",
"moonRise":"11:03 pm",
"moonRiseUTC":"20170318T133300Z",
"moonSet":"11:10 am",
"moonSetUTC":"20170318T014000Z",
"firstLight":"06:28 am",
"firstLightUTC":"20170317T205800Z",
"lastLight":"07:20 pm",
"lastLightUTC":"20170318T095000Z",
"moonPhase":"WaningGibbous",
"rainDay":true
}
]
}
]
}
Data fields:
Field Name | Data Type | Description |
---|---|---|
ID | string | The urban key |
city | string | Name of the urban location |
plainValidity | string | Local day validity of data |
startTime | string | Start time of validity, in UTC |
endTime | string | End time of validity, in UTC |
expectedWeatherIcon | string | Forecast icon, using the MetraWeather icon set |
expectedBomIcon | string | BoM forecast icon, using the Bureau of Meteorology icon set http://reg.bom.gov.au/info/forecast_icons.shtml |
expectedWeatherDescription | string | Forecast text day |
maxTemperature | number | Forecast maximum temperature for local day in Celsius |
minTemperature | number | Forecast minimum temperature for local day in Celsius |
spaStartTime | string | Sun Protection Alert (UV) Alert start, in station local time |
spaEndTime | string | Sun Protection Alert (UV) Alert end, in station local time |
uvIndex | number | Maximum UV Index for local day |
uvDescription | string | Maximum UV Description for local day |
RainfallProbabilityRangeMin | number | Probability of precipitation for local day as a percentage |
dailyRainfallRangeMin | number | Likely minimum precipitation in millimeters. |
dailyRainfallRangeMax | number | Possibly maximum precipitation millimeters. |
dailyRainfallRange | string | Minimum to maximum precipitation text |
expectedWindDirection | string | Expected wind direction near local noon |
expectedWindSpeedKph | number | Expected wind speed in km/h near local noon |
sunRise | string | Sunrise in local time |
sunRiseUTC | string | Sunrise in UTC |
sunSet | string | Sunset in local time |
sunSetUTC | string | Sunset in UTC |
moonRise | string | Moonrise in local time |
moonRiseUTC | string | Moonrise in UTC |
moonSet | string | Moon set in local time |
moonSetUTC | string | Moon set in UTC |
firstLight | string | The time in the morning when the horizon can just be discerned in local time |
firstLightUTC | string | The time in the morning when the horizon can just be discerned in UTC time |
lastLight | string | The time at night when the horizon cannot just be discerned any more in local time |
lastLightUTC | string | The time at night when the horizon cannot just be discerned any more in UTC |
moonPhase | string | Name of the current moon phase |
rainDay | boolean | Rainfall index - false for no rain, true for some rain |
Additional Parameters
The results can be further filtered by the optional use of additional parameters.
Parameter | Example | Description |
---|---|---|
days | 3 | The urban forecast data normally covers a 10-day period. Using days allows the number of days the forecast covers to be reduced to just the number provided. The maximum days value 10. Default behavior days=7 |
2 District Forecasts
These calls are forecasts for a district. The forecasts normally provided as daily forecasts which cover a 24-hour period. Forecasts for different time periods are provided using a subtype field.
The calls are accessed by district IDs which are provide by the Weather Resource call. In this case the keys identify a district rather than a specific location.
2.1 By ID:
Description: This call gets an array of the forecast data for either a single district or a group of forecast districts.
See Additional Parameters below for additional filtering options.
API Call – single forecast location:
GET /countries/{countryCode}/forecasts/districts/{districtID}/daily
API Call – multiple forecast locations:
GET /countries/{countryCode}/forecasts/districts?districtIDs=[districtIDs]&subtype={forecastSubtype}
Parameters:
Parameter | Example | Description |
---|---|---|
countryCode | au | This is the short code of the country that the weather information relates to. Available codes are: au – Australia This parameter is Mandatory. |
districtID | SA_PW015 | This is the district key supplied by Location Services. In the case of district forecasts, it represents a land region. This parameter is Mandatory. When requesting multiple forecasts locations, districtIDs is a comma separated list of identifiers. A maximum of ten IDs can be supplied. |
subtype | daily | This is the subtype of forecast required when requesting multiple locations. Currently only available forecast subtype is ‘daily’. This parameter is Optional. The default behavior is subtype=daily |
Example:
GET /countries/au/forecasts/districts/NSW_ME001/daily
This example would return the district forecast for Sydney NSW.
API Response:
{
"results":[
{
"ID":"NSW_ME001",
"district":"Sydney",
"forecasts":[
{
"plainValidity":"Fri",
"startTime":"2017-03-17 00:00:00+10",
"endTime":"2017-03-18 00:00:00+10",
"districtForecast":"Cloudy. Very high (90%) chance of showers, most likely in the morning and evening. Winds southwesterly 20 to
30 km/h tending southerly 35 to 55 km/h early in the morning and possibly reaching 45 to 65 km/h at times along the coastal fringe.",
"abrevDistrictForecast":"Cloudy. Very high (90%) chance of showers, most likely in morning and evening."
},
{
"plainValidity":"Sat",
"startTime":"2017-03-18 00:00:00+10",
"endTime":"2017-03-19 00:00:00+10",
"districtForecast":"Cloudy. Very high (near 100%) chance of showers, most likely in the morning and early afternoon. Winds
southerly 30 to 45 km/h turning east to southeasterly 15 to 25 km/h during the morning.",
"abrevDistrictForecast":"Cloudy. Very high (near 100%) chance of showers, most likely in morning and early afternoon."
}
]
}
]
}
Data fields:
Field Name | Data Type | Description |
---|---|---|
ID | string | The district key |
district | string | Name of the district |
plainValidity | string | Local day validity of data |
startTime | string | Start time of validity, in local time |
endTime | string | End time of validity, in local time |
districtForecast | string | Full district forecast for local day |
abrevDistrictForecast | string | Abbreviated district forecast for local day |
Additional Parameters
The results can be further filtered by the optional use of additional parameters.
Parameter | Example | Description |
---|---|---|
days | 3 | The district forecast data normally covers a 7-day period. Using days allows the number of days the forecast covers to be reduced to just the number provided. The maximum days value 10. Default behavior days=7 |
3 Coastal Forecasts
These calls are forecasts for a coastal area. The forecasts normally provided as daily forecasts which cover a 24-hour period. Forecasts for different time periods are provided using a subtype field.
The calls are accessed by area IDs which are provide by the Weather Resources call. In this case the IDs identify an offshore area rather than a specific location.
3.1 By ID:
Description: This call gets an array of the forecast data for either a single coastal area or a group of coastal areas.
See Additional Parameters below for additional filtering options.
API Call – single forecast location:
GET /countries/{countryCode}/forecasts/coastals/{coastalID}/
API Call – multiple forecast locations:
GET /countries/{countryCode}/forecasts/coastals?coastalIDs=[coastalIDs]&subtype={forecastSubtype}
Parameters:
Parameter | Example | Description |
---|---|---|
countryCode | au | This is the short code of the country that the weather information relates to. Available codes are: au – Australia <br<This parameter is Mandatory. |
coastalID | NSW_MW008 | This is the area ID supplied by Location Services. In the case of coastal forecasts, it represents a single off shore area. This parameter is Mandatory. When requesting multiple forecasts locations, coastalIDs is a comma separated list of identifiers. A maximum of ten IDs can be supplied. |
subtype | daily | This is the subtype of forecast required when requesting multiple locations. Currently only available forecast subtype is ‘daily’. This parameter is Optional. The default behavior is subtype=daily |
Example:
GET /countries/au/forecasts/coastals/NSW_MW001/daily
This example would return the coastal area forecast for Eden NSW.
API Response:
{
"results":[
{
"ID":"NSW_MW001",
"coastalArea":"Eden",
"forecasts":[
{
"plainValidity":"Fri",
"startTime":"2017-03-17 00:00:00+10",
"endTime":"2017-03-18 00:00:00+10",
"maxSeaHeight":3,
"maxSwellHeight":2,
"wind":"S 30 to SE",
"windphrase":"Bcmg SE 30kt",
"windIcon":"Strong",
"coastalForecast":"Winds: Southerly 20 to 25 knots, reaching up to 30 knots during the morning and early afternoon. Winds turning
southeasterly in the late afternoon. Seas: 2 to 3 metres. Swell1: Northeasterly 1.5 to 2 metres, decreasing to 1 to 1.5 metres during the
morning. Swell2: South to southeasterly around 1 metre. Weather: Cloudy. 60% chance of showers."
},
{
"plainValidity":"Sat",
"startTime":"2017-03-18 00:00:00+10",
"endTime":"2017-03-19 00:00:00+10",
"maxSeaHeight":2,
"maxSwellHeight":2,
"wind":"SE 20 to ENE",
"windphrase":"SE at 15/20kt",
"windIcon":"Nil",
"coastalForecast":"Winds: Southeasterly 15 to 20 knots turning east to northeasterly in the late morning and early afternoon. Seas:
1 to 2 metres, decreasing to 1 metre by early evening. Swell1: Northeasterly around 1 metre, tending easterly 1.5 to 2 metres during the
morning. Swell2: Southeasterly 1.5 metres, decreasing below 1 metre around midday. Weather: Cloudy. 70% chance of showers."
}
]
}
]
}
Data fields:
Field Name | Data Type | Description |
---|---|---|
ID | string | The district key |
coastalArea | string | Name of the coastal area |
plainValidity | string | Local day validity of data |
startTime | string | Start time of validity, in local time |
endTime | string | End time of validity, in local time |
maxSeaHeight | number | Maximum sea height in meters |
maxSwellHeight | number | Maximum swell in meters |
wind | string | Abbreviated wind forecast |
windphrase | string | Abbreviated wind forecast |
windIcon | string | Indicator for maximum wind speed, can be Nil, Strong, Gale, Storm, Hurricane |
coastalForecast | string | Full text coastal forecast for local day |
Additional Parameters
The results can be further filtered by the optional use of additional parameters.
Parameter | Example | Description |
---|---|---|
days | 3 | The coastal forecast data normally covers a 4-day period. Using days allows the number of days the forecast covers to be reduced to just the number provided. The maximum days value 10. Default behavior days=4 |
4 Fire Danger Ratings (FDR)
These calls are used to get the fire danger ratings for a fire district.
The calls are accessed by keys which are provide by the Weather Resources call. In this case the IDs identify a fire district.
4.1 By ID:
Description: This call gets an array of the forecast data for either a single district or a group of fire districts.
API Call – single forecast location:
GET /countries/{countryCode}/forecasts/fireDangerRatings/{fdrlID}
API Call – multiple forecast locations:
GET /countries/{countryCode}/forecasts/fireDangerRatings?fdrIDs=[fdrIDs]
Parameters:
Parameter | Example | Description |
---|---|---|
countryCode | au | This is the short code of the country that the weather information relates to. Available codes are: au – Australia This parameter is Mandatory. |
fdrID | WA_FW001 | This is the district ID supplied by Location Services. In the case of Fire Danger Ratings, it represents a single inland district. When requesting multiple forecasts locations, fdrIDs is a comma separated list of identifiers. A maximum of ten IDs can be supplied. This parameter is Optional. If fdrID is not supplied, all current fire danger ratings are returned. |
Example:
GET /countries/au/forecasts/fireDangerRatings/TAS_FW002
This example would return the current Fire Danger Rating for Tasmania Fire District FW002.
API Response:
{
"results":[
{
"ID":"TAS_FW002",
"fireDistrict":"North East",
"forecasts":[
{
"plainValidity":"Fri",
"startTime":"2017-03-17 00:00:00+10",
"endTime":"2017-03-18 00:00:00+10",
"forecastFireDangerRating":"High"
}
]
}
]
}
Data fields:
Field Name | Data Type | Description |
---|---|---|
key | string | The fire district ID |
fireDistrict | string | Name of the fire danger district |
plainValidity | string | Local day validity of data |
startTime | string | Start time of validity, in local time |
endTime | string | End time of validity, in local time |
forecastFireDangerRating | string | Forecast FDR for local day. Can be Nil, low-Moderate, High, Very High, Extreme, Catastrophic |
Additional Parameters
The results can be further filtered by the optional use of additional parameters.
Parameter | Example | Description |
---|---|---|
days | 3 | The fire danger rating forecast data normally covers a 4-day period. Using days allows the number of days the forecast covers to be reduced to just the number provided. The maximum days value 4. Default behavior days=4 |
5 Tides
These calls are used to get tide information for a location.
The calls are accessed by tide location IDs which are provide by the Weather Resources call. In this case the location IDs identify a coastal location.
5.1 By ID:
Description: This call gets an array of the forecast data for either a single location or a group of forecast locations.
API Call – single forecast location:
GET /countries/{countryCode}/forecasts/tides/{tideID}?days={noofdays}
API Call – multiple forecast locations:
GET /countries/{countryCode}/forecasts/tides?tideIDs=[tideID]&days={noofdays}
Parameters:
Parameter | Example | Description |
---|---|---|
countryCode | au | This is the short code of the country that the weather information relates to. Available codes are: au – Australia. This parameter is Mandatory. |
tideID | NSW_TP001 | This is the tide location ID supplied by Location Services. In the case of tides, it represents a single costal location. This parameter is Mandatory. When requesting multiple forecast locations, tideIDs is a comma separated list of identifiers. A maximum of ten IDs can be supplied. |
days | 3 | The tide information normally covers a 7-day period. Using days allows the |
number of days the forecast covers to be reduced to just the number
provided.
This parameter is Optional. Default behavior is days=7, maximum days=10.|
Example:
GET /countries/au/forecasts/tides/QLD_TP206?days=1
This example would return the current tides for location Sudbury Cay.
API Response:
{
"results":[
{
"ID":"QLD_TP206",
"location":"Sudbury Cay",
"forecasts":[
{
"startTime":"2017-01-20T00:00:00+10:00",
"endTime":"2017-01-20T23:59:59+10:00",
"tides":[
{
"type":"High",
"time":"2017-01-20T06:12:00+10:00",
"height":1.86
},
{
"type":"Low",
"time":"2017-01-20T11:37:00+10:00",
"height":1.44
},
{
"type":"High",
"time":"2017-01-20T16:58:00+10:00",
"height":1.82
},
{
"type":"Low",
"time":"2017-01-20T23:43:00+10:00",
"height":0.98
}
]
}
]
}
]
}
Data fields:
Field Name | Data Type | Description |
---|---|---|
ID | string | The tide forecast location ID |
location | string | Name of the tide forecast location |
startTime | string | Start time of validity, in local time |
endTime | string | End time of validity, in local time |
tides | string | The tide forecast for the validity period. |
type | string | Either the High or Low tide forecast. |
time | string | The local time the tide occurs. |
height | number | The tide height in meters. |
Additional Parameters
The results can be further filtered by the optional use of additional parameters.
Parameter | Example | Description |
---|---|---|
days | 3 | The tide forecast data normally covers a at least a year. Using days allows the number of days the forecast covers to be reduced to just the number provided. The maximum days allows is 10. Default behavior days=7 |