# UK Planning Applications & Construction Leads Scraper (`kailouis_labs/uk-planning-applications-scraper`) Actor

Extract UK council planning applications nationwide with postcode radius, keyword filters (extension, loft, solar, new dwelling), coordinates, application status & architect/agent firm details. Clean CRM-ready leads for UK builders, solar installers & property teams.

- **URL**: https://apify.com/kailouis_labs/uk-planning-applications-scraper.md
- **Developed by:** [Kailouis Labs](https://apify.com/kailouis_labs) (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

from $6.00 / 1,000 uk planning application leads

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 Applications Scraper — every council, one Actor

**One Actor for the whole UK planning register.** No dozens of brittle council scrapers, no proxies, no API key. It reads the free, public [PlanIt UK](https://www.planit.org.uk) JSON API and turns planning applications into flat, CRM-ready B2B leads: postcode-radius, keyword intent and status filters included.

Planning applications are the earliest public signal of paid work in the UK: an extension, a loft conversion, a new dwelling, a change of use, a solar or heat-pump install. The applicant has already paid an architect and a council fee before the application is validated. This Actor hands you that list.

### Who buys this

| Buyer | What they do with it |
| --- | --- |
| Solar & heat-pump installers | Find "extension", "loft", "change of use" applications in a radius and quote before the roof goes on |
| Builders, extensions & loft specialists | Weekly feed of Householder applications near their postcode |
| Architects & planning consultants | See which agent firm is already on the job, and which applicants filed direct (no agent = open door) |
| Scaffolding, skip hire, plant hire | Applications within 5–15 km of a depot, filtered to Full / Outline / new build |
| Property data resellers & PropTech | National coverage in one flat schema, refreshed on a schedule |
| Estate agents & developers | `Permitted` decisions in a target postcode for land and conversion leads |

### Why one Actor instead of 400 council scrapers

UK planning data sits in more than 400 separate council portals, each with its own HTML, its own identifiers and its own outages. PlanIt aggregates them into one normalised feed. This Actor uses that feed through plain HTTP, which means:

- **No browser** (no Chromium download, no 1 GB image, fast cold starts).
- **No residential proxies** — the API is public and free, so the run costs nothing beyond compute.
- **No API key** and no per-record fee.
- **National coverage in one run**: any postcode, any council, or a date window over everything.
- **Survives the rate limit**: PlanIt throttles bursts. The Actor paces itself and waits out a `429` instead of crashing.

### Input

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `postcode` | string | – | UK postcode centre for a radius search, e.g. `SW1A 1AA`, `CB1 1PT` |
| `radiusKm` | number | `10` | Radius in km around the postcode |
| `localAuthorities` | array | – | Council names, e.g. `["Cambridge", "Camden"]` — takes precedence over postcode |
| `daysBack` | integer | `30` | Applications received in the last N days (ignored when `startDate` is set) |
| `startDate` / `endDate` | string | – | Explicit `YYYY-MM-DD` range |
| `keywords` | array | – | Case-insensitive match on the description: `["extension", "loft", "solar", "heat pump", "new dwelling", "change of use"]` |
| `applicationTypes` | array | – | `Full`, `Outline`, `Amendment`, `Conditions`, `Heritage`, `Trees`, `Advertising`, `Telecoms`, `Other` |
| `applicationStates` | array | – | `Undecided`, `Permitted`, `Rejected`, `Withdrawn`, `Referred`, `Unresolved`, `Other` |
| `onlyWithAgentCompany` | boolean | `false` | Keep only leads with a real architectural or planning firm in `agentCompany` |
| `includeExtraDetails` | boolean | `false` | Fetch the per-application detail endpoint for the handful of records that pass every filter |
| `maxItems` | integer | `200` | Safety cap. `0` = unlimited |
| `minDelayMs` | integer | `3200` | Politeness gap between API requests. Raise it, never lower it, if you run big jobs |

Any of these may be left out: the Actor then runs a national date-window query for that period.

### Output — flat JSON, one row per application

`uid`, `areaId`, `localAuthority`, `reference`, `address`, `postcode`, `latitude`, `longitude`, `distanceKm`, `description`, `applicationType`, `applicationSubtype`, `applicationSize`, `applicationState`, `decision`, `status`, `wardName`, `parish`, `dateReceived`, `dateValidated`, `dateDecided`, `targetDecisionDate`, `consultedDate`, `agentCompany`, `agentName`, `agentAddress`, `applicantName`, `applicantAddress`, `caseOfficer`, `decidedBy`, `documentCount`, `commentCount`, `uprn`, `planningPortalId`, `easting`, `northing`, `matchedKeywords`, `sourceUrl`, `councilSearchUrl`, `documentsUrl`, `mapUrl`, `commentUrl`, `planItUrl`, `lastChanged`, `scrapedAt`.

Details that matter for a CRM import:

- **No `"See source"` junk.** PlanIt uses placeholder strings (`"See source"`, `"N/A"`, `"Unknown"`, `"Not known"`) where a council omitted a field. They are cleaned to `null`, so a filter on `agentCompany` does not return 4,000 fake firms called "See source".
- **Flat coordinates.** `latitude` and `longitude` are plain numbers, pulled from `location_x`/`location_y`, the GeoJSON `location` point, or `other_fields.lat/lng`, whichever the record has. Impossible points (0,0 or outside Great Britain) are dropped to `null` rather than plotting in the Gulf of Guinea.
- **A direct council link.** `sourceUrl` is the actual council application page, not a PlanIt page. `planItUrl`, `documentsUrl`, `mapUrl` and `commentUrl` come along when the council supplies them.
- **`matchedKeywords`** tells you why a record survived your keyword filter, so a sales rep can sort by intent.
- **`distanceKm`** is filled on radius searches, giving you a ready-to-sort proximity column.

### Benchmark: real test runs

| Run | Items | Wall clock | Peak RSS | 429s hit / wait |
| --- | --- | --- | --- | --- |
| Test 1 — `localAuthorities: ["Cambridge"]`, 90 days, cap 100 | 100 | 477 s | 109 MB | 1 / 472 s |
| Test 2 — `postcode: "SW1A 1AA"`, 5 km, keywords, 90 days, cap 50 | 50 | 76 s | 110 MB | 0 / 0 s |
| Test 3 — `Cambridge`, `onlyWithAgentCompany: true`, 180 days, cap 25 | 25 | 3.8 s | 91 MB | 0 / 0 s |

All three ran on the free public API with no proxy, one request at a time and `minDelayMs: 3200`. Test 1 shows the documented soft limit: Cambridge answered with one `429` asking for 119 s per attempt and the run waited it out and finished with 0 failed pages. In Test 2 PlanIt's own 45 s data-source budget timed out on the full 5 km box, so the Actor split that box into four, collected the answer from the smaller boxes and still returned 50 matched leads with 0 failed pages. `matchedKeywords` and `distanceKm` were filled on 100% of Test 2 rows; `agentCompany` was on 86% of Test 1 and 100% of Test 3 rows.

Peak memory stays flat because only one page of 100 records is ever held: records are transformed and pushed to the dataset page by page. The Actor is configured with `minMemoryMbytes: 512` and runs comfortably inside it, so the cheapest Apify memory tier is enough.

Throttling behaviour in production:

- default **1 request at a time**, at least **3.2 s** apart;
- a `429` is read for either the `Retry-After` header or the body text (`"try again in 119s"`), then the Actor sleeps that long plus 3 s, logs one line and retries — up to 5 times per request;
- a page that still fails is logged and skipped, and the run keeps its already-collected leads.

Because of that pacing, a very large national job (hundreds of thousands of applications) takes hours, which is the price of a free API with no proxy. Narrow it with `localAuthorities`, `postcode` + `radiusKm`, `daysBack` or `maxItems` and it finishes in seconds. For daily lead feeds, schedule it with `daysBack: 1`.

### Typical recipes

**Solar / heat-pump leads in 10 km of a postcode**

```json
{ "postcode": "CB1 1PT", "radiusKm": 10, "keywords": ["extension", "loft", "new dwelling", "change of use"], "daysBack": 14, "maxItems": 200 }
```

**Architects already hired — competitive intel in one borough**

```json
{ "localAuthorities": ["Camden"], "onlyWithAgentCompany": true, "daysBack": 60 }
```

**Freshly permitted work, ready to quote**

```json
{ "localAuthorities": ["Cambridge"], "applicationStates": ["Permitted"], "daysBack": 30, "applicationTypes": ["Full", "Householder"] }
```

**Scaffolding around a depot**

```json
{ "postcode": "M1 1AE", "radiusKm": 15, "daysBack": 7, "maxItems": 0 }
```

### Coverage, freshness and limits

- Coverage is national: England, Scotland, Wales and Northern Ireland councils that PlanIt ingests.
- Freshness follows PlanIt: a council appears once its own portal has been harvested, so a very recent application can lag by days. `lastScraped`/`lastChanged` are on every record so you can see it.
- Planning applications are public data published by local authorities. PlanIt aggregating them does not make every council-supplied field complete: `agentCompany` is present only where the council publishes it (see the fill rates below), which is exactly why `onlyWithAgentCompany` is a filter and not a default.
- Not every UK council populates the same fields; the Actor keeps every field it receives and never invents one.

Fill rates observed over 500 real records sampled from a Cambridge + London-belt test run: `uid` 100%, `localAuthority` 100%, `description` 100%, `applicationType` 100%, `applicationState` 100%, `dateReceived` 96%, `postcode` 89%, `latitude/longitude` 68%, `agentCompany` 41%, `applicantName` 33%, `sourceUrl` 100% (a council or PlanIt link on every record), `documentsUrl` 52%.

### Pricing suggestion for the Store

Run cost is almost all compute: a 100-lead run finishes well inside one minute on the cheapest 512 MB tier, so a run costs a fraction of a cent. That leaves room for value pricing based on the data, not the compute:

| Tier | Suggested price | Typical buyer |
| --- | --- | --- |
| Rental, per 1,000 results | $9 – $15 | installer or builder pulling a local lead list weekly |
| Rental, unlimited monthly | $39 – $59 | agency running several postcodes on a schedule |
| Pay per result | $6 – $9 per 1,000 | property data reseller topping up an existing dataset |

Position it against the alternative: a UK planning-lead reseller charges £30–£120 per month for a single postcode, and building one council scraper is a day of engineering before it breaks. This Actor is national from the first run.

### Budget cap on pay-per-result runs

When the Actor runs on a pay-per-event pricing model, it respects the maximum spend the caller sets (`ACTOR_MAX_TOTAL_CHARGE_USD`). Before each page is written it asks the Apify charging manager how many more dataset items the budget still covers, writes only those, marks `chargeLimitReached` in the run stats and stops cleanly instead of burning compute past the limit. Locally (no charging state) the check is a no-op, so `apify run` and the test suite are unaffected.

### Data source and licence

Application data comes from local authorities via [PlanIt UK](https://www.planit.org.uk) and its public JSON API. PlanIt is free to use and rate limited; this Actor paces itself so a scheduled run stays a good citizen. Council planning data is published as open data (mostly OGL); check the source council's terms before reselling records.

### Running it

```bash
apify run -i '{"localAuthorities":["Cambridge"],"daysBack":90,"maxItems":100}'
```

or press **Start** with the defaults and download the dataset as CSV, Excel or JSON.

Built for the Apify platform: `apify/actor-node:22`, `minMemoryMbytes: 512`, no browser, no proxy, no external service key.

# Actor input Schema

## `postcode` (type: `string`):

UK postcode to search around, e.g. "CB1 1PT" or "SW1A 1AA". Leave empty to search by local authority or keyword only.

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

Search radius around the postcode centre. Used only when a postcode is given.

## `localAuthorities` (type: `array`):

One or more UK councils, e.g. \["Cambridge", "Camden"]. Sub-areas are included. Partial names match: "Cambridge" also matches "Cambridgeshire".

## `daysBack` (type: `integer`):

Fetch applications received in the last N days. Ignored when startDate is set.

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

Explicit start of the date range. Overrides daysBack.

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

Explicit end of the date range. Defaults to today.

## `keywords` (type: `array`):

Case-insensitive match against the application description, e.g. \["extension","loft","solar","heat pump"]. Sent to the API as a full-text search and re-checked locally.

## `applicationTypes` (type: `array`):

PlanIt types: Full, Outline, Amendment, Conditions, Heritage, Trees, Advertising, Telecoms, Other. Leave empty for all types.

## `applicationStates` (type: `array`):

Permitted (approved), Conditions (approved with conditions), Undecided (live lead), Rejected, Withdrawn, Referred, Unresolved, Other. Leave empty for all states.

## `onlyWithAgentCompany` (type: `boolean`):

Keep only applications where a real architectural practice or planning consultancy is named in agentCompany.

## `includeExtraDetails` (type: `boolean`):

Also fetch /planapplic/{uid}@{areaId}/json per application. The list endpoint already returns the same fields, so this only helps when a council's list record is thin (one extra rate-limited request per item).

## `maxItems` (type: `integer`):

Safety cap on returned applications. 0 = unlimited.

## `minDelayMs` (type: `integer`):

Polite baseline gap between API requests. PlanIt allows roughly one request every 3 seconds; keep 3200 unless you know what you are doing.

## `concurrency` (type: `integer`):

Parallel request slots. 1 is the safe default for the PlanIt rate limit.

## Actor input object example

```json
{
  "postcode": "",
  "radiusKm": 5,
  "localAuthorities": [
    "Cambridge",
    "Camden"
  ],
  "daysBack": 30,
  "keywords": [
    "extension",
    "loft",
    "solar",
    "dwelling"
  ],
  "applicationTypes": [],
  "applicationStates": [],
  "onlyWithAgentCompany": false,
  "includeExtraDetails": false,
  "maxItems": 25,
  "minDelayMs": 3200,
  "concurrency": 1
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

Flat, CRM-ready records for all matched planning applications. One item per application, ready for 1-click CSV / Excel / HubSpot / Clay import.

## `datasetItemsCsv` (type: `string`):

The same records as a single CSV file, for Excel or a spreadsheet import.

## `runStats` (type: `string`):

Pages fetched, records scanned and matched, duplicate and detail-call counters, and how often the PlanIt rate limit was hit and how long the run waited for it.

# 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 = {
    "postcode": "",
    "radiusKm": 5,
    "localAuthorities": [
        "Cambridge"
    ],
    "daysBack": 30,
    "keywords": [],
    "applicationTypes": [],
    "applicationStates": [],
    "maxItems": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("kailouis_labs/uk-planning-applications-scraper").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 = {
    "postcode": "",
    "radiusKm": 5,
    "localAuthorities": ["Cambridge"],
    "daysBack": 30,
    "keywords": [],
    "applicationTypes": [],
    "applicationStates": [],
    "maxItems": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("kailouis_labs/uk-planning-applications-scraper").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 '{
  "postcode": "",
  "radiusKm": 5,
  "localAuthorities": [
    "Cambridge"
  ],
  "daysBack": 30,
  "keywords": [],
  "applicationTypes": [],
  "applicationStates": [],
  "maxItems": 25
}' |
apify call kailouis_labs/uk-planning-applications-scraper --silent --output-dataset

```

## MCP server setup

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

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/iIuqV6tjMWl0YYtd7/builds/cd6V2FairJpgQ9fGJ/openapi.json
