# River Levels & Navigation Status (DE / UK / US) (`grinning_naiad_h0w/river-levels-navigation`) Actor

Live river water levels and gauge readings from official agencies in Germany (PEGELONLINE incl. Rhine), the UK (Environment Agency) and the US (USGS) in one normalized English schema. Built for logistics, barge shipping, flood monitoring and AI agents. AI-agent ready via the Apify MCP server.

- **URL**: https://apify.com/grinning_naiad_h0w/river-levels-navigation.md
- **Developed by:** [JP Open Data](https://apify.com/grinning_naiad_h0w) (community)
- **Categories:** Travel, Business, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## River Gauge Water-Level API (Germany, UK, US)

Fetch the latest available river-gauge readings from official public sources in Germany, the United Kingdom, and the United States. Results use one dataset format, with a source and measurement time on each row.

### Who this is for

Developers and analysts building hydrology dashboards, river-condition maps, navigation workflows, or cross-country monitoring from official gauge feeds.

### Coverage and quick start

Germany uses WSV PEGELONLINE. Its rows can include river distance and navigation or flow states when the source provides them.

```json
{ "country": "DE", "water": "RHEIN", "limit": 5 }
```

The United Kingdom uses Environment Agency stage readings.

```json
{ "country": "UK", "limit": 5 }
```

The United States uses USGS gage-height readings. Supply one or more USGS site codes.

```json
{ "country": "US", "sites": "07010000", "limit": 5 }
```

### Input fields

| Field | Type | Default | Limit | Description |
|---|---|---:|---:|---|
| `country` | string | `DE` | `DE`, `UK`, or `US` | Select the source country. |
| `water` | string | `RHEIN` | Germany only | Optional river-name filter. Examples: `RHEIN`, `DONAU`, `ELBE`, `MOSEL`. |
| `sites` | string | none | US only | Comma-separated USGS site codes, such as `07010000,05331000`. Required for US results. |
| `limit` | integer | `50` | `1` to `300` | Maximum number of stations or feed entries to return. |

### Output

Each row includes `country`, `river`, `station`, `river_km`, `latitude`, `longitude`, `level`, `unit`, `nav_state`, `flow_state`, `measured_at`, and `source`. Some fields are available only for certain countries. The measurement unit follows the source: Germany is returned in centimeters, USGS in feet, and the UK source unit is used when supplied.

### Use with AI agents (MCP)

Output is flat JSON with stable English field names, so LLM agents can call this Actor as a tool through the [Apify MCP server](https://mcp.apify.com) (Claude, Cursor, VS Code, LangChain, OpenAI tool calling). Add the Actor `grinning_naiad_h0w/river-levels-navigation` to your MCP client and ask, for example: *"what is the current Rhine water level at Kaub and is it rising or falling"*.

### Sources and limits

- Germany: [WSV PEGELONLINE](https://www.pegelonline.wsv.de/webservices/rest-api/v2)
- United Kingdom: [Environment Agency flood-monitoring API](https://environment.data.gov.uk/flood-monitoring)
- United States: [USGS National Water Information System](https://waterservices.usgs.gov/nwis/iv/)

No external source API key is required. The Actor returns the latest readings available from each feed, not forecasts, flood alerts, or a complete historical archive. US results require site codes. Units, optional fields, and available measurements follow each source; unavailable measurements can be null.

# Actor input Schema

## `country` (type: `string`):

DE (Germany), UK, or US.

## `water` (type: `string`):

DE river name filter, e.g. RHEIN, DONAU, ELBE, MOSEL.

## `sites` (type: `string`):

Comma-separated USGS site codes, e.g. 07010000,05331000.

## `limit` (type: `integer`):

Maximum number of stations to return.

## Actor input object example

```json
{
  "country": "DE",
  "water": "RHEIN",
  "limit": 50
}
```

# Actor output Schema

## `riverReadings` (type: `string`):

Latest available gauge readings from the selected country source

# 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 = {
    "country": "DE",
    "water": "RHEIN"
};

// Run the Actor and wait for it to finish
const run = await client.actor("grinning_naiad_h0w/river-levels-navigation").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 = {
    "country": "DE",
    "water": "RHEIN",
}

# Run the Actor and wait for it to finish
run = client.actor("grinning_naiad_h0w/river-levels-navigation").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 '{
  "country": "DE",
  "water": "RHEIN"
}' |
apify call grinning_naiad_h0w/river-levels-navigation --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,grinning_naiad_h0w/river-levels-navigation"
        }
    }
}
```

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/s4l9w6u6h6Ez2ZfZa/builds/qjtCXoaqNM028eK7e/openapi.json
