Skip to content

Weather forecast

What this does

Returns a day-by-day weather forecast for a UK location. Each day includes high and low temperatures, conditions, and chance of rain. You choose how many days ahead to fetch (within the allowed maximum).

Who it is for

  • Trip and event planning over the next week
  • Logistics teams scheduling outdoor deliveries
  • Apps showing a simple forecast strip for a saved postcode
  • Newsletter writers adding a weekly outlook

Try it

Default: Bristol, 5 days.

https://fetch.li/v1/weather/forecast?postcode=BS11AA&days=5

Other examples:

https://fetch.li/v1/weather/forecast?lat=54.9783&lon=-1.6178&days=3
https://fetch.li/v1/weather/forecast?postcode=G11AA&days=7

HTTP example

GET /v1/weather/forecast?postcode=BS11AA&days=5 HTTP/1.1
Host: fetch.li
Accept: application/json

curl

curl -sS "https://fetch.li/v1/weather/forecast?postcode=BS11AA&days=5"

JavaScript fetch

const params = new URLSearchParams({ postcode: "BS11AA", days: "5" });
const response = await fetch(
  `https://fetch.li/v1/weather/forecast?${params}`
);
const forecast = await response.json();
forecast.days.forEach((day) => console.log(day.date, day.summary));

Python requests

import requests

response = requests.get(
    "https://fetch.li/v1/weather/forecast",
    params={"postcode": "BS11AA", "days": 5},
)
response.raise_for_status()
forecast = response.json()
for day in forecast["days"]:
    print(day["date"], day["summary"])

Example JSON response

{
  "location": {
    "postcode": "BS1 1AA",
    "lat": 51.4545,
    "lon": -2.5879,
    "label": "Bristol"
  },
  "days_requested": 5,
  "timezone": "Europe/London",
  "generated_at": "2026-08-25T11:00:00.000Z",
  "days": [
    {
      "date": "2026-08-25",
      "summary": "Light rain showers",
      "high_c": 18,
      "low_c": 12,
      "precipitation_chance_percent": 65,
      "wind_speed_mph_max": 14
    },
    {
      "date": "2026-08-26",
      "summary": "Partly cloudy",
      "high_c": 20,
      "low_c": 13,
      "precipitation_chance_percent": 20,
      "wind_speed_mph_max": 10
    },
    {
      "date": "2026-08-27",
      "summary": "Sunny intervals",
      "high_c": 22,
      "low_c": 14,
      "precipitation_chance_percent": 10,
      "wind_speed_mph_max": 8
    },
    {
      "date": "2026-08-28",
      "summary": "Cloudy",
      "high_c": 19,
      "low_c": 13,
      "precipitation_chance_percent": 35,
      "wind_speed_mph_max": 11
    },
    {
      "date": "2026-08-29",
      "summary": "Heavy rain",
      "high_c": 17,
      "low_c": 11,
      "precipitation_chance_percent": 80,
      "wind_speed_mph_max": 18
    }
  ]
}

Parameters

Parameter Required Type Description
postcode One of postcode or lat/lon string UK postcode
lat With lon if no postcode number Latitude
lon With lat if no postcode number Longitude
days No integer Number of forecast days (1–7). Default: 5

Provide either postcode or both lat and lon.

Errors that can happen

HTTP error.code When
400 invalid_body Missing location, days out of range, or not an integer
404 not_found Postcode not found
429 rate_limited Demo limit exceeded
502 upstream_error Forecast provider unavailable
500 internal Unexpected server error

Demo

GET endpoints work without an API key on the public demo tier (60 calls per hour per IP). POST /v1/vibe/classify needs a key.