Skip to content

River flood outlook (GloFAS)

$0.005 per callUSDC via x402GET /api/flood-outlook

River flood forecast, 1-30 days: GloFAS discharge at the main river near a point, rated against its own 2 to 50-year return levels...

Category: Live public dataTags: weather flood flood-forecast river discharge glofas return-period climate-risk

Try in playground →

Details

River flood forecast, 1-30 days: GloFAS discharge at the main river near a point, rated against its own 2 to 50-year return levels, with the peak's return period and an outlook word. Not an official warning. ?place=Cologne. Weather data by Open-Meteo.com (CC BY 4.0). Contains modified Copernicus Emergency Management Service information (GloFAS). Neither the European Commission nor ECMWF is responsible for any use that may be made of the Copernicus information or data it contains.

Parameters

NameTypeRequiredDescription
latnumbernoLatitude, -90 to 90 (with lon; wins over place) The example sends 50.94.
lonnumbernoLongitude, -180 to 180 (with lat) The example sends 6.96.
placestringnoA city, town or region name instead of lat/lon, for example "Paris" or "Austin, TX" (not a street address); the answer echoes the place it resolved to Up to 100 characters.
daysnumbernoForecast days, 1-30 (default 30) The example sends 30.
snapbooleannoTake the largest river cell within about 5 km of the point (default true); false reads the point's own cell

Example request

curl -i "https://agent402.tools/api/flood-outlook?lat=50.94&lon=6.96&days=30"

Watch a call get paid

RequestGET /api/flood-outlook
402$0.005 USDC
SignPAYMENT-SIGNATURE
Settleon 14 chains
Answer200 OK
ReceiptAgent402-ReceiptEd25519

Example response

{
  "lat": 50.94,
  "lon": 6.96,
  "days": 30,
  "river": {
    "cell": {
      "lat": 50.975,
      "lon": 6.925
    },
    "distanceKm": 4.6,
    "snapped": true,
    "dischargeNow": 1184.8,
    "unit": "m³/s"
  },
  "returnLevels": {
    "2": 6006,
    "5": 7683,
    "10": 8792,
    "20": 9857,
    "50": 11235,
    "years": 25,
    "firstYear": 1997,
    "lastYear": 2021
  },
  "peak": {
    "date": "2026-12-29",
    "median": 1357.3,
    "max": 3889.5,
    "returnPeriodYears": 1,
    "returnPeriodYearsHighestMember": 1.1
  },
  "outlook": "normal",
  "daily": [
    {
      "date": "2026-12-05",
      "median": 971.8,
      "p25": 967.3,
      "p75": 976.2,
      "min": 960.6,
      "max": 992.1,
      "returnPeriodYears": 1
    }
  ],
  "method": "Return levels: a Gumbel fit (method of moments) to the cell's annual maximum daily discharge in the GloFAS reanalysis (1984-2022, years with at least 300 days). Level: severe when the forecast median reaches the 20-year level; high at the 5-year level, or the highest member at the 20-year level; elevated at the 2-year level, or the highest member at the 5-year level; otherwise normal.",
  "caveat": "GloFAS model output on a 5 km grid, not an official flood warning: the cell may not be the river you mean, and local defenses and small streams are not modeled. Follow your national hydrological service for warnings.",
  "source": "computed from Open-Meteo flood data (GloFAS), flood-api.open-meteo.com (CC BY 4.0)",
  "credit": "Contains modified Copernicus Emergency Management Service information (GloFAS). Neither the European Commission nor ECMWF is responsible for any use that may be made of the Copernicus information or data it contains.",
  "attributionText": "Weather data by Open-Meteo.com (CC BY 4.0).",
  "sourceUrl": "https://open-meteo.com/",
  "licenseUrl": "https://creativecommons.org/licenses/by/4.0/"
}
FieldTypeAlways presentIn the example
latnumberyes50.94
lonnumberyes6.96
daysnumberyes30
riverobjectyes5 fields: cell, distanceKm, snapped, dischargeNow, unit
returnLevelsobjectyes8 fields: 2, 5, 10, 20, 50, years and 2 more
peakobjectyes5 fields: date, median, max, returnPeriodYears and 1 more
outlookstringyesnormal
dailyarray of objectsyes1 item in the example
methodstringyesReturn levels: a Gumbel fit (method of moments) to the cell's annual maximum ...
caveatstringyesGloFAS model output on a 5 km grid, not an official flood warning: the cell m...
sourcestringyescomputed from Open-Meteo flood data (GloFAS), flood-api.open-meteo.com (CC BY...
creditstringyesContains modified Copernicus Emergency Management Service information (GloFAS...
attributionTextstringyesWeather data by Open-Meteo.com (CC BY 4.0).
sourceUrlstringyeshttps://open-meteo.com/
licenseUrlstringyeshttps://creativecommons.org/licenses/by/4.0/

From an MCP client

catalog.call {
  "slug": "flood-outlook",
  "params": {
    "lat": 50.94,
    "lon": 6.96,
    "days": 30
  }
}

Hosted connector (https://agent402.tools/mcp): paid in the call. Stdio package (npx -y agent402-mcp@0.19.2): pays from a wallet or AGENT402_CREDITS_KEY.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.005" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/flood-outlook?lat=50.94&lon=6.96&days=30");

Get a wallet or run npx -y agent402-mcp@0.19.2 wallet new.

The quote (Python)

import base64, json, urllib.error, urllib.request

req = urllib.request.Request("https://agent402.tools/api/flood-outlook?lat=50.94&lon=6.96&days=30", method="GET", headers={})
try:
    urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
    quote = json.loads(base64.b64decode(e.headers["PAYMENT-REQUIRED"]))
    print(e.code, [(a["network"], a["amount"]) for a in quote["accepts"]])  # the price, per chain, in base units

Guides that use this tool

Related tools