metoffice.gov.uk APImetoffice.gov.uk ↗
Access UK weather forecasts, real-time lightning strikes, storm data, and weather warnings from the Met Office via 9 structured JSON endpoints.
curl -X GET 'https://api.parse.bot/scraper/f3476396-f4c9-4c00-8861-ee4d7559ab32/search_location?query=London' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for UK locations by name to retrieve their unique geohash codes, which are required for forecast endpoints.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Location name to search for (e.g. 'London', 'Manchester', 'Edinburgh'). |
{
"type": "array",
"fields": {
"area": "string, administrative area name",
"name": "string, location name",
"type": "string or null, location type (e.g. Residential, Airport and Heliport)",
"geohash": "string, unique location identifier for use with forecast endpoints",
"latLong": "array of two numbers [latitude, longitude]",
"domestic": "boolean, whether the location is within the UK"
},
"sample": {
"data": [
{
"area": "Greater London",
"name": "London",
"path": null,
"type": "Residential",
"geohash": "gcpvj0v07",
"latLong": [
51.50809,
-0.12482
],
"domestic": true,
"nearestGeohash": "gcpvj0v07"
}
],
"status": "success"
}
}About the metoffice.gov.uk API
The Met Office API exposes 9 endpoints covering UK weather data from hourly and daily forecasts to real-time lightning strikes and active weather warnings. Start with search_location to resolve any UK place name into a geohash, then pass that geohash to get_hourly_forecast or get_daily_forecast for structured forecast data. Regional narrative forecasts, storm centre information, and bounding-box spot forecasts are also available.
Location Resolution and Forecasts
All location-based forecast endpoints require a geohash identifier. Use search_location with a query string (e.g. 'Edinburgh') to retrieve matching locations; each result includes name, area, geohash, latLong, and a domestic boolean indicating UK coverage. Pass the geohash to get_daily_forecast for a 7-day outlook — each day returns date, weather_condition, high_temp, and low_temp, plus a current_conditions object with temperature, feels_like, rain_chance, and wind_gust. For sub-daily detail, get_hourly_forecast accepts the same geohash plus an optional date parameter (ISO YYYY-MM-DD); each hourly entry can include time, weather_condition, temperature, feels_like, precip_chance, and wind_speed.
Regional and National Forecasts
get_uk_regional_forecast takes a region code (e.g. 'se' for South East England, 'nw' for North West England) and returns an array of sections, each with a title and content string covering current conditions, short-term outlook, and longer-range narrative. For the UK-wide picture, get_uk_long_range_forecast needs no inputs and returns a national_forecast array of titled sections spanning a multi-week outlook.
Warnings, Storms, and Lightning
get_uk_weather_warnings returns an active_warnings array — the array is empty when no warnings are in force, and the response includes a status string in that case. get_uk_storm_centre returns sections with storm naming conventions and history, plus a storm_info array of descriptive strings about the current season. get_lightning_data delivers real-time strike coordinates as an array of objects with strike_time (ISO timestamp) and [longitude, latitude] coordinates, an intensity grid mapping cells to strike counts, and a last_update timestamp.
Spot Forecasts Over a Geographic Area
get_spot_forecast accepts a bbox string in minLon,minLat,maxLon,maxLat format, a zoom integer, and a layers string ('symbol', 'temperature', or 'wind'). It returns a spotdata array of named location objects with lat, lng, name, and layer-specific forecast values, alongside time_steps (unix timestamps with offsets) and a refreshed_epoch indicating when the data was last updated.
- Display a 7-day UK weather widget using
high_temp,low_temp, andweather_conditionfromget_daily_forecast. - Plot real-time lightning strikes on a map using
coordinatesandstrike_timefields fromget_lightning_data. - Alert users to active Met Office weather warnings by polling
get_uk_weather_warningsfor a non-emptyactive_warningsarray. - Build a UK route-planning tool that queries
get_hourly_forecastfor each waypoint using resolved geohashes. - Render temperature or wind overlays on a map tile viewer using
get_spot_forecastwith a dynamicbboxandzoomlevel. - Summarise regional weather conditions in a dashboard by fetching narrative text from
get_uk_regional_forecastfor multipleregioncodes. - Track storm season activity and named storms by parsing
sectionsandstorm_infofromget_uk_storm_centre.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does the Met Office have an official developer API?+
What does `get_lightning_data` return and how current is it?+
get_lightning_data returns a lightning_strikes array where each object has a strike_time ISO timestamp and a two-element [longitude, latitude] coordinate. It also includes an intensity grid (strike counts per cell per time interval) and a last_update timestamp. Data freshness is tied to the last_update field in the response; there is no configurable time-window parameter on this endpoint.Which UK regions are supported by `get_uk_regional_forecast`?+
'se' (South East England), 'nw' (North West England), and 'ne' (North East England), among others listed in the endpoint spec. Coverage is limited to defined Met Office UK regional boundaries. If a specific region code you need is not in the accepted list, you can fork this API on Parse and revise it to add the missing region.Does the API return historical weather data or past observations?+
Can `get_spot_forecast` return data outside the UK?+
bbox parameter accepts any minLon,minLat,maxLon,maxLat bounding box, but the underlying data is sourced from the Met Office, whose forecast coverage is focused on the UK. Spot data for locations outside UK coverage will likely return an empty or incomplete spotdata array. The domestic boolean on search_location results is a useful proxy for whether a location falls within covered territory.