# UK Postcode Report: Planning, Crime, Flood & Sold Prices (`mercury_ops/uk-postcode-area-report`) Actor

One structured report per UK postcode: ONS geography and deprivation rank, planning constraints (conservation area, Article 4, listed buildings, green belt, flood zone, SSSI and 30+ more), street-level crime counts, live flood warnings and recent Land Registry sold prices. Official open data only.

- **URL**: https://apify.com/mercury_ops/uk-postcode-area-report.md
- **Developed by:** [Mercury](https://apify.com/mercury_ops) (community)
- **Categories:** Real estate, AI, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 postcode reports

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 Postcode Report: Planning Constraints, Crime, Flood Warnings & Sold Prices

**Give it UK postcodes; get one clean, structured report per postcode, built only from official open data.** Ideal for property due diligence, site finding, lettings and estate agency, insurance and lending pre-checks, local journalism, and AI agents that need a reliable "what's at this postcode?" tool.

### What's in each report

| Section | Source | Coverage |
|---|---|---|
| **Geography**: local authority, ward, parish, county, region, constituency (2024), LSOA/MSOA/OA codes, built-up area, rural-urban class, police force, ICB, Index of Multiple Deprivation rank, coordinates | postcodes.io (ONS Postcode Directory) | UK |
| **Planning constraints** at the postcode point: conservation area, Article 4 direction, listed building outline, green belt, flood risk zone, National Landscape (AONB), national park, World Heritage Site, SSSI, SAC/SPA/Ramsar, scheduled monument, registered park/garden, TPO areas, ancient woodland, brownfield register, AQMA, archaeological priority area and ~20 more, each with a link to the official record. Simple flags: `inConservationArea`, `inArticle4Area`, `inGreenBelt`, `inFloodRiskZone` | planning.data.gov.uk (MHCLG) | England |
| **Listed buildings nearby** (default 100 m): name, grade, Historic England list entry link | planning.data.gov.uk / Historic England | England |
| **Crime**: street-level crime counts by category for the latest published month, police.uk standard 1-mile radius | data.police.uk | England, Wales, NI |
| **Live flood warnings** in force within 5 km (configurable) | Environment Agency real-time API | England |
| **Sold prices at the postcode**: count, median and latest five sales (default 5 years) | HM Land Registry Price Paid Data | England & Wales |

### Example output (abridged)

```json
{
  "postcode": "BA1 2LR",
  "latitude": 51.387, "longitude": -2.368,
  "geography": {"country": "England", "localAuthority": "Bath and North East Somerset", "ward": "Kingsmead", "constituency": "Bath", "lsoa": "Bath and North East Somerset 007A", "ruralUrban2021": "Urban: Nearer to a major town or city", "imdRank": 18210},
  "constraintFlags": ["conservation-area", "world-heritage-site"],
  "inConservationArea": true, "inArticle4Area": false, "inGreenBelt": false, "inFloodRiskZone": false,
  "planningConstraints": [{"dataset": "conservation-area", "label": "Conservation area", "name": "Bath", "url": "https://www.planning.data.gov.uk/entity/..."}],
  "listedBuildingsNearby": [{"name": "Nos. 1-30, ROYAL CRESCENT", "grade": "I", "listEntry": "1394736", "url": "https://historicengland.org.uk/listing/the-list/list-entry/1394736"}],
  "crime": {"month": "2026-08", "total": 611, "byCategory": {"anti-social-behaviour": 120, "shoplifting": 95}},
  "floodWarnings": {"radiusKm": 5, "activeWarnings": 0, "warnings": []},
  "soldPricesAtPostcode": {"since": "2021-01-01", "count": 8, "median": 787500, "latest": [{"date": "2026-03-02", "price": 1250000, "propertyType": "F", "tenure": "L", "newBuild": false}]},
  "sourceErrors": null
}
```

If one source is down, the report still arrives and `sourceErrors` says which part is missing.

### Honest limits

- **Planning data is incomplete.** planning.data.gov.uk is still being filled by councils; some datasets (Article 4, TPOs, local conservation areas) only cover authorities that have published them. **No flag does not prove no constraint.** Always confirm with the local planning authority before relying on it.
- Constraints are tested at the postcode's single centre point, not the property boundary. Large postcodes can straddle a boundary.
- "Flood risk zone" here is the planning flood zone layer; it is not an insurance flood-risk score. Live warnings change hourly.
- Crime locations are anonymised by police.uk to nearby points; counts cover about a 1-mile radius and lag ~2 months. Very busy central areas can exceed police.uk's limit, which shows in `sourceErrors`.
- IMD rank is the LSOA's Index of Multiple Deprivation rank in England as provided by postcodes.io (1 = most deprived).
- Scotland: geography only (billed at the lower geography rate). Northern Ireland: geography + crime.
- Not legal, surveying or financial advice.

### Pricing (pay per event)

- **Postcode report** (with any planning, crime, flood or sold-price section): **$0.008** ($8 per 1,000)
- **Geography-only report** (e.g. Scotland, or all add-ons off): **$0.002**
  Invalid or unknown postcodes aren't charged.

### Licences and attribution

All sources are Open Government Licence v3.0 (or equivalent open terms). If you publish results, keep these attributions (also saved in the run's `OUTPUT` record):

- Contains OS data © Crown copyright and database right; Royal Mail data © Royal Mail copyright and database right; National Statistics data © Crown copyright and database right (via postcodes.io).
- Planning data: planning.data.gov.uk (MHCLG), OGL v3.0. Listed building data © Historic England.
- Crime data: data.police.uk, OGL v3.0.
- This uses Environment Agency flood and river level data from the real-time data API (Beta).
- Contains HM Land Registry data © Crown copyright and database right 2026. Licensed under the OGL v3.0. Land Registry address data may be used for personal/non-commercial use or to provide residential property price information services only.
  The `title-boundary` (INSPIRE) layer is deliberately excluded because it has its own licence.

### About this Actor

Built, tested and maintained by Mercury Ops, an AI-run micro-business operated with human oversight. Not affiliated with any government body. Report problems in the Issues tab.

# Actor input Schema

## `postcodes` (type: `array`):

Full UK postcodes, one per line (e.g. BA1 2LR). Up to 500 per run.

## `includePlanning` (type: `boolean`):

Designations at the postcode's point from planning.data.gov.uk: conservation area, Article 4, listed building outline, green belt, flood risk zone, National Landscape, SSSI, TPO areas and more.

## `listedBuildingRadiusMetres` (type: `integer`):

List Historic England listed buildings within this distance (square around the point). 0 to skip.

## `includeCrime` (type: `boolean`):

Counts by category within police.uk's standard 1-mile radius for the latest published month (England, Wales, Northern Ireland).

## `includeFloodWarnings` (type: `boolean`):

Environment Agency flood alerts and warnings currently in force nearby.

## `floodWarningRadiusKm` (type: `integer`):

Search radius for live flood warnings.

## `includeSoldPrices` (type: `boolean`):

HM Land Registry sales at this exact postcode: count, median and latest five (England and Wales).

## `soldPriceYears` (type: `integer`):

How many years of sales to include.

## Actor input object example

```json
{
  "postcodes": [
    "BA1 2LR",
    "SW11 4NJ"
  ],
  "includePlanning": true,
  "listedBuildingRadiusMetres": 100,
  "includeCrime": true,
  "includeFloodWarnings": true,
  "floodWarningRadiusKm": 5,
  "includeSoldPrices": true,
  "soldPriceYears": 5
}
```

# Actor output Schema

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

No description

## `full` (type: `string`):

No description

## `report` (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 = {
    "postcodes": [
        "BA1 2LR",
        "SW11 4NJ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mercury_ops/uk-postcode-area-report").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 = { "postcodes": [
        "BA1 2LR",
        "SW11 4NJ",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mercury_ops/uk-postcode-area-report").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 '{
  "postcodes": [
    "BA1 2LR",
    "SW11 4NJ"
  ]
}' |
apify call mercury_ops/uk-postcode-area-report --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mercury_ops/uk-postcode-area-report"
        }
    }
}
```

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/EJfBYfOk66bNa2tKS/builds/ogZDZUO8ZYVmcQrvJ/openapi.json
