Skip to content
Weather API

Weather API

The Weather API provides weather forecasts based on the ICON model from the German Weather Service (DWD). It covers Germany and neighboring countries with high accuracy (ICON-D2), and the wider European area (ICON-EU). Data is updated every 3 hours and forecasts extend up to 5 days.

You can use it as a vector map source or query the forecast for a specific coordinate.

Base URL

https://weather.maptoolkit.net/

Authentication

Add your API key as ?api_key=YOUR_API_KEY to every request. See Authentication for details.

Weather Vector Tiles

Add weather data as a layer to your MapLibre GL map. The layer source URL follows this format:

https://weather.maptoolkit.net/vector/icon.{hours}.json?api_key=YOUR_API_KEY

Replace {hours} with a number from 0 to 120. 0 is the current time, 3 is 3 hours from now, and so on.

Example — current weather:

https://weather.maptoolkit.net/vector/icon.0.json?api_key=YOUR_API_KEY

Polygon layers in the vector source:

LayerDescription
temperatureTemperature in degrees Celsius
precipitationPrecipitation in mm per hour
windAverage wind speed in meters per second
weatherWeather condition code

Point layers in the vector source:

LayerDescription
weather_labelGrid of weather data points with full forecast values
place_labelPlace names enriched with current weather data

Weather Raster Tiles

Add weather data as a layer to your Leaflet map. The layer source URL follows this format:

https://weather.maptoolkit.net/raster/icon.{hours}.json?api_key=YOUR_API_KEY

Replace {hours} with a number from 0 to 120. 0 is the current time, 3 is 3 hours from now, and so on.

Weather Forecast

Get the weather forecast for a specific coordinate.

Endpoint:

GET https://weather.maptoolkit.net/forecast/icon/

Parameters:

ParameterTypeRequiredDescription
latnumberYesLatitude
lngnumberYesLongitude
forecastnumberNoNumber of hours to forecast. If omitted, only the current weather is returned.

Example — current weather at a location:

GET https://weather.maptoolkit.net/forecast/icon/?lat=48.21&lng=16.37&api_key=YOUR_API_KEY

Example — 24-hour forecast:

GET https://weather.maptoolkit.net/forecast/icon/?lat=48.21&lng=16.37&forecast=24&api_key=YOUR_API_KEY

Response:

[
  {
    "temperature": 24,
    "precipitation": 0,
    "wind_speed": 4,
    "wind_gusts": 9,
    "wind_direction": 78.75,
    "weather_code": 2,
    "date": "2027-06-14 12:00:00 UTC"
  }
]

Response fields:

FieldUnitDescription
temperature°CTemperature in degrees Celsius
precipitationmm/hPrecipitation in mm per hour
wind_speedm/sAverage wind speed in meters per second
wind_gustsm/sWind gust speed in meters per second
wind_direction°Wind direction in degrees
weather_codeWeather condition code (see table below)
dateForecast time as a UTC date string

Weather Codes

CodeCondition
0Clear sky
1Mainly clear
2Partly cloudy
3Cloudy / overcast
45Fog
48Fog with frost
51Light drizzle
53Moderate drizzle
55Heavy drizzle
61Light rain
63Moderate rain
65Heavy rain
71Light snow
73Moderate snow
75Heavy snow
80Light rain showers
81Moderate or heavy rain showers
82Violent rain showers
85Light snow showers
86Moderate or heavy snow showers
95Thunderstorm
96Thunderstorm with hail