# UK Water Quality & Sewage Data – Rivers, Beaches (EA) (`denjino/uk-water-quality-archive`) Actor

Official Environment Agency water quality lab results for England: rivers, lakes, canals, bathing beaches, estuaries and water-company sewage works effluent. Ammonia, nitrate, phosphate, BOD, E. coli, pH and 1000s more, back to 2000. No API key.

- **URL**: https://apify.com/denjino/uk-water-quality-archive.md
- **Developed by:** [John Martinez](https://apify.com/denjino) (community)
- **Categories:** News, Integrations
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## UK Water Quality & Sewage Data – Rivers, Beaches (EA)

Find out what is in a river, a bathing beach or a sewage works discharge in England: official Environment Agency lab results for ammonia, phosphate, E. coli and thousands more, back to 2000, in one tidy table. Works with the new Water Quality API that replaced the old archive in December 2025.

Download official **water quality lab results for England** from the Environment Agency as tidy rows: **rivers, lakes, canals, bathing beaches, estuaries and coastal waters**, plus **water-company sewage treatment works effluent and storm overflow samples**. Ammonia, nitrate, phosphate, BOD, dissolved oxygen, E. coli, intestinal enterococci, pH, metals, pesticides and thousands more determinands, from 2000 to the latest samples. No API key, no web-page scraping: it uses the EA's open Water Quality API.

### What you can do

- Track **river pollution**: ammonia, nitrate and phosphate on any river (e.g. names containing "THAMES", "WYE", "CHERWELL") or near any point.
- Check **sewage works compliance**: final effluent BOD, ammonia and suspended solids for water-company STWs (e.g. `AN-CORBY`).
- Get **bathing water** E. coli and enterococci results at beaches and inland bathing sites.
- Pull long **history** for one sampling point (no date-range limit) or up to a few years region-wide (auto-split into yearly requests).
- List **sampling points** with IDs, type, status, region and coordinates.

### Who uses this

Environmental consultants and ecologists, water companies and their supply chain, campaigners and river trusts tracking sewage pollution, data journalists, farmers and catchment partnerships, anglers, wild swimmers, ESG and insurance analysts, researchers and students.

### Input examples

- Ammonia on rivers named Thames: `{"determinands": ["Ammoniacal Nitrogen as N"], "search": "THAMES", "categories": ["rivers"]}`
- Everything measured near Oxford in 2026: `{"latitude": 51.75, "longitude": -1.25, "radiusKm": 5, "startDate": "2026-01-01"}`
- Sewage works effluent history: `{"samplingPointIds": ["AN-CORBY"], "determinands": ["0085", "0111"], "startDate": "2015-01-01"}`
- South West bathing waters: `{"region": "SW", "categories": ["bathingWaters"], "determinands": ["0939", "3723"]}`
- Sampling point directory: `{"mode": "samplingPoints", "search": "CHERWELL"}`

### Output

One row per lab result: `samplingPointId`, `samplingPointName`, `samplingPointType`, `status`, `region`, `area`, `subArea`, `latitude`, `longitude`, `sampleDateTime`, `sampleDate`, `samplingPurpose`, `sampleMaterial`, `determinandCode`, `determinand`, `result` (as published, e.g. `<0.03`), `value` (number), `qualifier` (`<` / `>` for below/above detection limit), `unit`, `observationId`, `licence`.

### Notes

- Covers England (Environment Agency). Scotland (SEPA), Wales (NRW) and Northern Ireland are not included.
- Privacy: only public water bodies and water-company sites are returned. Private sewage discharges, private wells and boreholes, farms, waste sites and pollution investigation points are excluded because their names can identify private homes.
- The API limits multi-site queries to 1 year per request; the actor splits longer ranges and returns the newest year first.
- Lab results appear in the EA data a few weeks after sampling.

### Run it on a schedule

Save your input as a task and add it to Apify Schedules (for example, daily at 07:00) to get a fresh table every day. Each run can be pushed to Google Sheets, a webhook, Slack or your database through Apify integrations.

### Pricing

**$1.00 per 1,000 rows** on the Free and Bronze plans, $0.90 per 1,000 on Silver and $0.80 per 1,000 on Gold, plus a start fee of $0.005 per GB of run memory. A typical run of a few hundred rows costs well under $1.

### Licence

Contains Environment Agency information licensed under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).

