# River Discharge & Flood Forecast Scraper – Open-Meteo API (`ninhothedev/flood-forecast-scraper`) Actor

$0.5/1K 🔥 Flood forecast scraper! River discharge forecasts up to 210 days with ensemble ranges. No key. JSON, CSV, Excel or API in seconds. Power flood risk, insurance & hydrology ⚡

- **URL**: https://apify.com/ninhothedev/flood-forecast-scraper.md
- **Developed by:** [ninhothedev](https://apify.com/ninhothedev) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## River Discharge & Flood Forecast Scraper

Get **daily river discharge forecasts** for any river coordinate on Earth — in m³/s, with the full ensemble spread (mean, median, min, max, p25, p75) so you can see how confident the model is. Up to **210 forecast days** ahead and **60 days of history**, with **no API key** and no account anywhere.

The data comes from the **Open-Meteo Flood API**, which serves the [GloFAS](https://global-flood.emergency.copernicus.eu/) (Global Flood Awareness System) hydrological model — the same modelling family that European flood agencies use for early warning.

***

### ⚠️ Put your coordinates ON a river

This is the single most important thing to know: **GloFAS is a river-routing model on a grid of river cells.** Coordinates in the middle of a field, a city block far from water, or out at sea will either return tiny/near-zero discharge or no useful values at all.

Pick coordinates that sit **on or very near the river channel** you care about — a bridge, a gauging station, a river bend. Zoom into a map, drop the pin on the blue line, copy the lat/lon. Values then land in the physically sensible range (a small creek is < 5 m³/s, the Danube at Budapest is ~1,400 m³/s, the Amazon is in the tens of thousands).

***

### What you get

One row **per location, per calendar day**:

| Field | Description |
|---|---|
| `location_name` | Your label, or `"lat,lon"` if you did not give one |
| `latitude`, `longitude` | Model grid-cell coordinates actually used |
| `date` | ISO date (`YYYY-MM-DD`) |
| `river_discharge_m3s` | Deterministic river discharge forecast, m³/s |
| `discharge_mean` | Ensemble mean |
| `discharge_median` | Ensemble median |
| `discharge_max` | Ensemble maximum — the flood-risk upper bound |
| `discharge_min` | Ensemble minimum — the drought-risk lower bound |
| `discharge_p25`, `discharge_p75` | 25th / 75th ensemble percentiles |
| `uncertainty_range` | `p75 − p25` — one-number forecast spread |
| `unit` | Discharge unit reported by the API (`m³/s`) |
| `source` | Always `open-meteo-flood` |
| `scraped_at` | UTC timestamp of the run |

Rows where every discharge value is null are dropped automatically, so you never pay for empty records.

***

### Input

```json
{
  "mode": "forecast",
  "locations": [
    "50.94,6.96,Cologne Rhine",
    "47.50,19.04,Budapest Danube",
    "-3.10,-60.02,Manaus Amazon"
  ],
  "forecastDays": 30,
  "pastDays": 7,
  "maxItems": 1000
}
```

| Input | Type | Default | Notes |
|---|---|---|---|
| `mode` | select | `forecast` | Daily river discharge per location |
| `locations` | array | 2 prefilled rivers | `"lat,lon"` or `"lat,lon,Label"` — **on/near a river** |
| `forecastDays` | integer | `30` | 1–210 days ahead |
| `pastDays` | integer | `0` | 0–60 days of history prepended |
| `maxItems` | integer | `1000` | Hard cap on pushed rows (1–10,000) |

***

### Example output

```json
{
  "location_name": "Budapest Danube",
  "latitude": 47.525,
  "longitude": 19.02501,
  "date": "2026-07-28",
  "river_discharge_m3s": 1434.49,
  "discharge_mean": 1441.02,
  "discharge_median": 1434.49,
  "discharge_max": 1602.31,
  "discharge_min": 1380.11,
  "discharge_p25": 1410.55,
  "discharge_p75": 1478.20,
  "uncertainty_range": 67.65,
  "unit": "m³/s",
  "source": "open-meteo-flood",
  "scraped_at": "2026-07-28T13:45:19Z"
}
```

***

### Use cases

- **Flood risk monitoring** — watch `discharge_max` against a known bankfull threshold for each site and alert days before water arrives.
- **Insurance & reinsurance** — screen portfolios of insured locations against rising discharge forecasts; quantify exposure with `uncertainty_range`.
- **Hydrology & research** — pull consistent multi-river time series for model comparison, low-flow/drought studies, or reservoir inflow work.
- **Logistics & inland shipping** — plan barge loading on the Rhine, Danube or Mississippi, where low water means reduced draft and high water means closed locks.
- Adjacent: hydropower scheduling, construction site planning, agriculture and irrigation, water utilities.

***

### Pricing

Pay-per-event style economics: roughly **$0.50 per 1,000 rows**. A 30-day forecast for 10 rivers is 300 rows — about **$0.15 per refresh**. Schedule it daily and a full river-monitoring feed costs a few dollars a month.

***

### Tips

- Run with `pastDays: 7` to get context: is the river already rising before the forecast starts?
- A large `uncertainty_range` relative to `river_discharge_m3s` means the ensemble disagrees — treat that forecast as low confidence.
- `forecastDays` above ~30 switches into seasonal-ensemble territory: useful for trend, not for exact timing.
- Batch many rivers in one run — the actor fetches up to 50 locations concurrently.

***

### Related actors

- [USGS Water Data Scraper](https://apify.com/ninhothedev/usgs-water-scraper) — observed US streamflow and gauge heights
- [NOAA Weather Alerts Scraper](https://apify.com/ninhothedev/noaa-weather-alerts-scraper) — live US flood and severe-weather warnings
- [MET Norway Weather Scraper](https://apify.com/ninhothedev/metno-weather-scraper) — global precipitation forecasts (the driver of discharge)
- [Earthquake Scraper](https://apify.com/ninhothedev/earthquake-scraper) — global seismic events

***

### Notes & limits

- Data source: Open-Meteo Flood API (GloFAS reforecast + forecast). Free for non-commercial and low-volume use; check Open-Meteo's terms for heavy commercial usage.
- Discharge is **modelled**, not measured. For observed gauge readings use the USGS actor above (US only).
- No login, no API key, no proxy required.

# Actor input Schema

## `mode` (type: `string`):

Scraping mode. 'forecast' takes your list of river coordinates and returns one row per location and per calendar day with river discharge in m3/s.

## `locations` (type: `array`):

One entry per location in the format 'lat,lon\[,Label]'. Coordinates should sit ON or very NEAR a river - the GloFAS model grid only carries discharge for river cells. The optional label is copied into location\_name.

## `forecastDays` (type: `integer`):

Number of forecast days to request per location, starting today. Values above 30 use the seasonal GloFAS ensemble.

## `pastDays` (type: `integer`):

Number of historical days to prepend to the forecast, useful for comparing modelled discharge against the recent trend. Set to 0 to disable.

## `maxItems` (type: `integer`):

Hard cap on the number of day rows pushed to the dataset across all locations. Use it to control run cost.

## Actor input object example

```json
{
  "mode": "forecast",
  "locations": [
    "50.94,6.96,Cologne Rhine",
    "47.50,19.04,Budapest Danube"
  ],
  "forecastDays": 30,
  "pastDays": 0,
  "maxItems": 1000
}
```

# Actor output Schema

## `records` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "locations": [
        "50.94,6.96,Cologne Rhine",
        "47.50,19.04,Budapest Danube"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/flood-forecast-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "locations": [
        "50.94,6.96,Cologne Rhine",
        "47.50,19.04,Budapest Danube",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/flood-forecast-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "locations": [
    "50.94,6.96,Cologne Rhine",
    "47.50,19.04,Budapest Danube"
  ]
}' |
apify call ninhothedev/flood-forecast-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ninhothedev/flood-forecast-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/anOEKOlm2MKdRPMz4/builds/jJ7abAf57IhA4T4F2/openapi.json
