Querying data

All forecast endpoints accept the same set of parameters and work with both GET (parameters in the query string) and POST (parameters in a JSON body). Use POST when you request many coordinates, to avoid URL-length limits.

Endpoints

Endpoint Purpose
GET/POST /weather/v2/query Convenience endpoint; auto-routes to operational or historical based on the requested period
GET/POST /weather/v2/point/operational Latest forecast for one or more points
GET/POST /weather/v2/point/historical Historical forecasts for one or more points (period required)
GET/POST /weather/v2/area/operational Latest forecast over a grid
GET/POST /weather/v2/area/historical Historical forecasts over a grid (period required)
GET /weather/v2/meta Model metadata (latest reference time, availability)
GET /weather/v2/download/{token} Download a generated NetCDF file

All paths are relative to https://api.rebase.energy.

Parameters

Parameter Required Default Description
model yes Model identifier, or several joined with + for a multi-model query
latitude yes A single latitude or a comma-separated list (points), or the grid latitude axis
longitude yes A single longitude or a comma-separated list
variables yes Comma-separated variable names; use Variable:height for a level
start-date for historical Start of the period (YYYY-MM-DD or YYYY-MM-DD HH:MM), in timezone
end-date for historical End of the period; may be in the future for operational forecasts
timezone no UTC Timezone for input dates and returned timestamps
reference-time-freq no 6H Frequency of forecast runs to include; clamped up to the model's native run frequency
valid-time-freq no Output time resolution within a forecast (e.g. 1H); values are interpolated to it
forecast-horizon no latest latest, full, or a list of lead-time hours (see below)
interpolate no false true = spatially interpolate to the exact coordinates; false = nearest grid point
output-format no json json or netcdf
output-schema no list For JSON: list (pandas-style) or xarray
type no points points (paired lat/lon) or grid (lat × lon mesh)
wait no false For NetCDF, block until the file is fully generated before responding

The point/* and area/* endpoints fix type to points and grid respectively; on the generic /query endpoint you set type yourself.

GET vs POST

import requests
headers = {"Authorization": "your_api_key"}
url = "https://api.rebase.energy/weather/v2/point/historical"

# GET — lists are comma-separated strings
resp = requests.get(url, headers=headers, params={
    "model": "DWD_ICON-EU",
    "latitude": "60.1, 59.3",
    "longitude": "16.5, 18.1",
    "variables": "Temperature, WindSpeed",
    "start-date": "2023-08-01",
    "end-date": "2023-08-03",
})

# POST — lists can be JSON arrays; same (hyphenated) parameter names
resp = requests.post(url, headers=headers, json={
    "model": "DWD_ICON-EU",
    "latitude": [60.1, 59.3],
    "longitude": [16.5, 18.1],
    "variables": ["Temperature", "WindSpeed"],
    "start-date": "2023-08-01",
    "end-date": "2023-08-03",
})

Points vs grid

  • Points (type=points): latitude and longitude are paired element-by-element, so the lists must be the same length. Two values each → two points.
  • Grid (type=grid): latitude and longitude define the axes of a mesh; every latitude is combined with every longitude. Grids are best retrieved with output-schema=xarray (or output-format=netcdf). The area/* endpoints use grid mode.

Forecast horizon

forecast-horizon controls which lead times you get back:

  • latest (default) — a single, continuous "best available" time series built from the most recent runs (each valid time taken from the latest run that covers it). Ideal for "what's the current forecast for the coming days". Served by the operational path.
  • full — the entire forecast horizon of each run in the requested period, keyed by both reference time (run) and valid time.
  • a list of lead-time hours — e.g. [0, 1, 2, 6, 12, 24] returns only those lead times from each run. On GET, pass it as a string: forecast-horizon=[0, 6, 12, 24].

Reference time vs valid time

  • Reference time (ref_datetime) is when a forecast run was initialised. reference-time-freq selects how many runs to include (e.g. 6H = every 6 hours), and is automatically clamped up to the model's own run frequency.
  • Valid time (valid_datetime) is the time a value applies to. valid-time-freq resamples/interpolates the output to a target step (e.g. 1H).

Height levels

Request a specific level with the Variable:height notation, e.g. WindSpeed:100 (100 m wind speed) or a native level like Temperature_Height:80.0. The harmonized :10 / :100 levels are documented in Post-processed variables; native level coordinates per model are in Models.

Multi-model queries

Combine models by joining identifiers with +, e.g. model=DWD_ICON-EU+NCEP_GFS. The response is a single continuous series that fills each valid time from the first model that provides it. Multi-model queries are restricted to:

  • post-processed (harmonized) variables only,
  • forecast-horizon=latest,
  • output-format=json, output-schema=list, type=points.

Interpolation

By default (interpolate=false) values come from the nearest model grid point. Set interpolate=true to spatially interpolate to your exact coordinates.