# UK Crime Data by Postcode - Street-Level Reports & Trends (`devon_gtme/police-uk-crime`) Actor

Pull street-level crime around any UK postcode or lat/lng (1-mile) from the official data.police.uk API: category, month, street, coordinates and outcome, plus a per-location summary and trend. Area crime intelligence for property, relocation, insurance and journalism. No API key needed.

- **URL**: https://apify.com/devon\_gtme/police-uk-crime.md
- **Developed by:** [Devon Kellar](https://apify.com/devon_gtme) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 crimes

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## UK Crime Data by Postcode - Street-Level Reports & Trends

Turn any list of **UK postcodes** (or lat/lng points) into **area crime intelligence** - straight from the official UK Police API (data.police.uk). Each location gets every individual street-level crime within a ~1-mile radius **plus a ready-made summary record**: total crimes, breakdown by category, top category, and month-over-month trend.

No API key, no login, no scraping - this runs on the free official Police data service.

### Who uses this data

- **Property firms & due diligence** - crime profile for any address before a purchase, letting decision, or development appraisal. Batch a whole portfolio of postcodes in one run.
- **Relocation & lettings services** - "how safe is this area?" answered with official numbers, not vibes. Drop the summary straight into client reports.
- **Security companies** - rank sales territories by burglary, vehicle crime, or robbery counts; pitch prospects with their own street's data.
- **Insurers & risk models** - structured category counts and trends per location, ready to join onto your book.
- **Journalists & researchers** - verifiable, citable official figures per neighbourhood, with month-over-month movement.

### What you get

**Per-crime records** (`recordType: "crime"`):

| Field | Example |
|---|---|
| `location` | M1 1AD (your input label) |
| `category` | burglary |
| `month` | 2026-05 |
| `streetName` | On or near Shopping Area |
| `latitude` / `longitude` | 53.4796, -2.2367 |
| `outcomeStatus` | Investigation complete; no suspect identified |
| `persistentId` | 64-char stable crime ID |

**Per-location summary records** (`recordType: "summary"`) - the headline product:

| Field | Example |
|---|---|
| `totalCrimes` | 1893 |
| `byCategory` | { "violent-crime": 412, "shoplifting": 300, ... } |
| `topCategory` | violent-crime |
| `crimesPerMonth` | [{ "month": "2026-03", "count": 1720 }, ...] |
| `momChange` / `momChangePct` / `trend` | +112 / +6.3% / up |

Use the **Summaries** dataset view for the per-location rollups and the **Crimes** view for the raw incidents.

### How to use

1. Add postcodes and/or `lat,lng` pairs to **Locations** - one per area you care about. Bad postcodes are skipped with a warning, never crash the run.
2. Set **Months of data**: `1` for a snapshot of the latest month, `3`+ for trend analysis (month-over-month change is computed automatically).
3. Optionally restrict **Crime categories** (burglary only, vehicle crime only, etc.). Empty = all crime.
4. [Schedule](https://docs.apify.com/platform/schedules) it monthly to keep a rolling crime feed for your patch.

### Set your expectations: the data lags ~1-2 months

Police forces publish street-level data on a delay - in mid-July, the newest available month is typically **May**. This is a property of the official dataset, not this actor. The actor detects the latest published month automatically and counts back from there, so you always get the freshest data that exists. Crime locations are also **anonymised to the nearest map point** ("On or near ...") by the police, so coordinates identify streets, not exact addresses.

One known coverage gap: **Greater Manchester Police** has not supplied full crime data to data.police.uk for several years, so Manchester-area locations return very low counts. All other England, Wales, and Northern Ireland forces publish normally (Scotland is not covered by this dataset).

### Export & integrations

Results land in an Apify dataset - export **CSV, Excel, JSON**, or connect Google Sheets, Make, Zapier, Slack, and webhooks via Apify integrations.

### Data source & licence

Data comes from the [UK Police API](https://data.police.uk/) (data.police.uk), covering England, Wales, and Northern Ireland, and is available under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). Postcode geocoding via [postcodes.io](https://postcodes.io/). This actor is not affiliated with the Home Office or any police force.

---

**Need something more custom?** Custom-drawn area polygons instead of a 1-mile radius, crime data joined to property listings, per-force outcome deep-dives, stop-and-search data, or a fully managed monitoring pipeline - message me via my Apify profile and I'll build it.

# Actor input Schema

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

UK postcodes (e.g. 'M1 1AD') and/or 'lat,lng' pairs (e.g. '51.5074,-0.1278'). Each location covers a ~1-mile radius. Postcodes are geocoded free via postcodes.io. Bad postcodes are skipped with a warning.
## `monthsBack` (type: `integer`):

How many months of data to pull, counting back from the LATEST AVAILABLE month (police data lags ~1-2 months behind the calendar — the actor detects the latest published month automatically). 1 = latest month only; 3+ recommended for trend analysis.
## `categories` (type: `array`):

Restrict to specific crime categories. Leave empty for ALL crime.
## `maxResults` (type: `integer`):

Cap on individual crime records pushed to the dataset. Per-location summary records are always pushed and always count ALL crimes fetched, even past this cap. A busy city-centre location can have 1,500-2,000+ crimes per month.

## Actor input object example

```json
{
  "locations": [
    "M1 1AD",
    "51.5074,-0.1278"
  ],
  "monthsBack": 1,
  "maxResults": 10000
}
````

# 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": [
        "M1 1AD",
        "51.5074,-0.1278"
    ],
    "monthsBack": 1,
    "maxResults": 10000
};

// Run the Actor and wait for it to finish
const run = await client.actor("devon_gtme/police-uk-crime").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": [
        "M1 1AD",
        "51.5074,-0.1278",
    ],
    "monthsBack": 1,
    "maxResults": 10000,
}

# Run the Actor and wait for it to finish
run = client.actor("devon_gtme/police-uk-crime").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "M1 1AD",
    "51.5074,-0.1278"
  ],
  "monthsBack": 1,
  "maxResults": 10000
}' |
apify call devon_gtme/police-uk-crime --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=devon_gtme/police-uk-crime",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "UK Crime Data by Postcode - Street-Level Reports & Trends",
        "description": "Pull street-level crime around any UK postcode or lat/lng (1-mile) from the official data.police.uk API: category, month, street, coordinates and outcome, plus a per-location summary and trend. Area crime intelligence for property, relocation, insurance and journalism. No API key needed.",
        "version": "0.1",
        "x-build-id": "ko9bIUw1XQusZqe19"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/devon_gtme~police-uk-crime/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-devon_gtme-police-uk-crime",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/devon_gtme~police-uk-crime/runs": {
            "post": {
                "operationId": "runs-sync-devon_gtme-police-uk-crime",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/devon_gtme~police-uk-crime/run-sync": {
            "post": {
                "operationId": "run-sync-devon_gtme-police-uk-crime",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "locations"
                ],
                "properties": {
                    "locations": {
                        "title": "Locations (postcodes or lat,lng)",
                        "type": "array",
                        "description": "UK postcodes (e.g. 'M1 1AD') and/or 'lat,lng' pairs (e.g. '51.5074,-0.1278'). Each location covers a ~1-mile radius. Postcodes are geocoded free via postcodes.io. Bad postcodes are skipped with a warning.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "monthsBack": {
                        "title": "Months of data",
                        "minimum": 1,
                        "maximum": 36,
                        "type": "integer",
                        "description": "How many months of data to pull, counting back from the LATEST AVAILABLE month (police data lags ~1-2 months behind the calendar — the actor detects the latest published month automatically). 1 = latest month only; 3+ recommended for trend analysis.",
                        "default": 1
                    },
                    "categories": {
                        "title": "Crime categories",
                        "type": "array",
                        "description": "Restrict to specific crime categories. Leave empty for ALL crime.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "anti-social-behaviour",
                                "bicycle-theft",
                                "burglary",
                                "criminal-damage-arson",
                                "drugs",
                                "other-theft",
                                "possession-of-weapons",
                                "public-order",
                                "robbery",
                                "shoplifting",
                                "theft-from-the-person",
                                "vehicle-crime",
                                "violent-crime",
                                "other-crime"
                            ],
                            "enumTitles": [
                                "Anti-social behaviour",
                                "Bicycle theft",
                                "Burglary",
                                "Criminal damage and arson",
                                "Drugs",
                                "Other theft",
                                "Possession of weapons",
                                "Public order",
                                "Robbery",
                                "Shoplifting",
                                "Theft from the person",
                                "Vehicle crime",
                                "Violence and sexual offences",
                                "Other crime"
                            ]
                        }
                    },
                    "maxResults": {
                        "title": "Max crime records",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Cap on individual crime records pushed to the dataset. Per-location summary records are always pushed and always count ALL crimes fetched, even past this cap. A busy city-centre location can have 1,500-2,000+ crimes per month.",
                        "default": 10000
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
