# UK Planning Constraints Checker (England) (`onibaku/uk-planning-constraints`) Actor

Check any English postcode or coordinate for conservation areas, listed buildings, Article 4, TPOs, flood zones, green belt, AONB, SSSI and 20+ more planning constraints, from the official planning.data.gov.uk API.

- **URL**: https://apify.com/onibaku/uk-planning-constraints.md
- **Developed by:** [Onibaku](https://apify.com/onibaku) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 location checkeds

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/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 Planning Constraints Checker (England)

Check any postcode or coordinate in England against **28 official planning constraint datasets** in one go:
conservation areas, listed buildings, Article 4 directions, tree preservation orders, flood zones 2 and 3, green belt,
National Landscapes (AONB), national parks, SSSIs, scheduled monuments, World Heritage Sites, ancient woodland and more.

You get **one flat row per location**, with a true/false column for each constraint, the local planning authority,
the conservation area name, the worst flood zone, nearby listed buildings with their grade, and links to the official
records. The data comes straight from the government's [planning.data.gov.uk](https://www.planning.data.gov.uk) API,
so there's no scraping, no captchas and no stale copies.

[![Watch the 20-second overview](https://img.youtube.com/vi/q2wxB3TFFj0/maxresdefault.jpg)](https://www.youtube.com/watch?v=q2wxB3TFFj0)

### What it's for

- **Property and land due diligence:** screen a list of sites before you buy, bid or instruct a surveyor.
- **Architects, planning consultants and builders:** know before you draw whether you're in a conservation area or
  under an Article 4 direction (which removes permitted development rights).
- **Estate agents and proptech:** enrich listings with "listed building nearby", "flood zone 3" or "green belt" flags.
- **Lenders, insurers and valuers:** bulk-check a portfolio of postcodes for flood zones and heritage constraints.
- **Solar, EV charging and telecoms rollouts:** filter out sites with heritage or environmental designations.
- **AI agents:** call it as an MCP tool to answer "can I build here?" questions with official data.

### Input

| Field | What it does |
| --- | --- |
| `locations` | Postcodes (`SW1A 1AA`) or `latitude, longitude` pairs (`51.5014, -0.1419`). One output row each. |
| `constraints` | Optional. Only check these datasets. Leave empty to check all 28. |
| `radiusMetres` | Listed buildings and individual protected trees are stored as points, so they are searched within this radius (default 50 m, max 500 m, 0 turns it off). |
| `includeConstraintList` | Adds a `constraints` array with each hit's name, reference, grade or flood level, distance and official link. On by default. |

```json
{
    "locations": ["SW1A 1AA", "BA1 1LZ", "51.4826, -0.0077"],
    "radiusMetres": 50
}
```

### Output

One row per location (trimmed here):

```json
{
    "input": "BA1 1LZ",
    "postcode": "BA1 1LZ",
    "latitude": 51.381125,
    "longitude": -2.360104,
    "localPlanningAuthority": "Bath and North East Somerset LPA",
    "ward": "Kingsmead",
    "constraintCount": 3,
    "constraintSummary": "Conservation area; Scheduled monument; World Heritage Site",
    "conservationArea": true,
    "conservationAreaName": "Bath",
    "listedBuildingOutline": false,
    "listedBuildingsNearby": true,
    "listedBuildingsNearbyCount": 15,
    "highestListedGradeNearby": "I",
    "article4Direction": false,
    "treePreservationZone": false,
    "floodRiskZone": false,
    "floodZone": null,
    "greenBelt": false,
    "nationalLandscape": false,
    "worldHeritageSite": true,
    "constraints": [
        {
            "dataset": "conservation-area",
            "label": "Conservation area",
            "name": "Bath",
            "reference": "5113",
            "detail": null,
            "distanceMetres": null,
            "documentationUrl": "https://beta.bathnes.gov.uk/view-conservation-area-character-appraisals",
            "entityUrl": "https://www.planning.data.gov.uk/entity/44006636"
        },
        {
            "dataset": "listed-building",
            "label": "Listed buildings nearby",
            "name": "GRAND PUMP ROOM",
            "reference": "1394019",
            "detail": "Grade I",
            "distanceMetres": 8,
            "documentationUrl": "https://historicengland.org.uk/listing/the-list/list-entry/1394019",
            "entityUrl": "https://www.planning.data.gov.uk/entity/31849577"
        }
    ],
    "source": "planning.data.gov.uk (MHCLG), Open Government Licence v3.0",
    "checkedAt": "2026-10-24T13:40:00.000Z"
}
```

Every constraint has its own boolean column, so the dataset opens cleanly in Excel or Google Sheets:
`conservationArea`, `listedBuildingOutline`, `listedBuildingsNearby`, `locallyListedBuildingsNearby`,
`article4Direction`, `treePreservationZone`, `protectedTreesNearby`, `floodRiskZone`, `greenBelt`,
`nationalLandscape`, `nationalPark`, `sssi`, `specialAreaOfConservation`, `specialProtectionArea`, `ramsarSite`,
`scheduledMonument`, `worldHeritageSite`, `worldHeritageBufferZone`, `historicParkOrGarden`, `historicBattlefield`,
`heritageCoast`, `ancientWoodland`, `localNatureReserve`, `nationalNatureReserve`, `archaeologicalPriorityArea`,
`airQualityManagementArea`, `nutrientNeutralityCatchment` and `brownfieldLand`.

Locations that can't be checked (bad input, unknown postcode, Scotland, Wales or Northern Ireland) get a row with an
`error` message and **are not charged**.

### Pricing

**$0.006 per location checked**, plus a token $0.00005 per run. Failed or invalid locations are free. 1,000 postcodes cost about $6.

### Good to know

- **England only.** planning.data.gov.uk covers English planning authorities. Welsh, Scottish and Northern Irish
  postcodes return an error row (free).
- **Postcodes are a point, not a boundary.** A postcode is checked at its centre (from the ONS postcode directory via
  postcodes.io), so a large postcode can straddle a boundary. For a specific building, pass its coordinates.
- **Coverage varies by council.** Conservation areas, Article 4 directions and tree preservation orders are supplied
  by each council; most of England is covered, but not every council has published every dataset yet. National
  datasets (flood zones, listed buildings, green belt, SSSIs and the rest) are complete.
- **Not legal advice.** This is a fast screening tool. Always confirm with the local planning authority before you
  rely on it.

### Use it from Claude, ChatGPT or Cursor (MCP)

AI assistants can call this actor as a tool through Apify's MCP server. Add this server URL to your MCP client and
sign in with your Apify account when prompted:

```
https://mcp.apify.com?tools=onibaku/uk-planning-constraints
```

### Data source and licence

Constraint data: [planning.data.gov.uk](https://www.planning.data.gov.uk), Ministry of Housing, Communities and
Local Government, with data from Historic England, the Environment Agency, Natural England and local planning
authorities, under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).
Postcode locations: [postcodes.io](https://postcodes.io) (ONS and Ordnance Survey data, OGL).

### More UK public data actors from Onibaku

- [UK Food Hygiene Ratings (FSA) Search](https://apify.com/onibaku/uk-food-hygiene-ratings)
- [Charity Commission Register Search](https://apify.com/onibaku/uk-charity-register)
- [Ofsted Ratings & Report Cards](https://apify.com/onibaku/uk-ofsted-ratings)

Questions or a dataset you'd like added? Open an issue on the actor's Issues tab or email admin@onibaku.co.uk.

# Actor input Schema

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

Postcodes (e.g. SW1A 1AA) or "latitude, longitude" pairs (e.g. 51.5014, -0.1419). England only. One row per location.

## `constraints` (type: `array`):

Leave empty to check all of them.

## `radiusMetres` (type: `integer`):

Listed buildings and individual protected trees are stored as points, so they are found within this distance of the location. 0 turns this off. Max 500.

## `includeConstraintList` (type: `boolean`):

Adds a "constraints" array with the name, reference, grade or flood level and official link for each hit.

## Actor input object example

```json
{
  "locations": [
    "SW1A 1AA",
    "BA1 1LZ",
    "51.4826, -0.0077"
  ],
  "radiusMetres": 50,
  "includeConstraintList": true
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (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 = {
    "locations": [
        "SW1A 1AA",
        "BA1 1LZ",
        "51.4826, -0.0077"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("onibaku/uk-planning-constraints").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 = { "locations": [
        "SW1A 1AA",
        "BA1 1LZ",
        "51.4826, -0.0077",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("onibaku/uk-planning-constraints").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 '{
  "locations": [
    "SW1A 1AA",
    "BA1 1LZ",
    "51.4826, -0.0077"
  ]
}' |
apify call onibaku/uk-planning-constraints --silent --output-dataset

```

## MCP server setup

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

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/tIIgMgvxVX6wo9OyB/builds/FL4SH614xFxmu3zyB/openapi.json
