{"openapi":"3.1.0","info":{"title":"Rebase Weather API","version":"2.0","description":"Query numerical weather prediction (NWP) and reanalysis models served by Rebase.\n\nAll endpoints accept both `GET` (parameters in the query string) and `POST`\n(parameters in a JSON body). `POST` is recommended when requesting many\ncoordinates, to avoid URL length limits.\n\n## Authentication\nEvery request must include your API key in the `Authorization` header (the raw\nkey — **not** a `Bearer` token):\n\n```\nAuthorization: your_api_key\n```\n\nAs a fallback for clients that strip the `Authorization` header on redirect, the\nkey may instead be passed as an `api_key` query parameter.\n\n## Variables\nVariables are either **post-processed (harmonized)** names that are consistent\nacross models (e.g. `Temperature`, `WindSpeed`, `WindDirection`), or\n**model-specific** native variable names. Height levels are selected with the\n`Variable:height` notation, e.g. `WindSpeed:100` or `Temperature_Height:80.0`.\n\nSee the *Post-processed variables* guide for how harmonized variables are derived.\n","contact":{"name":"Rebase Energy","url":"https://www.rebase.energy"}},"servers":[{"url":"https://api.rebase.energy"}],"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"tags":[{"name":"Forecasts","description":"Query forecast and reanalysis data for points or grids."},{"name":"Metadata","description":"Information about available models."},{"name":"Downloads","description":"Retrieve generated NetCDF files."}],"paths":{"/weather/v2/query":{"get":{"tags":["Forecasts"],"summary":"Query forecast data (auto-routed)","description":"General forecast query. Routes automatically to operational (latest) or historical handling depending on the requested period.\n","operationId":"queryGet","parameters":[{"$ref":"#/components/parameters/model"},{"$ref":"#/components/parameters/latitude"},{"$ref":"#/components/parameters/longitude"},{"$ref":"#/components/parameters/variables"},{"$ref":"#/components/parameters/start-date"},{"$ref":"#/components/parameters/end-date"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/reference-time-freq"},{"$ref":"#/components/parameters/valid-time-freq"},{"$ref":"#/components/parameters/forecast-horizon"},{"$ref":"#/components/parameters/interpolate"},{"$ref":"#/components/parameters/output-format"},{"$ref":"#/components/parameters/output-schema"},{"$ref":"#/components/parameters/type"},{"$ref":"#/components/parameters/wait"},{"$ref":"#/components/parameters/overwrite"}],"responses":{"200":{"$ref":"#/components/responses/ForecastResponse"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Forecasts"],"summary":"Query forecast data (auto-routed)","operationId":"queryPost","requestBody":{"$ref":"#/components/requestBodies/Query"},"responses":{"200":{"$ref":"#/components/responses/ForecastResponse"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/weather/v2/point/operational":{"get":{"tags":["Forecasts"],"summary":"Latest forecast for point(s)","description":"Returns the latest continuous forecast time series for one or more points.","operationId":"pointOperationalGet","parameters":[{"$ref":"#/components/parameters/model"},{"$ref":"#/components/parameters/latitude"},{"$ref":"#/components/parameters/longitude"},{"$ref":"#/components/parameters/variables"},{"$ref":"#/components/parameters/start-date"},{"$ref":"#/components/parameters/end-date"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/valid-time-freq"},{"$ref":"#/components/parameters/forecast-horizon"},{"$ref":"#/components/parameters/interpolate"},{"$ref":"#/components/parameters/output-format"},{"$ref":"#/components/parameters/output-schema"}],"responses":{"200":{"$ref":"#/components/responses/ForecastResponse"},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Forecasts"],"summary":"Latest forecast for point(s)","operationId":"pointOperationalPost","requestBody":{"$ref":"#/components/requestBodies/Query"},"responses":{"200":{"$ref":"#/components/responses/ForecastResponse"},"400":{"$ref":"#/components/responses/Error"}}}},"/weather/v2/point/historical":{"get":{"tags":["Forecasts"],"summary":"Historical forecast for point(s)","description":"Returns historical forecasts for one or more points over a requested period. `start-date` and `end-date` are required.\n","operationId":"pointHistoricalGet","parameters":[{"$ref":"#/components/parameters/model"},{"$ref":"#/components/parameters/latitude"},{"$ref":"#/components/parameters/longitude"},{"$ref":"#/components/parameters/variables"},{"$ref":"#/components/parameters/start-date-required"},{"$ref":"#/components/parameters/end-date-required"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/reference-time-freq"},{"$ref":"#/components/parameters/valid-time-freq"},{"$ref":"#/components/parameters/forecast-horizon"},{"$ref":"#/components/parameters/interpolate"},{"$ref":"#/components/parameters/output-format"},{"$ref":"#/components/parameters/output-schema"},{"$ref":"#/components/parameters/wait"},{"$ref":"#/components/parameters/overwrite"}],"responses":{"200":{"$ref":"#/components/responses/ForecastResponse"},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Forecasts"],"summary":"Historical forecast for point(s)","operationId":"pointHistoricalPost","requestBody":{"$ref":"#/components/requestBodies/Query"},"responses":{"200":{"$ref":"#/components/responses/ForecastResponse"},"400":{"$ref":"#/components/responses/Error"}}}},"/weather/v2/area/operational":{"get":{"tags":["Forecasts"],"summary":"Latest forecast on a grid","description":"Returns the latest forecast over a grid defined by latitude/longitude lists. Not available for the `ECMWF_HRES*` models.\n","operationId":"areaOperationalGet","parameters":[{"$ref":"#/components/parameters/model"},{"$ref":"#/components/parameters/latitude"},{"$ref":"#/components/parameters/longitude"},{"$ref":"#/components/parameters/variables"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/valid-time-freq"},{"$ref":"#/components/parameters/forecast-horizon"},{"$ref":"#/components/parameters/interpolate"},{"$ref":"#/components/parameters/output-format"},{"$ref":"#/components/parameters/output-schema"}],"responses":{"200":{"$ref":"#/components/responses/ForecastResponse"},"400":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Forecasts"],"summary":"Latest forecast on a grid","operationId":"areaOperationalPost","requestBody":{"$ref":"#/components/requestBodies/Query"},"responses":{"200":{"$ref":"#/components/responses/ForecastResponse"},"400":{"$ref":"#/components/responses/Error"}}}},"/weather/v2/area/historical":{"get":{"tags":["Forecasts"],"summary":"Historical forecast on a grid","description":"Returns historical forecasts over a grid. `start-date` and `end-date` are required. Not available for `ECMWF_HRES_OPERATIONAL` / `ECMWF_HRES_MIX`.\n","operationId":"areaHistoricalGet","parameters":[{"$ref":"#/components/parameters/model"},{"$ref":"#/components/parameters/latitude"},{"$ref":"#/components/parameters/longitude"},{"$ref":"#/components/parameters/variables"},{"$ref":"#/components/parameters/start-date-required"},{"$ref":"#/components/parameters/end-date-required"},{"$ref":"#/components/parameters/timezone"},{"$ref":"#/components/parameters/reference-time-freq"},{"$ref":"#/components/parameters/valid-time-freq"},{"$ref":"#/components/parameters/forecast-horizon"},{"$ref":"#/components/parameters/interpolate"},{"$ref":"#/components/parameters/output-format"},{"$ref":"#/components/parameters/output-schema"},{"$ref":"#/components/parameters/wait"},{"$ref":"#/components/parameters/overwrite"}],"responses":{"200":{"$ref":"#/components/responses/ForecastResponse"},"400":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Forecasts"],"summary":"Historical forecast on a grid","operationId":"areaHistoricalPost","requestBody":{"$ref":"#/components/requestBodies/Query"},"responses":{"200":{"$ref":"#/components/responses/ForecastResponse"},"400":{"$ref":"#/components/responses/Error"}}}},"/weather/v2/meta":{"get":{"tags":["Metadata"],"summary":"Model metadata","description":"Returns metadata for a model, including its latest reference time and availability window.","operationId":"meta","parameters":[{"name":"model","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ModelName"}}],"responses":{"200":{"description":"Model metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelMeta"},"example":{"name":"DWD_ICON-EU","latest_ref_time":"2026-06-30T06:00","freq":"3H","operational":true,"availability":{"from":"2022-01-01 00:00","to":null},"source_file":"meteorology/NWP/DWD/ICON-EU/2026/06/30/06/data.zarr"}}}},"400":{"$ref":"#/components/responses/Error"}}}},"/weather/v2/download/{token}":{"get":{"tags":["Downloads"],"summary":"Download a generated NetCDF file","description":"Downloads the NetCDF file referenced by a pre-signed token returned from a `output-format: netcdf` query. Tokens expire (default ~1 week).\n","operationId":"download","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"The pre-signed JWT token from the `file` URL of a NetCDF query response."}],"responses":{"200":{"description":"The NetCDF4 file stream.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Invalid or expired token."},"404":{"description":"Token valid, but the dataset file is not finished computing yet."},"503":{"description":"Token valid, but the dataset failed to compute."}}}}},"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"Authorization","description":"Raw API key (no `Bearer` prefix)."},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"api_key","description":"API key as a query parameter (fallback for clients that drop the Authorization header)."}},"parameters":{"model":{"name":"model","in":"query","required":true,"description":"Model identifier. A single model, or several joined with `+` (multi-model queries allow only post-processed variables and `forecast-horizon=latest`).","schema":{"$ref":"#/components/schemas/ModelName"}},"latitude":{"name":"latitude","in":"query","required":true,"description":"A single latitude or a comma-separated list (points), or the grid latitude axis (`type=grid`).","schema":{"oneOf":[{"type":"number"},{"type":"string"}]},"example":"60.1, 61.2, 59.33"},"longitude":{"name":"longitude","in":"query","required":true,"description":"A single longitude or a comma-separated list.","schema":{"oneOf":[{"type":"number"},{"type":"string"}]},"example":"16.5, 17.0, 18.1"},"variables":{"name":"variables","in":"query","required":true,"description":"Comma-separated variable names. Use `Variable:height` for a specific height level (e.g. `WindSpeed:100`).","schema":{"type":"string"},"example":"Temperature, WindSpeed, WindDirection"},"start-date":{"name":"start-date","in":"query","required":false,"description":"Start of the requested period (`YYYY-MM-DD` or `YYYY-MM-DD HH:MM`), interpreted in `timezone`.","schema":{"type":"string"},"example":"2023-08-01"},"end-date":{"name":"end-date","in":"query","required":false,"description":"End of the requested period. May be in the future for operational forecasts.","schema":{"type":"string"},"example":"2023-08-03"},"start-date-required":{"name":"start-date","in":"query","required":true,"description":"Start of the requested historical period (`YYYY-MM-DD` or `YYYY-MM-DD HH:MM`).","schema":{"type":"string"},"example":"2023-08-01"},"end-date-required":{"name":"end-date","in":"query","required":true,"description":"End of the requested historical period.","schema":{"type":"string"},"example":"2023-08-03"},"timezone":{"name":"timezone","in":"query","required":false,"description":"Timezone for request parameters and returned timestamps.","schema":{"type":"string","default":"UTC"}},"reference-time-freq":{"name":"reference-time-freq","in":"query","required":false,"description":"Frequency of forecast runs to include (e.g. `6H`, `12H`, `24H`). Clamped up to the model's native run frequency.","schema":{"type":"string","default":"6H"}},"valid-time-freq":{"name":"valid-time-freq","in":"query","required":false,"description":"Output time resolution within a forecast (e.g. `1H`). Values are interpolated to this frequency.","schema":{"type":"string"}},"forecast-horizon":{"name":"forecast-horizon","in":"query","required":false,"description":"`latest` (continuous latest-value time series), `full` (entire horizon of each run), or a custom list of lead-time hours, e.g. `[0, 1, 2, 6, 12]`.\n","schema":{"oneOf":[{"type":"string","enum":["latest","full"]},{"type":"array","items":{"type":"integer"}}],"default":"latest"}},"interpolate":{"name":"interpolate","in":"query","required":false,"description":"If true, spatially interpolate to the requested coordinates; otherwise return the nearest grid point.","schema":{"type":"boolean","default":false}},"output-format":{"name":"output-format","in":"query","required":false,"description":"Response container — inline `json` or a pre-signed URL to a `netcdf` file.","schema":{"type":"string","enum":["json","netcdf"],"default":"json"}},"output-schema":{"name":"output-schema","in":"query","required":false,"description":"JSON shape — `list` (pandas-style, array of per-point objects) or `xarray` (Dataset dict).","schema":{"type":"string","enum":["list","xarray"],"default":"list"}},"type":{"name":"type","in":"query","required":false,"description":"Query geometry — `points` (paired lat/lon) or `grid` (lat × lon mesh).","schema":{"type":"string","enum":["points","grid"],"default":"points"}},"wait":{"name":"wait","in":"query","required":false,"description":"For NetCDF output, block until the file is fully generated before returning.","schema":{"type":"boolean","default":false}},"overwrite":{"name":"overwrite","in":"query","required":false,"description":"Historical requests only: whether an answer computed earlier for the same request may be reused. `incompatible` (default) reuses it, and recomputes it once the model has published a newer run inside the requested period; `always` recomputes on every request; `never` is accepted and currently behaves like `always`. Leave the default unless your job must never receive an answer computed before its own request (e.g. it re-fetches the same period right as each run is published); then send `always`, at the cost of a full recomputation every time.\n","schema":{"type":"string","enum":["always","incompatible","never"],"default":"incompatible"}}},"requestBodies":{"Query":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"},"example":{"model":"DWD_ICON-EU","latitude":[60.1,61.2],"longitude":[16.5,17],"variables":"Temperature, WindSpeed","start-date":"2023-08-01","end-date":"2023-08-03","reference-time-freq":"6H","output-format":"json","output-schema":"list"}}}}},"responses":{"ForecastResponse":{"description":"Forecast data in the requested format.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PointListResponse"},{"$ref":"#/components/schemas/XarrayResponse"},{"$ref":"#/components/schemas/NetcdfResponse"}]},"examples":{"list":{"summary":"json / list (pandas)","value":[{"ref_datetime":["2023-08-01T00:00:00Z","2023-08-01T00:00:00Z"],"valid_datetime":["2023-08-01T00:00:00Z","2023-08-01T01:00:00Z"],"Temperature":[17.4,17.1],"WindSpeed":[5.2,5]}]},"netcdf":{"summary":"netcdf (pre-signed URL)","value":{"file":"https://api.rebase.energy/weather/v2/download/eyJ0eXAi...","create_time":"2026-06-30T08:21"}}}}}},"Error":{"description":"Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"ModelName":{"type":"string","description":"Identifier of a Rebase-served model.","enum":["DWD_ICON-EU","DWD_ICON-D2","NCEP_GFS","MetNo_MEPS","MetNo_HIRESMEPS","SMHI_MESAN","ECMWF_ERA5","ECMWF_ERA5-land","ECMWF_HRES","ECMWF_HRES_OPERATIONAL","ECMWF_IFS_OPER","ECMWF_HRES_MIX","MeteoFrance_ARPEGE-EU","MeteoFrance_ARPEGE-GL","MeteoFrance_AROME","MeteoFrance_AROME-HD","MetOffice_GlobalHiRes","KNMI_HARMONIE-NL","KNMI_HARMONIE-EU","Rebase_AI"]},"HarmonizedVariable":{"type":"string","description":"Post-processed variable name, consistent across models. See the Post-processed variables guide.","enum":["Temperature","Temperature:100","WindSpeed","WindSpeed:10","WindSpeed:100","WindDirection","WindDirection:10","WindDirection:100","CloudCover","RelativeHumidity","RelativeHumidity:100","SolarDownwardRadiation","PressureReducedMSL","TotalPrecipitation","WindGust","symbol"]},"QueryRequest":{"type":"object","required":["model","latitude","longitude","variables"],"properties":{"model":{"oneOf":[{"$ref":"#/components/schemas/ModelName"},{"type":"array","items":{"$ref":"#/components/schemas/ModelName"}}]},"latitude":{"oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}},{"type":"string"}]},"longitude":{"oneOf":[{"type":"number"},{"type":"array","items":{"type":"number"}},{"type":"string"}]},"variables":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"start-date":{"type":"string"},"end-date":{"type":"string"},"timezone":{"type":"string","default":"UTC"},"reference-time-freq":{"type":"string","default":"6H"},"valid-time-freq":{"type":"string"},"forecast-horizon":{"oneOf":[{"type":"string","enum":["latest","full"]},{"type":"array","items":{"type":"integer"}}],"default":"latest"},"interpolate":{"type":"boolean","default":false},"output-format":{"type":"string","enum":["json","netcdf"],"default":"json"},"output-schema":{"type":"string","enum":["list","xarray"],"default":"list"},"type":{"type":"string","enum":["points","grid"],"default":"points"},"wait":{"type":"boolean","default":false},"overwrite":{"type":"string","enum":["always","incompatible","never"],"default":"incompatible"}}},"PointListResponse":{"type":"array","description":"One object per queried point (a single object when one point is requested and `reduce_single_point_list` is set). Each object has `ref_datetime`, `valid_datetime`, and one array per requested variable. Load with `pandas.DataFrame(point)`.\n","items":{"type":"object","properties":{"ref_datetime":{"type":"array","items":{"type":"string"}},"valid_datetime":{"type":"array","items":{"type":"string"}}},"additionalProperties":{"type":"array","items":{"type":"number"}}}},"XarrayResponse":{"type":"object","description":"An xarray Dataset serialized via `Dataset.to_dict()`. Load with `xarray.Dataset.from_dict(response.json())`. Dimensions include `point`, `reference_time`, `valid_time`, and (where applicable) `height`/`latitude`/`longitude`.\n","properties":{"attrs":{"type":"object","additionalProperties":true},"dims":{"type":"object","additionalProperties":true},"coords":{"type":"object","additionalProperties":true},"data_vars":{"type":"object","additionalProperties":true}}},"NetcdfResponse":{"type":"object","description":"Returned when `output-format=netcdf`.","properties":{"file":{"type":"string","format":"uri","description":"Pre-signed download URL (expires, default ~1 week)."},"create_time":{"type":"string","description":"Time the file generation was initiated (`YYYY-MM-DDTHH:MM`)."}}},"ModelMeta":{"type":"object","properties":{"name":{"type":"string"},"latest_ref_time":{"type":["string","null"],"description":"Latest available reference time (YYYY-MM-DDTHH:MM), or null."},"freq":{"type":"string","description":"Native run frequency, e.g. 3H."},"operational":{"type":"boolean"},"availability":{"type":"object","properties":{"from":{"type":["string","null"]},"to":{"type":["string","null"]}}},"file":{"type":["string","null"]},"source_file":{"type":["string","null"]}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}