National and regional text forecast detailed documentation

Detailed documentation on each of the data feeds associated specifically with regional forecasts

Here we provide detailed descriptions of the following feeds:

Regional forecasts capabilities feed

Description of data feed

The regional forecast capabilities data feed provides information on when the forecasts currently returned by the regional forecasts data feed were issued.

Accessing the feed via its web service

Description of web service

The capabilities web service returns the output of the capabilities data feed in either XML or JSON format. It is recommended that you query the capabilities web service to check whether the forecasts have been updated when querying for new data from the regional forecasts web service rather than calling the regional forecasts web service repeatedly, as this reduces the amount of data that has to be transferred, enhancing the user experience.

Possible use cases for this web service with example URLs

1. You would like to know which timesteps are available for the regional forecasts data feed in XML format. In this case you would set the data category to txt, the resource category to wxfcs, and the data type to xml:

Example: to obtain capabilities for the regional forecasts data feed in XML format:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/xml/capabilities?key=<APIkey>

The above example would return around 24 timesteps in XML format, resulting in a file size of approximately 3 kB

2. You would like to know which timesteps are available for the three regional forecasts data feed in JSON format In this case you would set the data category to txt, the resource category to wxobs, and the data type to json:

Example: to obtain capabilities for the regional forecasts data feed in JSON format:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/json/capabilities?key=<APIkey>

The above example would return around 24 timesteps in JSON format, resulting in a file size of approximately 2 kB

Example of XML and JSON responses

The following examples show a typical result of a call to the capabilities web service requesting a complete list of timesteps available from the regional forecasts web service for a given site ID.

XML

The XML that follows is a representative response to a call to the following URL, with a valid key:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/xml/capabilities?key=<APIkey>

<?xml version="1.0" encoding="ISO-8859-1"?>
<RegionalFcst xmlns="www.metoffice.gov.uk/xml/metoRegionalFcst" issuedAt="2012-03-07T04:00:00"></RegionalFcst>
JSON

The JSON that follows shows the structure of a representative response to a call to the following URL, with a valid key:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/json/capabilities?key=<APIkey>

{
    "RegionalFcst": {
        "issuedAt": "2012-03-07T04:00:00"
    }
}

Anatomy of responses

The XML and JSON responses produced by this web service are identical in terms of their high level structure and the information they represent. Each contains a single RegionalFcst object (or node in XML). The RegionalFcst object contains a single attribute, issuedAt, which states the date and time at which the current regional forecast was issued.

Regional forecasts site list data feed

Description of data feed

The regional forecast site list data feed provides a list of the locations (also known as sites) for which results are available for the regional forecast data feed. You can use this data feed to find details such as the ID of the region that you are interested in finding data for.

Accessing the feed via its web service

Description of web service

The regional forecast site list web service is used to check which locations the regional forecast data feed provides data for. You should set the data format in the URL to specify whether the web service should return XML or JSON, and include your API key in the query string.

Possible use cases for this web service with example URLs

When using the regional forecast data feed, you should set the data format in the URL to specify that the web service should return XML or JSON as required, and include your API key in the query string.

1. You would like to know which sites are available for the regional forecast web service in XML format. In this case you would set the data type to xml.

Example: to obtain sites for the regional forecast web service:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/xml/sitelist?key=<API key>

The above example would return around 5,000 sites in XML format, resulting in a file size of approximately 397 kB

2. You would like to know which sites are available for the regional forecast web service in JSON format. In this case you would set the data type to json.

Example: to obtain sites for the regional forecast web service:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/sitelist?key=<API key>

The above example would return around 5,000 sites in JSON format, resulting in a file size of approximately 435 kB

Example of XML and JSON responses

The following examples show a typical result of a call to the regional forecast site list web service requesting a complete list of sites for which regional forecasts are available.

XML

The XML that follows is a representative response to a call to the following URL, with a valid key:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/xml/sitelist?key=<API key>

<?xml version="1.0" encoding="UTF-8"?>
<Locations>
   <Location id="500" name="os" />
   <Location id="501" name="he" />
   <Location id="502" name="gr" />
   <Location id="503" name="st" />
   <Location id="504" name="ta" />
   <Location id="505" name="dg" />
   <Location id="506" name="ni" />
   <Location id="507" name="nw" />
   <Location id="508" name="ne" />
   <Location id="509" name="yh" />
   <Location id="510" name="wm" />
   <Location id="511" name="em" />
   <Location id="512" name="ee" />
   <Location id="513" name="sw" />
   <Location id="514" name="se" />
   <Location id="515" name="uk" />
   <Location id="516" name="wl" />
</Locations>
JSON

The JSON that follows shows the structure of a representative response to a call to the following URL, with a valid key:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/json/sitelist? key=<API key>

