# England Nutrient Neutrality Catchment Checker (`nightfallen_persistence/england-nutrient-neutrality-checker`) Actor

Screen GeoJSON parcels and coordinates against Natural England's catchments. Export hectares, overlap percentages and official links.

- **URL**: https://apify.com/nightfallen_persistence/england-nutrient-neutrality-checker.md
- **Developed by:** [yebsin CH](https://apify.com/nightfallen_persistence) (community)
- **Categories:** Real estate
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 site-screeneds

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/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 Nutrient Neutrality Catchment Checker

Screen up to 100 development sites against Natural England’s published nutrient neutrality catchments. Upload a GeoJSON portfolio to see which parts of each parcel overlap a catchment, how many hectares are affected and which official records to review. Use coordinate mode for an initial point check.

### Quick start

1. Open the Actor’s Input tab and upload a WGS84 GeoJSON file, or paste GeoJSON into **Paste parcel GeoJSON**.
2. Start the run. Open **Parcel totals** to see the affected share of each parcel, including parcels with zero overlap.
3. Download **Parcel review CSV** for a review queue ordered by status and overlap percentage. Download **Catchment overlaps CSV** for one row per parcel/catchment intersection, with area, percentage and official links.

#### GeoJSON example

Paste this in **Paste parcel GeoJSON**. It uses a sample rectangle that straddles the River Camel catchment.

```json
{
    "id": "river-camel-edge",
    "type": "Feature",
    "properties": {},
    "geometry": {
        "type": "Polygon",
        "coordinates": [
            [
                [-4.73891759, 50.48281159],
                [-4.73731759, 50.48281159],
                [-4.73731759, 50.48441159],
                [-4.73891759, 50.48441159],
                [-4.73891759, 50.48281159]
            ]
        ]
    }
}
```

For API runs, send the GeoJSON object in the top-level `parcels` field. For a file already stored on Apify, send its readable or signed key-value store record URL as `parcelFileUrl`.

### Flood Zones 2 and 3

Choose **Flood Zones 2 and 3** or set `screening` to `flood` with a WGS84 GeoJSON parcel input. Open the **Flood zone screening** dataset view for separate areas and percentages for Zones 2 and 3, and the combined overlap with shared areas counted once. The denominator is the whole submitted parcel. A zero overlap means that the API returned no mapped river or sea Zone 2 or 3 coverage for that parcel.

This mode uses the [Environment Agency Flood Map for Planning dataset](https://www.data.gov.uk/dataset/104434b0-5263-4c90-9b1e-e43b1d57c750/flood-map-for-planning-flood-zones1). It screens present-day river and sea planning zones. Consult the [official planning guidance](https://www.gov.uk/guidance/flood-risk-assessments-applying-for-planning-permission) for property-specific assessment, surface water and other sources, defences, and future climate scenarios. For each lookup, the service receives a rounded bounding envelope with no parcel ID or full geometry. If the service returns incomplete pages, the parcel is recorded as an error. Split very large or densely mapped parcels into smaller areas.

Run the bundled York example with `apify run --input-file examples/flood-input.json`. It uses an illustrative bounding polygon and official source data.

### Input

| Field                | Default                                        | Description                                                                                                                        |
| -------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `screening`          | `nutrients`                                    | `nutrients` for catchments or `flood` for the Environment Agency planning zones. Flood mode requires parcels. |
| `parcelFileUrl`      | Empty                                          | Upload a `.geojson` or `.json` file to Apify storage. Maximum 5 MiB.                                                               |
| `parcels`            | Empty                                          | Paste a GeoJSON `FeatureCollection`, single `Feature`, `Polygon` or `MultiPolygon` in WGS84. Use one GeoJSON input option per run. |
| `sites`              | Example coordinates in the Console             | Up to 100 objects with a unique `id`, numeric `latitude` and numeric `longitude`. GeoJSON takes priority when supplied.            |
| `maxResults`         | 100                                            | Maximum number of successful checks, subject to the run’s spending limit.                                                          |
| `sourceUrl`          | Official Natural England ArcGIS query endpoint | Public source for the catchment boundaries.                                                                                        |
| `proxyConfiguration` | Direct connection                              | Optional Apify or HTTP(S) proxy configuration for the official data sources.                                                       |

Parcel inputs support up to 100 polygons or multipolygons, with up to 5,000 vertices per parcel and 50,000 per run. Coordinates use longitude and latitude in WGS84 degrees. Use a unique `Feature.id`, `properties.parcelId` or `properties.id` to join the output to your own records. The Actor generates IDs such as `parcel-1` when omitted. Each attempted parcel gets a result with its one-based `inputPosition`, even if its geometry or ID is invalid. A file that cannot be read or a collection with the wrong coordinate system stops the run.

#### Point example

```json
{
    "sites": [
        { "id": "river-camel", "latitude": 50.491762, "longitude": -4.711254 },
        { "id": "westminster", "latitude": 51.5007, "longitude": -0.1246 }
    ],
    "maxResults": 2
}
```

### Output

For a screened parcel, `parcelAreaHa` is the area of the whole parcel. `totalOverlapAreaHa` and `totalOverlapPercent` measure how much of it is covered by any published catchment. For every entry in `parcelOverlaps`, you get the name, overlap area in hectares, percentage of the whole parcel, official feature links and the latest recorded amendment date.

| Parcel status     | Meaning                                                                                                                                                                                |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `matched`         | The parcel overlaps a published catchment. In the River Camel example, the **2.02 ha** parcel overlaps the catchment by **0.71 ha (35.32%)**.                                          |
| `no_match`        | The parcel has land in England and zero overlap with the published catchments.                                                                                                         |
| `outside_england` | The parcel has zero land area within the ONS England boundary. The row links to that boundary and leaves catchment measurements blank. A parcel that crosses into England is screened. |
| `error`           | The parcel could not be checked. The row gives its ID, input position and error message. The Actor continues with the other parcels.                                                   |

The **Parcel totals** view includes all four statuses and can be exported to CSV or Excel. The `RUN_SUMMARY` record reports how many sites were attempted, how many rows were saved (`resultsWritten`), how many catchment checks completed (`screenedSites`), how many parcels were outside England and which sites failed. `maxResults` counts completed catchment checks. The Actor stops processing further entries when it reaches that limit or the spending limit.

Nutrient parcel runs also save `PARCEL_REVIEW.csv` and `CATCHMENT_OVERLAPS.csv` to the run's key-value store. The first sorts matches by percentage and includes errors, sites outside England and zero overlaps. The second is a flat table of individual intersections. Both describe the results saved to the dataset. For runs stopped early, use `RUN_SUMMARY` to check coverage before using the CSVs.

For a point, `matched` means the coordinate intersects a published catchment polygon. Point rows retain their existing fields and statuses.

### How area is calculated

For parcel runs, the Actor downloads each required official layer once and performs the intersections inside Apify. Parcel boundaries stay inside the run. Coverage uses the [ONS December 2025 England boundary](https://ckan.publishing.service.gov.uk/dataset/countries-december-2025-boundaries-uk-bgc), generalised to 20 metres and clipped to the mean high-water coastline. A line or point touching the boundary has zero area. The catchment calculation preserves holes and disconnected parcel parts. Features with the same published catchment name are combined. Area shared by multiple catchments counts once in the parcel total. Areas are estimated in hectares using the EPSG:3035 equal-area projection.

Use the default 512 MB memory setting for parcel runs, especially for parcels that share vertices or edges with the England boundary.

The layer covers published catchments in England. For a planning application, confirm the site boundary, wastewater discharge arrangements and current requirements with your local planning authority. [Natural England’s official dataset](https://www.data.gov.uk/dataset/09864c9e-c589-47f3-9566-89d86a31036c/nutrient-neutrality-catchments-england) · [Natural England’s nutrient budget calculators](https://www.gov.uk/guidance/using-the-nutrient-neutrality-calculators)

### Pricing

**$0.003 per completed site check**, whether it is a point or a parcel. One parcel creates one event even if it overlaps several catchments or both flood zones. A run that completes 100 checks costs $0.30 at list price. The Actor does not charge the site-check event for `error` or `outside_england` rows.

### Maintenance and support

Report unexpected results in Apify Issues with the run ID and a description of the issue. The release checks include a parcel inside a catchment, a parcel crossing its boundary and a parcel outside the published boundaries.

### Run locally

```powershell
npm ci
apify run --input-file examples/parcel-input.json --user-agent apify-agent-skills/apify-actor-development
```

### Brownfield register digest

The local command below creates a report for one English local planning authority. The example ID is Lambeth. Look up other authority IDs in the [official Planning Data API guide](https://www.planning.data.gov.uk/docs) under **Find development sites in an area**.

```powershell
npm run brownfield -- --authority 626195 --out brownfield-reports
```

The first run records a baseline. Later runs using the same output directory compare the official entity IDs, selected attributes and geometry, and list new, updated or absent records. Each completed run saves `report.html`, `report.csv` and its source snapshot. The digest queries [current brownfield records](https://www.planning.data.gov.uk/dataset/brownfield-land) that intersect the authority geometry. Source returns and local-authority coverage can change. An absent record calls for checking the official source.

By default it screens the reported geometries against Natural England. A point check leaves the area percentage blank. Polygon overlaps use the same calculation as the Actor. `--no-screen` produces a register-only report. Run again from the same output directory for the next edition. The command produces files ready to review, with delivery handled separately.

# Actor input Schema

## `screening` (type: `string`):

Choose Natural England nutrient catchments or Environment Agency river and sea flood zones. Flood screening requires GeoJSON parcels.

## `parcelFileUrl` (type: `string`):

Upload a .geojson or .json file to Apify storage. Use WGS84 polygons, up to 100 parcels and 5 MiB per file.

## `parcels` (type: `object`):

Alternative to uploading a file. Paste a WGS84 FeatureCollection of Polygon or MultiPolygon parcels, or one feature or geometry.

## `sites` (type: `array`):

For point screening, enter up to 100 site IDs and WGS84 coordinates. GeoJSON input takes priority over this field.

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

Stop after this many successful catchment checks, subject to the run's spending limit. Out-of-coverage and error rows do not count.

## `sourceUrl` (type: `string`):

Official ArcGIS query endpoint for the Nutrient Neutrality Catchments (England) layer.

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

Direct HTTPS is the default. Select a proxy if your network setup requires one.

## Actor input object example

```json
{
  "screening": "nutrients",
  "parcelFileUrl": "",
  "sites": [
    {
      "id": "river-camel",
      "latitude": 50.491762,
      "longitude": -4.711254
    },
    {
      "id": "westminster",
      "latitude": 51.5007,
      "longitude": -0.1246
    }
  ],
  "maxResults": 100,
  "sourceUrl": "https://services.arcgis.com/JJzESW51TqeY9uat/ArcGIS/rest/services/Nutrient_Neutrality_Catchments_England/FeatureServer/0/query",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

## `parcelReview` (type: `string`):

No description

## `catchmentOverlaps` (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 = {
    "parcelFileUrl": "",
    "sites": [
        {
            "id": "river-camel",
            "latitude": 50.491762,
            "longitude": -4.711254
        },
        {
            "id": "westminster",
            "latitude": 51.5007,
            "longitude": -0.1246
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nightfallen_persistence/england-nutrient-neutrality-checker").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 = {
    "parcelFileUrl": "",
    "sites": [
        {
            "id": "river-camel",
            "latitude": 50.491762,
            "longitude": -4.711254,
        },
        {
            "id": "westminster",
            "latitude": 51.5007,
            "longitude": -0.1246,
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("nightfallen_persistence/england-nutrient-neutrality-checker").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 '{
  "parcelFileUrl": "",
  "sites": [
    {
      "id": "river-camel",
      "latitude": 50.491762,
      "longitude": -4.711254
    },
    {
      "id": "westminster",
      "latitude": 51.5007,
      "longitude": -0.1246
    }
  ]
}' |
apify call nightfallen_persistence/england-nutrient-neutrality-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nightfallen_persistence/england-nutrient-neutrality-checker"
        }
    }
}
```

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/MlDRT33HZrtIIz98r/builds/HZmUf90EINhKyAbcL/openapi.json
