---
title: "GloFAS river discharge forecast (deterministic)"
method: GET
path: "/api/v1/weather/flood"
tags: ["Environment"]
---

# GloFAS river discharge forecast (deterministic)

`GET /api/v1/weather/flood`

Daily river discharge forecast up to 30 days from GloFAS v4 (Global Flood Awareness System, Copernicus / ECMWF) served via Open-Meteo. Returns m3/s per day at the grid cell nearest to the supplied coordinates. Optional percentile bands and retrospective `past_days` lookback to 92 days. Data by Open-Meteo.com, CC BY 4.0.

## Query parameters

- `latitude` number, nullable — Latitude in decimal degrees (-90 to 90). Provide latitude+longitude OR river.
- `longitude` number, nullable — Longitude in decimal degrees (-180 to 180). Provide latitude+longitude OR river.
- `river` string, nullable — River name as an alternative to latitude+longitude. Curated rivers resolve to a validated GloFAS-mainstem cell; others fall back to the geocoder.
- `forecast_days` integer — Forecast horizon in days (1-30 for deterministic).
- `past_days` integer — Historical lookback in days (0-92).
- `daily` string — Comma-separated list of daily variables. Allowed: river_discharge, river_discharge_mean, river_discharge_median, river_discharge_max, river_discharge_min, river_discharge_p25, river_discharge_p75.
- `cell_selection` string, nullable — Grid-cell selection strategy: nearest (default), land, or sea.

## Response `200`

Daily deterministic river discharge with optional percentile bands.

- EnvelopeFloodDeterministicData
  - `data` FloodDeterministicData, required — GloFAS v4 deterministic (and optional percentile-band) daily river discharge.
    - `latitude` number, required — Snapped grid-cell latitude returned by Open-Meteo.
    - `longitude` number, required — Snapped grid-cell longitude returned by Open-Meteo.
    - `elevation_m` number, nullable — Elevation of the grid cell above sea level (m).
    - `timezone` string, nullable — Timezone of the `date` field (always UTC for Sugra).
    - `units` object, required — Unit mapping for every discharge variable, typically `m3/s`.
    - `mode` string, required — Always `deterministic` for this endpoint.
    - `forecast_days` integer, required — Number of forecast days in the response (1-30).
    - `past_days` integer, required — Number of past days included (0-92).
    - `data` FloodDischargeRow[], required — Row-oriented list of daily discharge observations.
      - `date` string, required — Observation date in ISO 8601 UTC (YYYY-MM-DDTHH:MM:SSZ).
      - `river_discharge` number, nullable — Deterministic best-guess daily river discharge (m3/s).
      - `river_discharge_mean` number, nullable — Ensemble mean discharge across 50 members (m3/s).
      - `river_discharge_median` number, nullable — Ensemble median (p50) discharge (m3/s).
      - `river_discharge_max` number, nullable — Ensemble maximum discharge, p100 worst-case flood (m3/s).
      - `river_discharge_min` number, nullable — Ensemble minimum discharge, p0 worst-case drought (m3/s).
      - `river_discharge_p25` number, nullable — 25th percentile lower confidence bound (m3/s).
      - `river_discharge_p75` number, nullable — 75th percentile upper confidence bound (m3/s).
  - `meta` SugraMeta, required — Metadata attached to every /api/v1/* response envelope.
    - `endpoint` string, required — Requested endpoint path.
    - `data_time` string, required — ISO 8601 UTC timestamp of the source data, not of the request.
    - `response_time` string, required — ISO 8601 UTC timestamp when this response was produced.
    - `provider` string, required — API name and version.
    - `source` string, nullable — Identifier of the primary upstream source used for this response.
    - `attribution` string, nullable — Human-readable attribution mandated by an upstream source (e.g. a securities regulator or self-regulatory organization). Present only on responses whose source requires the owner and source to be clearly identified. Do not remove or alter it when using the response.
    - `fallback_used` boolean, nullable — True when the primary source failed and a fallback produced the data.
    - `fallback_chain` string[], nullable — Ordered list of sources attempted, in the order they were tried.
    - `cached` boolean, nullable — True when this response was served from the internal cache.
    - `stale` boolean, nullable — True when the cached response was returned after the upstream rate-limited or errored. Clients can use this to detect degraded data.

## Other responses

- `401` — Missing or invalid `x-api-key` header. JSON body with a stable `code` distinguishing `missing_api_key` (no header sent) from `invalid_api_key` (header sent, key not accepted); any other 401 source carries the generic `unauthorized` with its detail as `reason`. Plus `hint`. `plan` is always null on 401 - an unauthenticated request has no plan; quota exhaustion is 429, not 401.
- `422` — Validation Error
- `429` — Daily rate limit exceeded. Check `X-RateLimit-Reset` for the next window.
- `503` — Upstream source is temporarily unavailable. Retry after a short delay.

---

[API](https://skmtc.net/sugra/apis/sugra-api.md) · [All operations](https://skmtc.net/sugra/apis/sugra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sugra/sugra-api/versions/d3e3d9c28132/schema)
