# England Flood Monitoring - River Levels & Warnings (EA) (`j0401/uk-flood-monitoring`) Actor

Live England flood data from the Environment Agency (OGL): current warnings and alerts, 5,500 gauging stations and latest level/flow/rainfall readings. Search by station, river, town or radius.

- **URL**: https://apify.com/j0401/uk-flood-monitoring.md
- **Developed by:** [Wenhao Yang](https://apify.com/j0401) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.03 / 1,000 uk flood records

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

## England Flood Monitoring - River Levels & Warnings (EA)

Live flood data for England from the Environment Agency's real-time API:
**about 5,500 gauging stations**, **about 5,400 latest measurements** and the
current **flood warnings and alerts** (typically dozens active, plus recently
expired notices - use `minSeverity` to filter).
Water levels, river flows, rainfall, temperature and wind readings; most
measures refresh every 15 minutes.

### Low cost

**From $0.00005 per record, down to $0.00003 at Gold.** Pay only for the
records you receive.

### Five ways to use it

| mode | what it returns |
|---|---|
| `summary` (default) | station, measurement and active-warning counts by severity |
| `floods` | current flood warnings and alerts: severity, area, county, river, message and timestamps |
| `stations` | gauging stations: name, town, river, catchment, coordinates, measures, status |
| `readings` | the latest level / flow / rainfall / temperature / wind reading for every measuring point, joined to its station |
| `aggregate` | station counts by river, town, catchment, parameter or status |

### What you get per record

**Stations** - `stationId`, `label`, `town`, `riverName`, `catchmentName`,
`latitude`, `longitude`, `easting`, `northing`, `dateOpened`, `status`,
`measureCount`, `parameters`.

**Floods** - `floodId`, `description`, `severity`, `severityLevel`,
`eaAreaName`, `county`, `riverOrSea`, `isTidal`, `message`, `timeRaised`,
`timeMessageChanged`, `timeSeverityChanged`.

**Readings** - `stationId`, `measureId`, `parameter`, `qualifier`, `unit`,
`value`, `dateTime`, plus the station's name, town, river and coordinates.

### Search it

- **Town** - `town="Oxford"` (word match, so it does not match "Boxford").
- **River** - `river="Thames"` (67 gauging stations).
- **Catchment** - `catchment="Cotswolds"`.
- **Parameter** - `parameter="rainfall"` or `"level"`, `"flow"`.
- **Station** - `station="1029TH"` for its latest readings.
- **Radius** - `latitude=51.5`, `longitude=-0.1`, `radiusKm=10`.
- **Current warnings** - `mode="floods"`, `minSeverity=2` (severe warnings + warnings).

### Example inputs

**Stations within 10 km of central London**

```json
{ "latitude": 51.5, "longitude": -0.1, "radiusKm": 10, "maxResults": 50 }
```

**Every measuring point on the Thames**

```json
{ "mode": "readings", "river": "Thames", "maxResults": 100 }
```

**One station's latest values**

```json
{ "mode": "readings", "station": "1029TH", "maxResults": 20 }
```

**Today's flood warnings at severity 2 or worse**

```json
{ "mode": "floods", "minSeverity": 2, "maxResults": 100 }
```

### Aggregate it

```json
{ "mode": "aggregate", "groupBy": "river" }
```

`groupBy` = `river` (default), `town`, `catchment`, `parameter` or `status`.
Every row carries `groupKey`, `groupCount`, `groupBy` and `totalMatched`.
The rollup is returned in full - `maxResults` is not applied in aggregate mode
(`river` currently yields about 1,100 groups, `town` about 2,000).

The default (empty) run returns the current summary.

### Source and licence

**England only.** The Environment Agency covers England; Scotland (SEPA), Wales
(NRW) and Northern Ireland publish separately. Station metadata is published on
a best-effort basis: about 45% of stations carry a town or river name and about
88% carry coordinates, so radius searches only cover the geocoded stations.

Environment Agency flood-monitoring API (beta), Open Government Licence v3.
Attribution: *this uses Environment Agency flood and river level data from
the real-time data API (Beta)*.

The API is a beta service and does not replace the Agency's official flood
warning channels. Do not use it as a safety-critical feed.

Source: [Environment Agency flood-monitoring API](https://environment.data.gov.uk/flood-monitoring/doc/reference).

# Actor input Schema

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

summary = current counts; floods = active warnings and alerts; stations = gauging station lookup; readings = latest measurements joined to stations; aggregate = station rollup. Leave blank to auto-route: no filters -> summary, flood filters -> floods, other filters -> stations.

## `station` (type: `string`):

Exact station notation, e.g. "1029TH".

## `town` (type: `string`):

Station town (word match, case-insensitive), e.g. "Oxford".

## `river` (type: `string`):

River name (word match), e.g. "Thames", "Ouse".

## `catchment` (type: `string`):

Catchment name (word match), e.g. "Cotswolds".

## `parameter` (type: `string`):

Measurement type. For stations this matches any of its measures; for readings it is the exact parameter.

## `status` (type: `string`):

Station status where the API publishes one. The source also carries 'ukcmf'.

## `county` (type: `string`):

Flood area county (word match), e.g. "North Yorkshire". Switches the run to mode=floods.

## `eaArea` (type: `string`):

Environment Agency area on the warning, e.g. "Yorkshire". Switches the run to mode=floods.

## `keyword` (type: `string`):

Substring of the flood warning message.

## `minSeverity` (type: `integer`):

EA scale: 1 = severe flood warning, 2 = flood warning, 3 = flood alert, 4 = warning no longer in force. Returns everything at least as severe as the value (1 = only severe; 3 = severe + warnings + alerts).

## `latitude` (type: `number`):

Latitude for a radius search around a point.

## `longitude` (type: `number`):

Longitude for a radius search around a point.

## `radiusKm` (type: `number`):

Radius for the latitude/longitude search; defaults to 25 km.

## `groupBy` (type: `string`):

Only used with mode=aggregate: river (default), town, catchment, parameter or status. The parameter groups use the display names ("Water Level", "Rainfall").

## `maxResults` (type: `integer`):

Cap the number of records pushed (0 = the default 50, maximum 5000). Aggregate mode returns the full rollup; maxResults is not applied.

## Actor input object example

```json
{
  "radiusKm": 25,
  "maxResults": 50
}
```

# Actor output Schema

## `recordsUrl` (type: `string`):

UK flood station, warning, reading or summary records - as JSON

## `datasetUrl` (type: `string`):

No description

## `runUrl` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("j0401/uk-flood-monitoring").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("j0401/uk-flood-monitoring").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 '{}' |
apify call j0401/uk-flood-monitoring --silent --output-dataset

```

## MCP server setup

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

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/AU5OfOlSQ8zjancjb/builds/812hk7S1KjTJ5XlYd/openapi.json