{
    "Locations": {
        "Location": [{
            "@id": "500",
            "@name": "os"
        }, {
            "@id": "501",
            "@name": "he"
        }, {
            "@id": "502",
            "@name": "gr"
        }, {
            "@id": "503",
            "@name": "st"
        }, {
            "@id": "504",
            "@name": "ta"
        }, {
            "@id": "505",
            "@name": "dg"
        }, {
            "@id": "506",
            "@name": "ni"
        }, {
            "@id": "507",
            "@name": "nw"
        }, {
            "@id": "508",
            "@name": "ne"
        }, {
            "@id": "509",
            "@name": "yh"
        }, {
            "@id": "510",
            "@name": "wm"
        }, {
            "@id": "511",
            "@name": "em"
        }, {
            "@id": "512",
            "@name": "ee"
        }, {
            "@id": "513",
            "@name": "sw"
        }, {
            "@id": "514",
            "@name": "se"
        }, {
            "@id": "515",
            "@name": "uk"
        }, {
            "@id": "516",
            "@name": "wl"
        }]
    }
}

Anatomy of responses

The response produced by this web service contains a single Locations element, which in turn contains a set of Location elements, defined as follows:

Location

A Location element defines a single site, and contains the following attributes:

  • id: This provides the ID of the region
  • name: This provides the short name of the region

Glossary of region names

The site list data feed does not include full names of regions. The full name corresponding to each short name, as of February 2011, is listed below:

  • id: This provides the ID of the region
  • os: Orkney & Shetland
  • he: Highland & Eilean Siar
  • gr: Grampian
  • ta: Tayside
  • st: Strathclyde
  • dg: Dumfries, Galloway, Lothian
  • ni: Northern Ireland
  • yh: Yorkshire & the Humber
  • ne: Northeast England
  • em: East Midlands
  • ee: East of England
  • se: London & Southeast England
  • nw: Northwest England
  • wm: West Midlands
  • sw: Southwest England
  • wl: Wales
  • uk: UK

Regional forecasts data feed

Accessing the feed via its web service

Description of web service

This provides access to the regional forecast data. The data provided by the web service is updated twice daily, AM and PM, normally early morning and early afternoon.

Possible use cases for this web service with example URLs

1. You would like the regional forecast for a single mountain area in XML format. In this case you specify the location ID explicitly in the location field.

Example: to obtain forecasts for a specified location at all available times in XML format:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/xml/100

The above example would return 24 forecast timesteps in XML format, resulting in a file size of approximately 2.4 kB

2. You would like the regional forecast for a single mountain area in JSON format. In this case you specify the location ID explicitly in the location field.

Example: to obtain forecasts for a specified location at all available times in JSON format:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/xml/100

The above example would return 24 forecast timesteps in JSON format, resulting in a file size of approximately 2.4 kB

Example of XML and JSON responses

The following examples show a typical result of a call to the regional forecasts web service requesting the regional forecast for Brecon Beacons. The following section provides a detailed description of the structure and content of the responses.

XML

The XML that follows is a representative response to a call to the following URL, with a valid key:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/xml/100

<?xml version="1.0" encoding="UTF-8"?>
<RegionalFcst xmlns="www.metoffice.gov.uk/xml/metoRegionalFcst" createdOn="2012-03-07T02:21:37" issuedAt="2012-03-07T04:00:00" regionId="os">
   <FcstPeriods>
      <Period id="day1to2">
         <Paragraph title="Headline:">Sunny intervals and showers.  Strengthening winds.</Paragraph>
         <Paragraph title="Today:">Rain at first over Shetland clearing east leaving a mixture of sunshine and showers these showers turning wintry as we go through the day especially over Hoy. Strengthening southwesterly winds reaching gale force. Maximum Temperature 6C.</Paragraph>
         <Paragraph title="Tonight:">Clear spells and frequent wintry showers during this evening and overnight. These showers will be heavy at first but will become lighter and more isolated later. Winds easing. Minimum Temperature 0C.</Paragraph>
         <Paragraph title="Thursday:">Showers at first these still wintry especially over Hoy and the Clift hills.. These showers will gradually merge into a more prolonged spell of  rain and hill snow. Staying windy. Maximum Temperature 9C.</Paragraph>
      </Period>
      <Period id="day3to5">
         <Paragraph title="Outlook for Friday to Sunday:">Cloudy with patchy rain on Friday. Patchy rain in Shetland on Saturday, staying windy.  Further patchy rain for Shetland on Sunday but dry and bright for Orkney.</Paragraph>
      </Period>
      <Period id="day6to15">
         <Paragraph title="UK Outlook for Monday 12 Mar 2012 to Wednesday 21 Mar 2012:">Largely dry and settled through this period, with mostly light winds as high pressure lies in the vicinity of the UK. It will be rather cloudy at times, with the best cloud breaks appearing to the lee of high ground. Some patchy light rain and drizzle is possible across exposed parts of the northwest, particularly towards the weekend. With time there is a chance of more persistent rain affecting western areas, with only a low chance of any significant rain across southeastern Britain. Night-time minimum temperatures will generally be very variable, with a continuing risk of occasional fog and frost, perhaps more likely in southeastern areas as a consequence of the increased likelihood of cloud breaks here. Meanwhile, maximum temperatures should be generally around or a little above normal throughout.</Paragraph>
      </Period>
      <Period id="day16to30">
         <Paragraph title="UK Outlook for Thursday 22 Mar 2012 to Thursday 5 Apr 2012:">Often settled weather conditions are likely across the UK through the final third of March and into early April. There are still likely to be occasional wetter and windier periods, particularly in the north and these may extend south at times. However, unsettled spells are likely to be less frequent than during late February and early March and rainfall over at least eastern and southern UK is expected to remain below average. Temperatures are likely to be largely above average, although some cooler periods are possible, particularly in the north and southeast.</Paragraph>
      </Period>
   </FcstPeriods>
