Copied to clipboard

Get site-specific blended probabilistic forecast data

Use this API to get weather forecast data for a specific location or set of coordinates. This API conforms to the EDR specification which defines how environmental data should be structured and accessed.

You can use this API to:

  • Get forecast data for known locations
  • Find the nearest forecast to a coordinate
  • Choose the weather variables and time range you need

What you will need:

Before you start...

  • Sign up and subscribe to the API
  • Get your API key
  • Use a tool that can make API requests

Find available data

The API follows the EDR standard, starting with the /collections endpoint to show available datasets. Each dataset links to /instances, where you can explore available versions, time ranges and parameters. Once you've found what you need, you can request data either by location using /collections/{collection_name}/instances/{instance_id}/locations/{location_id}, or by coordinates using /collections/{collection_name}/instances/{instance_id}/position to return the nearest available forecast.

Start at the API root / base URL to explore the API:

https://data.hub.api.metoffice.gov.uk/mo-blended-prob-forecast-feature-svc/2.0.0

Utilise the following endpoints to find available data:

PurposeEndpoint
Find available datasets/collections
Explore time ranges & parameters/collections/{collection}/instances
Find available locations/collections/{collection}/instances/{instance}/locations
Request data for a location/collections/{collection}/instances/{instance}/locations/{location_id}

Get forecast data

Get data for a location:

Use the /locations endpoint to find the locations available for a collection. This returns a list of locations, including their location_id and coordinates, which you will need to request forecast data.

In most cases, you will use:

  • /collections/{collection_name}/instances/{instance}/locations/{location_id}

Some collections do not require an instance. For these, you can use:

  • /collections/{collection_name}/locations

This returns forecast data for the selected location.

Get data for coordinates

Use the /position endpoint to get forecast data for a set of coordinates. It returns data from the nearest available forecast location, making it useful when you do not already have a location_id.

Coordinates need to be provided using a POINT format:

  • POINT(longitude latitude): for e.g. POINT(5.6 4.3).

The response may include a large amount of data. You can reduce this by applying filters such as date range or specific parameters.

  • /collections/{collection}/instances/{instance}/position?coords=POINT(lon lat)

Important:

  • The API returns the nearest available forecast location
  • This may not match your exact coordinates
  • If your coordinates are outside the dataset area, the returned location may be far away

Filter the data

Filter by date range

You can limit the amount of data returned by specifying a date range using the datetime query parameter. This restricts the response to only include forecast times that match your request, helping you reduce the size of the response and focus on the data you need. This follows the EDR datetime query parameter specification.

You must provide dates using the ISO 8601 format. Depending on how you make your request, you may also need to URL encode the datetime value. To find the available dates, check the collection or instance endpoint, which includes the time range and available forecast time steps.

For example:

DescriptionExample Value
A single datetime, specified in ISO8601 format. 2026-01-01T23:20:50Z
A list of individual datetimes separated by commas. All available datetimes matching any of the specified datetimes will be returned. Any datetimes which are unavailable will be ignored. 2026-01-01T18:00:00Z,2026-01-01T19:00:00Z,2026-01-01T20:00:00Z
Start and end datetime values separated by a forward slash. All available datetimes within this interval will be returned. 2026-01-01T00:00:00Z/2026-01-02T00:00:00Z
An open-ended date range, following the format <start>/... This will return all available datetimes after and including the chosen start date. 2026-01-01T00:00:00Z/..
An open-ended date range, following the format ../<end>. This will return all available datetimes before and including the chosen end date. ../2026-01-02T00:00:00Z
A repeating interval, specified as R{n}/{start datetime}/{duration} where n is the number of repetitions, start datetime is the starting datetime in ISO8601 format and duration is the duration between each repetition in ISO8601 duration format. The given example here means "3 timesteps, 6 hours apart, starting from 2026-01-01T00:00:00Z". It is equivalent to providing a comma separated list of 2026-01-01T00:00:00Z, 2026-01-01T06:00:00Z, 2026-01-01T12:00:00Z R3/2026-01-01T00:00:00Z/PT6H

Filter by parameters

You can limit the data returned to specific parameters using the parameter-name query parameter. Provide the parameter names as a comma-separated list, for example:

  • parameter-name=airTemperature,rainfallRate

This filters the response to only include the parameters you request. To find the available parameters, check the collection or instance endpoint, which lists all supported parameters and the names to use in your request.

{
  "airTemperature": { 
    "type": "Parameter", 
    "observedProperty": { 
      "label": { 
        "en": "air_temperature" 
      } 
    }, 
    "unit": { 
      "symbol": "K" 
    }, 
    "fileSuffix": { 
      "label": { 
        "en": "air_temperature.nc" 
      }
    } 
  }
}

Understand the Response

Understand Location Responses

The response returns all locations for the collection with the GeoJSON type FeatureCollection. Each Feature in the collection represents a single location with the associated longitude, latitude, altitude and a location identifier (id) which can then be used to get data for that location. The properties object is currently empty but is required by the GeoJSON specification and can be used in future to provide additional information about the location.

For example:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": "00000046",
      "geometry": {
        "type": "Point",
        "coordinates": [
          50.1642990112305,
          53.507999420166,
          145.0
        ]
      },
      "properties": {}
    },
    {
      "type": "Feature",
      "id": "00000382",
      "geometry": {
        "type": "Point",
        "coordinates": [
          15.7440996170044,
          64.111198425293,
          567.0
        ]
      },
      "properties": {}
    }
  ]
}

