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.
Try it
Switch between the overview, temperature, precipitation, and wind views, and use the timeline to step through the forecast. The map is limited to the area the data covers.
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_KEYReplace {hours} with a number from 0 to 120. 0 is the latest model data, 3 is 3 hours after that, and so on. The forecast horizon shifts with each model run, so the last step or two near 120 may not be available yet.
Example - current weather:
https://weather.maptoolkit.net/vector/icon.0.json?api_key=YOUR_API_KEYPolygon layers in the vector source:
| Layer | Description |
|---|---|
temperature | Temperature in degrees Celsius |
precipitation | Precipitation in mm per hour |
wind | Average wind speed in meters per second |
weather | Weather condition code |
Point layers in the vector source:
| Layer | Description |
|---|---|
weather_label | Grid of weather data points with full forecast values |
place_label | Place 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_KEYReplace {hours} with a number from 0 to 120. 0 is the latest model data, 3 is 3 hours after that, and so on. The forecast horizon shifts with each model run, so the last step or two near 120 may not be available yet.
Weather Forecast
Get the weather forecast for a specific coordinate.
Endpoint:
GET https://weather.maptoolkit.net/forecast/icon/Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
lat | number | Yes | Latitude |
lng | number | Yes | Longitude |
forecast | number | No | Number 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_KEYExample - 24-hour forecast:
GET https://weather.maptoolkit.net/forecast/icon/?lat=48.21&lng=16.37&forecast=24&api_key=YOUR_API_KEYResponse:
[
{
"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:
| Field | Unit | Description |
|---|---|---|
temperature | °C | Temperature in degrees Celsius |
precipitation | mm/h | Precipitation in mm per hour |
wind_speed | m/s | Average wind speed in meters per second |
wind_gusts | m/s | Wind gust speed in meters per second |
wind_direction | ° | Wind direction in degrees |
weather_code | Weather condition code (see table below) | |
date | Forecast time as a UTC date string |
Weather Codes
| Code | Condition |
|---|---|
0 | Clear sky |
1 | Mainly clear |
2 | Partly cloudy |
3 | Cloudy / overcast |
45 | Fog |
48 | Fog with frost |
51 | Light drizzle |
53 | Moderate drizzle |
55 | Heavy drizzle |
61 | Light rain |
63 | Moderate rain |
65 | Heavy rain |
71 | Light snow |
73 | Moderate snow |
75 | Heavy snow |
80 | Light rain showers |
81 | Moderate or heavy rain showers |
82 | Violent rain showers |
85 | Light snow showers |
86 | Moderate or heavy snow showers |
95 | Thunderstorm |
96 | Thunderstorm with hail |