</RegionalFcst>
JSON

The JSON that follows shows the structure of a representative response to a call to the following URL, with a valid key:

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/json/100

{
    "RegionalFcst": {
        "createdOn": "2012-03-07T02:21:37",
        "issuedAt": "2012-03-07T04:00:00",
        "regionId": "os",
        "FcstPeriods": {
            "Period": [{
                "id": "day1to2",
                "Paragraph": [{
                    "title": "Headline:",
                    "$": "Sunny intervals and showers.  Strengthening winds."
                }, {
                    "title": "Today:",
                    "$": "Rain at first over Shetland clearing east leaving a mixture of sunshine and showers these showers turning wintry as we go through the day especially over Hoy. Strengthening southwesterly winds reaching gale force. Maximum Temperature 6C."
                }, {
                    "title": "Tonight:",
                    "$": "Clear spells and frequent wintry showers during this evening and overnight. These showers will be heavy at first but will become lighter and more isolated later. Winds easing. Minimum Temperature 0C."
                }, {
                    "title": "Thursday:",
                    "$": "Showers at first these still wintry especially over Hoy and the Clift hills.. These showers will gradually merge into a more prolonged spell of  rain and hill snow. Staying windy. Maximum Temperature 9C."
                }]
            }, {
                "id": "day3to5",
                "Paragraph": {
                    "title": "Outlook for Friday to Sunday:",
                    "$": "Cloudy with patchy rain on Friday. Patchy rain in Shetland on Saturday, staying windy.  Further patchy rain for Shetland on Sunday but dry and bright for Orkney."
                }
            }, {
                "id": "day6to15",
                "Paragraph": {
                    "title": "UK Outlook for Monday 12 Mar 2012 to Wednesday 21 Mar 2012:",
                    "$": "Largely dry and settled through this period, with mostly light winds as high pressure lies in the vicinity of the UK. It will be rather cloudy at times, with the best cloud breaks appearing to the lee of high ground. Some patchy light rain and drizzle is possible across exposed parts of the northwest, particularly towards the weekend. With time there is a chance of more persistent rain affecting western areas, with only a low chance of any significant rain across southeastern Britain. Night-time minimum temperatures will generally be very variable, with a continuing risk of occasional fog and frost, perhaps more likely in southeastern areas as a consequence of the increased likelihood of cloud breaks here. Meanwhile, maximum temperatures should be generally around or a little above normal throughout."
                }
            }, {
                "id": "day16to30",
                "Paragraph": {
                    "title": "UK Outlook for Thursday 22 Mar 2012 to Thursday 5 Apr 2012:",
                    "$": "Often settled weather conditions are likely across the UK through the final third of March and into early April. There are still likely to be occasional wetter and windier periods, particularly in the north and these may extend south at times. However, unsettled spells are likely to be less frequent than during late February and early March and rainfall over at least eastern and southern UK is expected to remain below average. Temperatures are likely to be largely above average, although some cooler periods are possible, particularly in the north and southeast."
                }
            }]
        }
    }
}

Anatomy of responses

The XML and JSON responses produced by this web service are identical in terms of their high level structure and the information they represent. Each contains a single RegionalFcst object (or node in XML), defined as follows:

RegionalFcst

The RegionalFcst object comprises contains the following attributes:

  • createdOn
  • issuedAt
  • regionId
FcstPeriods

The FcstPeriods object comprises a number of Period objects, defined below.

Period

Each Period object comprises contains a single attribute, id.

A Period object also contains a number of Paragraph objects

Paragraph

Each Paragraph object comprises contains a single attribute, title.

The body of each paragraph object is a textual forecast.

Last Updated: 3 December 2014

Your account

Our products

Related products

Support

Need more help? Visit our support pages