API Documentation

Base URL: https://api.freeweatherapi.org. Everything is HTTP GET, JSON out. No API key required for anonymous use.

On this page

Basics & rate limits

All endpoints accept location as either lat/lon coordinates, a city name, or a postal code with country. Anonymous requests are limited to 600 per minute per source IP. Register a free community token for 10,000 per minute and per-day usage stats:

# append &token=... to any request, or send a header
curl -H "X-Community-Token: ctf_91ab2f" \
  "https://api.freeweatherapi.org/v1/forecast?lat=52.09&lon=5.12&days=3"

Exceeding the limit returns 429 with a Retry-After header. Responses set Cache-Control: public, max-age=300 for current data and max-age=3600 for history — respect it, your users will thank you.

TIP: Batch several locations into one request with lat=52.09,48.85&lon=5.12,2.35 — up to 100 points per call.

Endpoints

EndpointDescriptionHistory depth
GET /v1/currentLatest observed conditions—
GET /v1/forecastHourly + daily forecast, up to 16 days—
GET /v1/historyHourly observations, 1980 → yesterday46 years
GET /v1/marineWave height, swell & sea temperature2009 →
GET /v1/airAir quality (PM10, PM2.5, ozone, NO₂)2016 →

GET /v1/current

GET /v1/current

Parameters

ParameterTypeRequiredDescription
lat, lonfloatyes*WGS84 coordinates (*or city / postal)
citystringnoCity name; resolved via our gazetteer
unitsstringnometric (default), imperial, scientific
formatstringnojson (default), csv, geojson
tokenstringnoCommunity token for higher limits

Response

{
  "latitude": 52.09,
  "longitude": 5.12,
  "resolved_as": "Utrecht, NL",
  "timezone": "Europe/Amsterdam",
  "units": "metric",
  "current": {
    "time": "2026-10-15T14:32",
    "temperature_2m": 14.1,
    "apparent_temperature": 11.3,
    "relative_humidity": 82,
    "precipitation": 0.4,
    "weather_code": 61,
    "cloud_cover": 92,
    "wind_speed_10m": 23.4,
    "wind_direction_10m": 243,
    "observed_at": "2026-10-15T14:15",
    "sources": ["KNMI_AWS", "METAR_EHEH"]
  }
}

GET /v1/forecast

GET /v1/forecast?lat=52.09&lon=5.12&days=3

Returns hourly values for the next days days (1–16, default 7) plus a daily summary block. Hourly fields include temperature, precipitation probability, wind and gusts, solar radiation and, new in v1.8, uv_index. The response below is abridged — full responses have 24 hourly blocks per day.

{
  "daily": [
    { "date": "2026-10-16",
      "temp_min": 8.4, "temp_max": 15.9,
      "precipitation_sum": 6.2,
      "precipitation_prob_max": 75,
      "weather_code": 80 },
    { "date": "2026-10-17", "temp_min": 7.6, "temp_max": 13.8,
      "precipitation_sum": 1.9,
      "precipitation_prob_max": 40,
      "weather_code": 3 }
  ],
  "hourly": [
    { "time": "2026-10-16T00:00", "temperature_2m": 9.8,
      "precipitation": 0.0, "wind_speed_10m": 15.2 }
    // … 71 more rows
  ]
}

GET /v1/history

GET /v1/history?lat=52.09&lon=5.12&start=2025-07-01&end=2025-07-31

Hourly historical observations from national archives, reanalysis models and station records, back to 1 January 1980 for most land areas. start and end accept YYYY-MM-DD. Maximum range per request is 366 days; use pagination (&page=2) for longer spans. Historical responses are immutable and cached aggressively.

Weather codes

Our weather_code values follow the WMO 4677 table, so the same code means the same thing everywhere:

CodeMeaningCodeMeaning
0Clear sky61Slight rain
1–3Partly cloudy65Heavy rain
45Fog71Slight snowfall
48Rime fog80Rain showers
51Light drizzle95Thunderstorm

Errors use standard HTTP codes: 400 for bad parameters, 404 for unknown locations, 429 for rate limits and 503 if upstream feeds are degraded (we still return partial data with a "degraded": true flag where possible).

Changelog

DateChange
2026-02-10v1.9 — uv_index added to all forecast hours; marine endpoints moved out of beta. Uptime 99.98% (Q4 2025).
2025-09-02v1.8 — batch location queries (up to 100 points per call); CSV output for history.
2025-03-18v1.7 — Amsterdam + Ashburn anycast endpoints; p50 latency down to 38 ms in the EU.
2024-11-25v1.6 — history extended from 2010 to 1980 for Europe; GeoJSON format.
2024-06-30v1.5 — community tokens introduced; anonymous rate limit formalised at 600 req/min.
2024-01-15v1.0 — public launch with current + forecast endpoints.

This is the short version — the full changelog includes point releases, deprecations and migration notes. Questions or found a data bug? Email hello@freeweatherapi.org or open an issue on our Git forge — station reports from the field are how most data bugs get fixed. Past incidents live on the status page.