# UK Crime Stats by Postcode (data.police.uk area reports) (`owenryland/uk-crime-area-stats`) Actor

One crime report per UK postcode, district or lat/lng from official data.police.uk open data: totals, monthly average, all 14 categories, top categories, 3-month and year-on-year trends. Same 1-mile radius everywhere. Aggregated only; England, Wales and NI.

- **URL**: https://apify.com/owenryland/uk-crime-area-stats.md
- **Developed by:** [Owen Ryland](https://apify.com/owenryland) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 area 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 Crime Stats by Postcode (data.police.uk area reports)

Get **one clean crime report per area** for England, Wales and Northern Ireland, straight from **official data.police.uk open data**. Enter postcodes, postcode districts or lat/lng points. For each one you get:

- total crimes and the monthly average over up to 36 months
- counts for all 14 police.uk categories (violence and sexual offences, burglary, anti-social behaviour, shoplifting, vehicle crime…)
- the top 3 categories and the violent-crime share
- trend: last 3 months vs the previous 3, and year on year (24+ months)
- the share of crimes closed with "no suspect identified"
- a monthly series (total, anti-social behaviour, violence, burglary)
- local authority and police force

**Every report covers the same 1-mile radius**, so areas compare like for like. **No scraping, no login, no proxies.** Aggregated output only: no streets, no crime IDs and no incident locations.

### Who it's for

- Property investors, buyers and letting agents comparing areas
- Relocation, insurance and retail-site analysts
- Journalists and local content creators
- AI agents that need a quick, structured "how safe is this area" answer

### Input

| Field | Example | Notes |
|---|---|---|
| `areas` | `["BB11", "CF10 1EP", "53.78,-2.25"]` | Postcodes, districts or lat,lng. Max 100 per run. |
| `months` | `12` | 1 to 36. 24+ adds a year-on-year change. |
| `latestMonth` | `2026-08` | Optional. Defaults to the latest published month. |
| `includeMonthlyBreakdown` | `true` | |

### Output (one row per area)

```json
{
  "area": "BB11",
  "adminDistrict": "Burnley",
  "policeForce": "lancashire",
  "radius": "1 mile around the area centre",
  "firstMonth": "2024-09",
  "lastMonth": "2026-08",
  "totalCrimes": 14397,
  "avgCrimesPerMonth": 599.9,
  "violentCrime": 4352,
  "antiSocialBehaviour": 3338,
  "shoplifting": 1791,
  "burglary": 620,
  "topCategories": ["violentCrime", "antiSocialBehaviour", "shoplifting"],
  "changeLast3vsPrev3Pct": 10.9,
  "changeYearOnYearPct": -0.5,
  "noSuspectIdentifiedShare": 0.307,
  "monthly": [{ "month": "2026-08", "total": 730, "antiSocialBehaviour": 152, "violentCrime": 209, "burglary": 32 }]
}
```

*(Real output from a test run on 23 Oct 2026, 24 months. The full sample is in `test-output-sample.json`.)*

### Pricing

Pay per event: **$0.02 per area report** (all months for one area). Areas with no published data, or errors, are **not charged**. Example: 50 postcodes × 24 months = $1.00.

### Notes and limits

- **Greater Manchester:** GMP currently supplies no street-level data to data.police.uk (see the data.police.uk changelog). GMP areas return a note and are not charged.
- **Scotland** is not on data.police.uk. Scottish postcodes return a note and are not charged.
- Some forces skip a month now and then (e.g. Gloucestershire, August 2026). Missing months are listed in `monthsMissing` and left out of averages, not counted as zero.
- Northern Ireland outcomes are not published, so `noSuspectIdentifiedShare` is empty for PSNI.
- Locations in the source are approximate (anonymised "on or near" points). Counts include crimes on main roads, stations and town centres within the radius. They are counts, not rates per resident.
- A district report is centred on the district's centre point. It does not cover the whole district.
- Data lags about 2 months. Not a safety guarantee or advice.

### Data source and licence

Contains public sector information licensed under the Open Government Licence v3.0 (data.police.uk). Location lookup by postcodes.io (contains OS data © Crown copyright and database right; Royal Mail data © Royal Mail copyright and database right; ONS data © Crown copyright). Not affiliated with or endorsed by the Home Office or any police force.

### Support

Found a problem or want a feature (e.g. custom radius, stop and search, comparison to force average)? Open an issue on the Actor's **Issues** tab. Issues are answered within 2 working days.

# Actor input Schema

## `areas` (type: `array`):

Full postcodes (e.g. BB11 1NL), postcode districts (e.g. BB11, CF10) or "lat,lng" points. Each report covers crimes within 1 mile of the postcode or district centre. England, Wales and Northern Ireland. Max 100 per run.

## `months` (type: `integer`):

How many months back from the latest published month (data.police.uk keeps 36). 24 or more enables the year-on-year change.

## `latestMonth` (type: `string`):

YYYY-MM. Leave empty for the latest month published.

## `includeMonthlyBreakdown` (type: `boolean`):

Adds a 'monthly' array (total, anti-social behaviour, violent crime, burglary per month).

## Actor input object example

```json
{
  "areas": [
    "BB11",
    "CF10 1EP"
  ],
  "months": 12,
  "includeMonthlyBreakdown": true
}
```

# Actor output Schema

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

One aggregated crime report per area from data.police.uk (1-mile radius around the area centre). Areas without usable data get an unbilled row with a note or error.

# 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 = {
    "areas": [
        "BB11",
        "CF10 1EP"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("owenryland/uk-crime-area-stats").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 = { "areas": [
        "BB11",
        "CF10 1EP",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("owenryland/uk-crime-area-stats").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 '{
  "areas": [
    "BB11",
    "CF10 1EP"
  ]
}' |
apify call owenryland/uk-crime-area-stats --silent --output-dataset

```

## MCP server setup

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

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/WAUoPkHmUmFQ6KT6B/builds/jrFdMNjJtqaXdtTZg/openapi.json