Understand Forecast Data Responses

The response is in the CoverageJSON format, and contains the following elements.

Parameters

The parameters object contains details of the parameters returned in the response. Each parameter is represented by a single entry.

The observedProperty field provides a human-readable description of the parameter. It helps you understand what the parameter represents, but it is not used to identify or access data values.

Example:

{
  "parameters": {
    "airTemperature": {
      "type": "Parameter",
      "observedProperty": {
        "label": {
          "en": "air_temperature"
        }
      }
    }
  }
}

Use the parameter key to identify and access parameter data. Parameter keys are consistent across the API.

If you request a parameter using the parameter-name query parameter, the same key appears in both the parameters and ranges objects in the response.

For example, if your request includes:

parameter-name=airTemperature

The response will contain an airTemperature entry in the ranges object. This entry contains the forecast data for that parameter.

Referencing

The referencing section links domain axis values to a reference system. This allows you to interpret the values correctly.

CoverageJSON includes reference systems for:

  • Geographic coordinates (x, y and z)
  • Time (t and bounds)
  • Location identifiers

Some collections may include additional reference systems. These are used to describe other dimensions of the data. For more information, see the CoverageJSON reference system objects specification.

Below is an example of a referencing section with an additional axis to represent the probability thresholds associated with a diagnostic.

{
  "coordinates": [
    "probabilityOfFeelsLikeTemperatureAboveThreshold1p5mValues"
  ],
  "system": {
    "type": "IdentifierRS",
    "label": {
      "en": "probability of feels like temperature above threshold values (K)"
    },
    "targetConcept": {
      "label": {
        "en": "probability of feels like temperature above threshold values (K)"
      }
    }
  }
}

Coverages

The response contains an array of coverages. Each coverage represents a single forecast parameter.

The axis values can vary between coverages.

The domain type of the coverages is Point Series as defined at the top level of the CoverageCollection.

Axes

The axes object defines the coordinates associated with the data in a coverage. These include:

  • x for longitude
  • y for latitude
  • z for altitude (if available)
  • t for time

The x, y and z axes contain a single value because the data relates to one location.

The t axis contains one or more date-time values, depending on:

  • The data available for the parameter
  • Any datetime query parameter included in the request

If a parameter represents a period rather than a specific point in time, the t axis also includes a bounds property.

The bounds array contains pairs of values that define the start and end of each period. For each value in the values array:

  • The lower bound is at position 2 x i in the bounds array
  • The upper bound is at position 2 x i + 1 in the bounds array

Where i is the index of the corresponding value in the values array.

Some collections include additional axes. These are used to represent extra dimensions in the data. For more information, see the Referencing section of this guide.

The following example is from a probabilistic collection. In addition to the standard time and location axes, it includes an extra axis for probability threshold values.

{
  "domain": {
    "type": "Domain",
    "axes": {
      "t": {
        "values": [
          "2026-02-05T11:00:00Z",
          "2026-02-05T12:00:00Z"
        ]
      },
      "probabilityOfFeelsLikeTemperatureAboveThreshold1p5mValues": {
        "values": [
          ">=213.15",
          ">=218.15",
          ">=223.15"
        ]
      },
      "locationId": {
        "values": [
          "00322883"
        ]
      },
      "x": {
        "values": [
          7.6496
        ]
      },
      "y": {
        "values": [
          45.2008
        ]
      },
      "z": {
        "values": [
          301.0
        ]
      }
    }
  }
}

Ranges

The ranges object contains the forecast data values returned in the response.

There is one entry in the ranges object for each parameter listed in the parameters object. Use the parameter key to cross-reference between the objects.

Each range is represented as a CoverageJSON NdArray.

  • The axisNames field defines the order of the axes used to index the data.
  • The shape field defines the number of values along each axis.

In the following example, roadSurfaceTemperatureMean is defined across two axes:

  • t (time)
  • realization

The shape value of [3, 2] means there are:

  • 3 values along the t axis
  • 2 values along the realization axis

The values array contains 6 entries (3 × 2), stored as a single flattened array.

{
  "ranges": {
    "roadSurfaceTemperatureMean": {
      "type": "NdArray",
      "dataType": "float",
      "axisNames": ["t", "realization"],
      "shape": [
        3,
        2
      ],
      "values": [
        271.15,
        271.05,
        272.10,
        272.00,
        273.05,
        272.95
      ]
    }
  }
}

The values are ordered according to the axes listed in axisNames.

Troubleshooting

204 No Content Status Code from the /position or /locations/{location_id} Endpoints

A 204 No Content response indicates that no forecast data is available for the specified parameters. This response will have no body content.

  • If you have specified query parameters such as datetime or parameter-name, consider relaxing the filters.
  • Expand the date range.
  • Include additional parameters.
  • Remove optional filters altogether.
  • If no data is returned even without any query parameters, this could indicate data is temporarily unavailable. Please wait and retry.

400 Bad Request Status Code

The response should include a JSON error message indicating the problem with the request.

{
  "message": "unable to extract point values from POINT(1 2 3)- expected format is POINT(x y)",
  "transaction": "ae5f4bab-3edb-47d3-a36e-208a5c6b5b3f"
}

Get Help

If problems continue, contact support and include the transaction ID from the response.