# Flood & River Discharge Scraper — History & Forecast (`hipersoft/flood-scraper`) Actor

Get daily river discharge (flood) data for any river location: mean, max and min flow as history back to 1984 and up to 210-day forecast. Look up by place name or coordinates and export as JSON, CSV or Excel for flood risk, insurance, agriculture and research.

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

## Pricing

from $0.0001 / row scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Flood & River Discharge Scraper — History & Forecast

Track **river flow and flood risk** anywhere with the **Flood & River Discharge Scraper**. Enter place names or coordinates and export **daily river discharge — mean, max and min flow — as history back to 1984 and up to a 210-day forecast** — one clean row per day as **JSON, CSV or Excel**.

Built for **flood-risk and early-warning systems, insurance and reinsurance, agriculture and water management, and hydrological research**, it turns global river-model output into a structured dataset you can drop into any product or workflow.

### What it does

- 🌊 **River discharge** — daily flow in m³/s for any river location worldwide.
- 📈 **Stats & ensemble** — mean, max, min, median and percentile discharge.
- 🕰️ **History + forecast** — reanalysis back to 1984 and up to 210 days ahead.
- 📍 **Name or coordinates** — type "Dhaka" or pass exact coordinates; batch many at once.
- 🧱 **Tidy rows** — one row per day, each variable as its own column.
- 📤 **Export anywhere** — JSON, CSV or Excel, or straight into an alert, model or dashboard.

### Example output

```json
{
  "name": "Dhaka",
  "date": "2024-07-01",
  "river_discharge": 6.93,
  "river_discharge_mean": 6.77,
  "river_discharge_max": 7.77,
  "river_discharge_min": 6.10,
  "latitude": 23.7,
  "longitude": 90.4
}
```

### How to use it

1. Add **place names** near a river and/or exact **coordinates**.
2. Set a **date range** for history, or leave it empty and choose **forecast days**.
3. Run, and download the results as **JSON, CSV or Excel**.

### Input fields

| Field | Description |
|-------|-------------|
| **Places (by name)** | Place names near a river to resolve and look up. |
| **Locations (by coordinates)** | Exact `{name, latitude, longitude}` objects. |
| **Start / End date** | Historical range as YYYY-MM-DD (data from 1984). |
| **Forecast days** | Days of forecast when no date range is set (1–210). |
| **Daily variables** | Which discharge metrics to include (mean, max, min, percentiles). |
| **Max rows** | Cap on total rows across all locations (0 = no limit). |

### Output fields

`name`, `query`, `latitude`, `longitude`, `country`, `admin1`, `date`, and one column per requested discharge variable (`river_discharge`, `river_discharge_mean`, `river_discharge_max`, `river_discharge_min`, and percentiles).

### Popular use cases

- **Flood early warning** — watch forecast discharge rise toward flood thresholds.
- **Insurance & reinsurance** — quantify river-flow exposure over history and forecast.
- **Agriculture & water** — plan irrigation and reservoir operations around flow.
- **Research & modeling** — build long river-discharge time series for any basin.
- **Reporting** — compare a season's flow to historical norms.

### FAQ

**Do I need an account or key?**
No. Enter your locations and run.

**What is river discharge?**
The volume of water flowing past a river point per second (m³/s) — the core signal for flood risk.

**How far back and forward does it go?**
History from 1984, plus a forecast up to 210 days ahead.

**Why did a point return nothing?**
Discharge is modeled on rivers — place the point on or near a river channel.

**Can I export to Excel or Google Sheets?**
Yes — results download as JSON, CSV or Excel and integrate with alerts, models and dashboards.

***

Structured **river discharge and flood data** — daily mean, max and min flow, history and forecast — clean and export-ready for flood risk, insurance, agriculture and research.

# Actor input Schema

## `places` (type: `array`):

Place names near a river to look up, one per line (e.g. "Dhaka", "New Orleans", "Cologne"). Each name is resolved to coordinates automatically. Use this OR the Locations field below (you can combine both).

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

Exact coordinates as a list of objects: {"name": "Gauge 1", "latitude": 23.7, "longitude": 90.4}. The optional name is used as a label; latitude and longitude are required.

## `startDate` (type: `string`):

First day to fetch, as YYYY-MM-DD (e.g. 2024-07-01). Leave empty to use the forecast window instead. History is available from 1984.

## `endDate` (type: `string`):

Last day to fetch, as YYYY-MM-DD. Set together with Start date for a historical range.

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

When no date range is set, how many days of forecast to fetch from today (1–210).

## `daily` (type: `array`):

River-discharge variables to include, one per line. Options: river_discharge, river_discharge_mean, river_discharge_max, river_discharge_min, river_discharge_median, river_discharge_p25, river_discharge_p75. Leave as-is for a sensible default set.

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

Maximum rows to collect across all locations (0 = no limit).

## `proxyConfiguration` (type: `object`):

Optional proxy settings for the run. Not required — the data is fetched over plain HTTP.

## Actor input object example

```json
{
  "places": [
    "Dhaka",
    "New Orleans"
  ],
  "locations": [],
  "startDate": "",
  "endDate": "",
  "forecastDays": 30,
  "daily": [
    "river_discharge",
    "river_discharge_mean",
    "river_discharge_max",
    "river_discharge_min"
  ],
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

The results as dataset items.

# 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 = {
    "places": [
        "Dhaka",
        "New Orleans"
    ],
    "locations": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/flood-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 = {
    "places": [
        "Dhaka",
        "New Orleans",
    ],
    "locations": [],
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/flood-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 '{
  "places": [
    "Dhaka",
    "New Orleans"
  ],
  "locations": []
}' |
apify call hipersoft/flood-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hipersoft/flood-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/P3XWQmc8EgNS9uKcf/builds/YDB00qcanJZzFPfC3/openapi.json