### Like this? See my other UK data Actors

- [UK EV charging stations – live status & prices](https://apify.com/denjino/uk-ev-chargepoints-open-data)
- [NHS GP practices, pharmacies & dentists list](https://apify.com/denjino/nhs-ods-organisations)
- [UK air quality – live DEFRA readings](https://apify.com/denjino/uk-air-quality-defra)
- [UK product recalls & MHRA alerts monitor](https://apify.com/denjino/uk-safety-alerts-recalls)
- [England river levels, flow & rainfall (EA)](https://apify.com/denjino/uk-river-flow-rainfall-groundwater)
- [Scotland river levels & rainfall (SEPA)](https://apify.com/denjino/scotland-river-levels-rainfall-sepa)
- [Ireland river levels & flow (OPW)](https://apify.com/denjino/ireland-river-levels-flow-opw)

# Actor input Schema

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

Water quality lab results, or only the sampling point directory (to find IDs).

## `determinands` (type: `array`):

Optional. Exact names or 4-digit EA codes, e.g. 'Ammoniacal Nitrogen as N' (0111), 'Nitrate as N' (0117), 'Orthophosphate, reactive as P' (0180), 'BOD : 5 Day ATU' (0085), 'pH' (0061), 'Temperature of Water' (0076), 'Oxygen, Dissolved, % Saturation' (9901), 'Escherichia coli : Confirmed : MPN' (0939), 'Enterococci: Intestinal: Confirmed: MF' (3723). Leave empty for every determinand.

## `search` (type: `string`):

Optional text in the sampling point name, e.g. 'THAMES', 'CHERWELL', 'STW' or a town.

## `samplingPointIds` (type: `array`):

Optional EA sampling point notations like 'TH-PCHR0016' or 'AN-CORBY' (max 100). With a single ID there is no 1-year limit on the date range.

## `categories` (type: `array`):

Optional. Leave empty for all public water types listed. Private discharges and private wells are never included.

## `region` (type: `string`):

Optional Environment Agency region.

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

Optional. With longitude, only sampling points within the radius.

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

Optional longitude for the near-a-point search.

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

Search radius around the point.

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

YYYY-MM-DD. Default: 1 year before the end date. Longer ranges are split into yearly requests automatically (newest first).

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

YYYY-MM-DD. Default: today.

## `complianceOnly` (type: `boolean`):

Only samples taken for permit or directive compliance.

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

Maximum rows to return (0 = no limit). Controls cost.

## Actor input object example

```json
{
  "mode": "observations",
  "determinands": [
    "Ammoniacal Nitrogen as N"
  ],
  "search": "THAMES",
  "radiusKm": 5,
  "complianceOnly": false,
  "maxResults": 1000
}
```

# Actor output Schema

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

One row per measured determinand per sample.

# 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 = {
    "determinands": [
        "Ammoniacal Nitrogen as N"
    ],
    "search": "THAMES"
};

// Run the Actor and wait for it to finish
const run = await client.actor("denjino/uk-water-quality-archive").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 = {
    "determinands": ["Ammoniacal Nitrogen as N"],
    "search": "THAMES",
}

# Run the Actor and wait for it to finish
run = client.actor("denjino/uk-water-quality-archive").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 '{
  "determinands": [
    "Ammoniacal Nitrogen as N"
  ],
  "search": "THAMES"
}' |
apify call denjino/uk-water-quality-archive --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,denjino/uk-water-quality-archive"
        }
    }
}
```

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/Y3Mt46yFKMSclEWTc/builds/iVV5yqel2hDvj6NZf/openapi.json
