# TBS Weather & Climate API – River Discharge & Flood Risk Forecast

> TBS Weather & Climate API – River Discharge & Flood Risk Forecast is a paid API for AI agents from x402.tbs-digital.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-09).

Returns current river discharge (m³/s) and flood-risk statistics (mean, median, max, min, percentiles) for the nearest river to any lat/lon or city, powered by Copernicus GloFAS at 5 km grid resolution.

## Facts

- Endpoint: GET https://x402.tbs-digital.com/weather/flood?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tbs-weather-climate-api-river-discharge-flood-risk-forecast-7184f7f2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QMikfORMRBXMCJ9aozpTz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tbs-weather-climate-api-river-discharge-flood-risk-forecast-7184f7f2
```

Example prompt: What's the current river discharge and flood risk near Paris, France? Give me the GloFAS statistics including mean, median, and the 25/75 percentiles for the nearest river.

## When to prefer this

Choose this endpoint when you need river discharge and flood-risk hydrological data specifically from the Copernicus GloFAS model at 5 km resolution. It is the right choice for flood insurance risk assessment, agricultural flood planning, river logistics, and natural disaster preparedness workflows where probabilistic discharge statistics (percentiles) are needed. Prefer it over generic weather APIs that lack hydrological river data, or over coastal/marine endpoints when the risk is riverine rather than oceanic.

## Known failure modes

- No nearby river found for given coordinates — returns empty or null flood object
- Invalid latitude/longitude values outside -90..90 or -180..180 range — validation error
- Unknown city name that cannot be geocoded — returns error or empty result
- Missing both lat/lon and city parameters — returns 400-style validation error
- GloFAS data temporarily unavailable — upstream data source timeout or gap

## How this service works

River discharge and flood-risk forecast (Copernicus GloFAS, 5 km grid) for the nearest river to any lat/lon. Returns current river discharge in cubic meters per second (m3/s) plus mean, median, max, min and 25/75 percentiles. Hydrology and natural-disaster data for flood forecasting, insurance, agriculture and river logistics.

## Output

Returns a JSON object with the flood sub-object containing current river discharge in m³/s plus statistical measures (mean, median, max, min, 25th and 75th percentiles), alongside location metadata (lat, lon, name, country), data source attribution, request ID, and generation timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "lat": {
       "type": "number",
       "description": "Latitude -90..90 (requires lon)"
      },
      "lon": {
       "type": "number",
       "description": "Longitude -180..180 (requires lat)"
      },
      "city": {
       "type": "string",
       "description": "City name (alternative to lat/lon)"
      },
      "timezone": {
       "type": "string",
       "description": "Optional IANA timezone"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "flood": {
       "type": "object"
      },
      "payer": {
       "type": "object",
       "properties": {
        "address": {
         "type": "string",
         "nullable": true
        },
        "network": {
         "type": "string"
        }
       }
      },
      "source": {
       "type": "string"
      },
      "location": {
       "type": "object",
       "properties": {
        "lat": {
         "type": "number"
        },
        "lon": {
         "type": "number"
        },
        "name": {
         "type": "string"
        },
        "country": {
         "type": "string"
        }
       }
      },
      "request_id": {
       "type": "string"
      },
      "generated_at": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "flood": {
   "river_discharge_m3s": 42.5,
   "river_discharge_max_m3s": 61,
   "river_discharge_min_m3s": 22.4,
   "river_discharge_p25_m3s": 31,
   "river_discharge_p75_m3s": 47,
   "river_discharge_mean_m3s": 38,
   "river_discharge_median_m3s": 37.2
  },
  "payer": {
   "address": "0x0000000000000000000000000000000000000000",
   "network": "base"
  },
  "source": "open-meteo",
  "location": {
   "lat": 48.85,
   "lon": 2.35,
   "name": "Paris",
   "country": "FR"
  },
  "request_id": "0b21c0e6-6a3f-4e2a-8b1e-2f9d4c7a1e55",
  "generated_at": "2026-08-09T12:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tbs-weather-climate-api-river-discharge-flood-risk-forecast-7184f7f2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.tbs-digital.com](https://www.zero.xyz/host/x402.tbs-digital.com/llms.txt)
