Openmeteo Get Flood
openmeteo_get_floodGloFAS (Global Flood Awareness System) river discharge forecast and historical reanalysis. Returns daily ensemble river discharge (m³/s) for the river nearest to the given coordinates — no river ID needed, the API snaps to the nearest stream. Forecast horizon up to 210 days ahead; reanalysis history back to 1984-01-01. One mode per call: forecast_days for the future outlook, or start_date and end_date together for reanalysis history. The two modes are mutually exclusive, and a date range needs both ends — a lone start_date or end_date is rejected. Available daily variables: "river_discharge" (ensemble mean), "river_discharge_mean", "river_discharge_min", "river_discharge_max", "river_discharge_median", "river_discharge_p25" (25th percentile), "river_discharge_p75" (75th percentile). Returns null for coordinates far from any river or in areas without GloFAS coverage. A wide reanalysis range produces thousands of daily records and spills to DataCanvas for SQL querying when canvas is enabled, returning a bounded preview with truncated: true when it is not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | No | End date for historical reanalysis (YYYY-MM-DD, inclusive). Must be on or after start_date. Requires start_date — the pair must be sent together, and neither combines with forecast_days. | |
| latitude | Yes | Latitude in decimal degrees. The API snaps to the nearest river — no river ID required. Use openmeteo_search_locations to resolve a place name. | |
| timezone | No | IANA timezone or "auto". Default "auto". | auto |
| canvas_id | No | DataCanvas token for wide reanalysis queries. When a result is too large to return inline — driven by total payload size, so a multi-variable pull can spill at any row count — it spills to this canvas for SQL querying. Omit to create a fresh canvas. | |
| longitude | Yes | Longitude in decimal degrees. | |
| start_date | No | Start date for historical reanalysis (YYYY-MM-DD, e.g., "2023-01-01"). GloFAS reanalysis covers from 1984-01-01. Requires end_date — the pair must be sent together, and neither combines with forecast_days. | |
| forecast_days | No | Number of forecast days ahead (1–210). Mutually exclusive with start_date/end_date — omit it entirely when pulling a historical range. | |
| daily_variables | No | Daily discharge variables to fetch (e.g., ["river_discharge", "river_discharge_p25", "river_discharge_p75", "river_discharge_min", "river_discharge_max"]). Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| daily | No | Per-day records with "time" (YYYY-MM-DD) + one key per requested variable containing discharge in m³/s, or null for coordinates outside GloFAS coverage. When truncated, contains only a preview — query canvas_id for the full dataset when one is present. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Warning that a requested variable came back with no data — names each column whose unit is "undefined", which is how the endpoint reports a name it parsed but does not serve. | |
| latitude | No | Snapped latitude (nearest river grid point) | |
| timezone | No | Resolved IANA timezone | |
| canvas_id | No | DataCanvas token for the staged full dataset. Present only when truncated is true AND DataCanvas is enabled (CANVAS_PROVIDER_TYPE=duckdb) — absent otherwise, in which case the preview is all this response carries. Query with SQL using this token. | |
| longitude | No | Snapped longitude | |
| truncated | No | True when the response was too large to return inline, so daily carries a bounded preview rather than the full set. With DataCanvas enabled the complete data is staged at canvas_id. With it disabled there is no canvas_id, and the omitted rows are reached only by narrowing the request. | |
| table_name | No | DuckDB table name for the staged data — pass to openmeteo_dataframe_query. Present only alongside canvas_id. | |
| daily_units | No | Variable → unit string for daily data (e.g., {"river_discharge": "m³/s"}). | |
| record_count | No | Total number of daily discharge records — the full staged count when truncated is true, not the length of the daily preview. |