Met Office

National Parks weather forecasts detailed documentation

This page contains detailed documentation on each of the data feeds associated specifically with national park forecasts.

Related articles

Here we provide detailed descriptions of the following feeds:

National park forecasts capabilities feed

Description of data feed

The national park forecast capabilities data feed provides a summary of the results that are available from the national park forecasts data feed, specifying the national parks for which data are available, and the time when the forecasts 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 national park forecasts web service rather than calling the national park 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

Since the capabilities web service concerns forecast scripts, whenever this web service is used the data category field in the URL should be set to txt, the resource category field should be set to wxfcs, and, as is the case for all web services, you should also 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.

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

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

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

    The above example would return a file of approximately 3 kB in size
  2. You would like to know which timesteps are available for the three national park forecasts data feed in JSON format In this case you would set the data category to txt, the resource category to wxfcs, and the data type to json:

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

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

    The above example would return a file of approximately 2 kB in size

Example of XML and JSON responses

The following examples show a typical result of a call to the national park forecast capabilities web service.

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/nationalpark/xml/capabilities?key=<APIkey>

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/nationalpark/json/capabilities?key=<APIkey>

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 NationalParkForecasts object (or node in XML), defined as follows:

NationalParkForecasts

The NationalParkForecasts object comprises a number of NationalParkForecast objects, defined below.

NationalParkForecast

A NationalParkForecast object defines a single national park forecast, and contains the following attributes:

  • IssueAt: This describes the official time of issue for the forecast
  • IssueTime: This gives the time at which the forecast was actually issued, in ISO8601 format
  • region: This gives the short name of the region
  • regionName: This gives the full name of the region

National park forecasts site list data feed

Description of data feed

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

Accessing the feed via its web service

Description of web service

The national park forecast site list web service is used to check which locations the national park 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 national park 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 national park forecast web service in XML format. In this case you would set the data type to xml.

    Example: to obtain sites for the forecast web service:

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

    The above example would return a file of approximately 1 kB in size
  2. You would like to know which sites are available for the national park forecast web service in JSON format. In this case you would set the data type to json.

    Example: to obtain sites for the forecast web services:

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

    The above example would return a file of approximately 1 kB in size

Example of XML and JSON responses

The following examples show a typical result of a call to the national park forecast site list web service requesting a complete list of sites for which national park 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/nationalpark/sitelist?key=<API key>

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/nationalpark/sitelist?key=<API key>

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 national park
  • name: This provides the short name of the national park

National park forecasts data feed

Accessing the feed via its web service

Description of web service

This provides access to national park forecasts. The data provided by the web service is generally updated twice daily, early morning and early afternoon. For a full list of the sites, call the national park forecasts site list data feed [in page HL to anchor - to do].

Possible use cases for this web service with example URLs

Since this web service supplies script forecast data, whenever this web service is used the data category field in the URL should be set to txt, and resource category should be set to wxfcs. You should also 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.

  1. You would like the national park forecast for a single national park. In this case you specify the national park ID explicitly in the location field.

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

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

    The above example would return a file of approximately 1 kB in size
  2. You would like the national park forecast for all national parks. In this case you specify all 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/nationalpark/json/all?key=<API key>

    The above example would return a file of approximately 15 kB in size
  3. Example of XML and JSON responses

The following examples show a typical result of a call to the national park forecasts web service requesting the national park forecast for Cairngorms National Park. 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/nationalpark/xml/600?key=<API key>

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/nationalpark/json/600?key=<API key>

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 NationalParkForecasts object (or node in XML), defined as follows:

NationalParkForecasts

The NationalParkForecasts object comprises a number of NationalParkForecast objects, defined below.

NationalParkForecast

A NationalParkForecast object defines a single national park forecast, and contains the following attributes:

  • IssueAt: This describes the official time of issue for the forecast
  • IssueTime: This gives the time at which the forecast was actually issued, in ISO8601 format
  • Issuer: This describes the Met Office production unit responsible for the forecast
  • region: This gives the short name of the region
  • regionName: This gives the full name of the region
  • type: This describes the time of day to which the forecast refers

It also contains a single Section object.

Section

A NationalParkForecast object defines a single national park forecast. It contains a type attribute, which specifies the period of time covered by the forecast. It also contains the following elements:

Title: This gives the title of the forecast

para: This describes the content of the forecast

Last Updated: 7 December 2012

Our Products

Related products

Support