Skip to content

Weather now

What this does

Returns the current weather for a UK location: temperature, how it feels, conditions in plain English, wind, humidity, and whether it is raining. Pass a postcode and the API works out where you mean.

Who it is for

  • Dashboard widgets (“weather at the office”)
  • Slack or email automations with a one-line forecast
  • Retail and events teams checking conditions on the day
  • Anyone who wants JSON instead of opening a weather website

Try it

Default: Manchester.

https://fetch.li/v1/weather?postcode=M11AE

Other examples:

https://fetch.li/v1/weather?lat=52.4862&lon=-1.8904
https://fetch.li/v1/weather?postcode=BT11AA

HTTP example

GET /v1/weather?postcode=M11AE HTTP/1.1
Host: fetch.li
Accept: application/json

curl

curl -sS "https://fetch.li/v1/weather?postcode=M11AE"

JavaScript fetch

const response = await fetch(
  "https://fetch.li/v1/weather?postcode=M11AE"
);
const weather = await response.json();
console.log(weather.summary, weather.temperature_c);

Python requests

import requests

response = requests.get(
    "https://fetch.li/v1/weather",
    params={"postcode": "M11AE"},
)
response.raise_for_status()
weather = response.json()
print(weather["summary"], weather["temperature_c"])

Example JSON response

{
  "ok": true,
  "answer": "16°C (feels 15°C), light rain",
  "say": "16°C (feels 15°C), light rain. Rain in the area. Take a waterproof.",
  "summary": "Light rain",
  "temperature_c": 16.2,
  "feels_like_c": 15.1,
  "humidity_percent": 82,
  "wind_kph": 20,
  "wind_mph": 12.4,
  "wind_compass": "SW",
  "beaufort": 4,
  "precipitation_mm": 0.3,
  "raining": true,
  "docs": "/docs/weather/now.html"
}

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

Provide either postcode or both lat and lon.

Errors that can happen

HTTP error.code When
400 invalid_body Missing location
404 not_found Postcode not found or weather unavailable for coordinates
429 rate_limited Demo limit exceeded
502 upstream_error Weather provider temporarily 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.

Try it

GET https://fetch.li/v1/weather


    
    
    
  

Answer

Response

response