# Durham Planning Properties and Details Scraper (`realestateapi/durham-planning-properties-and-details-scraper`) Actor

Durham Planning Properties and Details Scraper — Extracts public planning application search results and detail fields from Durham County Council's Idox portal.

- **URL**: https://apify.com/realestateapi/durham-planning-properties-and-details-scraper.md
- **Developed by:** [Real Estate API](https://apify.com/realestateapi) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Durham Planning Properties and Details Scraper

This Actor is disabled for source requests by default. Durham County Council's linked copyright notice restricts copying and distribution without written permission, and no reuse license covering this Actor's extraction and dataset use is recorded. Do not enable collection unless you hold written permission covering automated collection, storage, and intended use. The authorization input is an attestation, not permission. This Actor collects planning-application records, not property-sale or rental listings.

Example input:

```json
{
  "authorizationConfirmed": false,
  "mode": "search",
  "keyword": "",
  "caseStatus": "",
  "maxItems": 10
}
```

When written permission is in place, the `search` mode accepts a keyword, reference, postcode, or address and optionally filters `Current` or `Decided` applications. `query` is supported as an alias for `keyword`. `maxItems` is bounded to 1–20 and stops pagination/enrichment promptly. Each record includes a stable application key, reference, proposal, status, address, public detail/canonical URL, available dates and decision fields, document count, and extraction timestamp; unavailable optional portal fields are omitted.

The Actor uses the portal's public simple-search form and detail pages only after the authorization gate is satisfied. It does not log in or access private case information. With the default authorization setting, it reports `SUCCEEDED` / `SKIPPED_POLICY` in the `OUTPUT` summary, makes zero source requests, and writes no dataset rows.

Clean completion, including an empty search or no-query run, is `SUCCEEDED` / `COMPLETED`. A source or storage failure after one or more application rows are saved is `SUCCEEDED` / `PARTIAL`. A failure with no saved application rows is `FAILED` / `FAILED`. The dataset contains planning-application records only; bounded failure details and counts are kept in the aggregate `OUTPUT` summary. Only `FAILED` exits non-zero.

Offline validation:

```sh
node --check src/main.js
apify validate-schema
```

### Dependency security and HTTP caching

The locked dependencies require Node.js 20.18.1 or later. Implemented Actor Cloud builds use Node.js 22.

HTTP response caching is disabled throughout the SDK dependency graph by a project-owned, tested non-caching policy replacement. Responses are always fetched afresh; stale cached responses and serialized cache headers cannot be reused. This replaces the vulnerable package rather than suppressing its advisory. The locked FTP client is 6.2.1; the SDK keeps its supported interface.

The original unpatched-cache advisory is [GHSA-ch52-4w7c-c8xp](https://github.com/advisories/GHSA-ch52-4w7c-c8xp). The FTP patch is documented in [GHSA-c475-qrg2-pj4r](https://github.com/advisories/GHSA-c475-qrg2-pj4r). Project tests include actual localhost HTTP requests with a shared cache and distinct user headers. These tests make no target-site requests and do not qualify extraction.

# Actor input Schema

## `authorizationConfirmed` (type: `boolean`):

Required before any Durham portal request. Set true only if you hold written permission covering automated collection, storage, and intended use. This flag does not grant permission.

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

Durham supports public planning-application search.

## `keyword` (type: `string`):

Keyword, reference, postcode, or address text accepted by Durham's simple search.

## `query` (type: `string`):

Optional alias for keyword, retained for search-oriented integrations.

## `caseStatus` (type: `string`):

Optional Idox status filter.

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

Maximum unique applications to enrich.

## Actor input object example

```json
{
  "authorizationConfirmed": false,
  "mode": "search",
  "keyword": "",
  "caseStatus": "",
  "maxItems": 10
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("realestateapi/durham-planning-properties-and-details-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("realestateapi/durham-planning-properties-and-details-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 '{}' |
apify call realestateapi/durham-planning-properties-and-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,realestateapi/durham-planning-properties-and-details-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/GN3g3agJ7zDeaYrt9/builds/dZwGb6fgprPbMlF0V/openapi.json
