Skip to content
API Reference

Weather API Reference

Try the API in your browser

Base URL

https://weather.maptoolkit.net

Endpoints

GET /forecast/{model}

Point forecast

Returns the weather forecast for a specific coordinate, starting from the current time.

ParameterInTypeRequiredDescription
modelpathstringYesWeather model identifier.
latquerynumberYesLatitude of the forecast location.
lngquerynumberYesLongitude of the forecast location.
forecastqueryintegerNoNumber of hours to forecast. Returns only the current weather when omitted. Default: 0.
StatusDescription
200Forecast returned successfully.
500

No weather data available or an error occurred. Possible messages:

Model errors:

  • unknown weathermodel — The {model} path parameter does not match a known model

Data errors:

  • no weatherdata found — No weather table exists for the requested time and model
  • no weather data — Tile could not be generated due to missing data

Parameter errors:

  • lng and lat HTTP parameters missing — The lat or lng query parameter is missing or not a valid number

GET /raster/{model}.{forecast}.json

Raster tile source descriptor

Returns a TileJSON descriptor for the weather raster tile source at the given forecast offset.

ParameterInTypeRequiredDescription
modelpathstringYesWeather model identifier.
forecastpathintegerYesForecast offset in hours from the current time. 0 is the current weather.
StatusDescription
200TileJSON descriptor returned successfully.
500

No weather data available or an error occurred. Possible messages:

Model errors:

  • unknown weathermodel — The {model} path parameter does not match a known model

Data errors:

  • no weatherdata found — No weather table exists for the requested time and model
  • no weather data — Tile could not be generated due to missing data

Parameter errors:

  • lng and lat HTTP parameters missing — The lat or lng query parameter is missing or not a valid number

GET /raster/{model}/{z}/{x}/{y}.{forecast}.png

Raster tile

Returns an RGB-encoded raster tile where each pixel encodes weather data in its RGBA channels. This is an internal encoding format used by the server; use the vector tiles or the forecast endpoint for human-readable data.

ParameterInTypeRequiredDescription
modelpathstringYesWeather model identifier.
forecastpathintegerYesForecast offset in hours from the current time. 0 is the current weather.
zpathintegerYesTile zoom level.
xpathintegerYesTile column index.
ypathintegerYesTile row index.
StatusDescription
200Raster tile returned successfully.
404

No weather data available or an error occurred. Possible messages:

Model errors:

  • unknown weathermodel — The {model} path parameter does not match a known model

Data errors:

  • no weatherdata found — No weather table exists for the requested time and model
  • no weather data — Tile could not be generated due to missing data

Parameter errors:

  • lng and lat HTTP parameters missing — The lat or lng query parameter is missing or not a valid number
500An unexpected server error occurred.

GET /vector/{model}.{forecast}.json

Vector tile source descriptor

Returns a TileJSON descriptor for the weather vector tile source at the given forecast offset.

ParameterInTypeRequiredDescription
modelpathstringYesWeather model identifier.
forecastpathintegerYesForecast offset in hours from the current time. 0 is the current weather.
StatusDescription
200TileJSON descriptor returned successfully.
500

No weather data available or an error occurred. Possible messages:

Model errors:

  • unknown weathermodel — The {model} path parameter does not match a known model

Data errors:

  • no weatherdata found — No weather table exists for the requested time and model
  • no weather data — Tile could not be generated due to missing data

Parameter errors:

  • lng and lat HTTP parameters missing — The lat or lng query parameter is missing or not a valid number

GET /vector/{model}/{z}/{x}/{y}.{forecast}.pbf

Vector tile

Returns a Mapbox Vector Tile (PBF) for the given tile coordinates and forecast offset.

The tile contains the following layers:

LayerFieldDescription
temperaturedegreeTemperature in °C
precipitationmmPrecipitation in mm/h
windmsWind speed in m/s
weathercodeWeather condition code
weather_labelmultipleGrid of weather data points with full forecast values
place_labelmultiplePlace names enriched with current weather data
ParameterInTypeRequiredDescription
modelpathstringYesWeather model identifier.
forecastpathintegerYesForecast offset in hours from the current time. 0 is the current weather.
zpathintegerYesTile zoom level.
xpathintegerYesTile column index.
ypathintegerYesTile row index.
StatusDescription
200Vector tile returned successfully.
404

No weather data available or an error occurred. Possible messages:

Model errors:

  • unknown weathermodel — The {model} path parameter does not match a known model

Data errors:

  • no weatherdata found — No weather table exists for the requested time and model
  • no weather data — Tile could not be generated due to missing data

Parameter errors:

  • lng and lat HTTP parameters missing — The lat or lng query parameter is missing or not a valid number
500An unexpected server error occurred.

Try it

The console below sends live requests against the endpoints above. You can browse it without an API key; Execute needs one, because every endpoint requires the api_key query parameter and returns 403 without it. Use Authorize to add your key. See First Steps if you do not have one yet.