---
name: uk-police-data-api-ingestion
description: "How to get UK Police Data API data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load UK street-level crime into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/uk-police-data-api
Provider: https://data.police.uk/docs/
Checked against the provider's documentation: 2026-11-01

## Access
- No account or key. The API returns JSON over public GET and POST endpoints.
- The API limit is 15 requests per second on average with a burst of 30.

## Request
```bash
curl 'https://data.police.uk/api/crimes-street/all-crime?lat=52.629729&lng=-1.131592&date=2026-08'
```

## Format
JSON array of crimes with category, persistent and API IDs, month, location type, approximate coordinates and street, context and latest outcome status.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""UK Police street-level crimes near central Leicester -> pandas -> Parquet. No key."""
import requests
import pandas as pd

URL = "https://data.police.uk/api/crimes-street/all-crime"
PARAMS = {"lat": 52.629729, "lng": -1.131592, "date": "2026-08"}
r = requests.get(URL, params=PARAMS, timeout=60)
r.raise_for_status()
df = pd.json_normalize(r.json(), sep="_")
df["month"] = pd.to_datetime(df["month"], format="%Y-%m")
df.to_parquet("uk_police_leicester_2026_08.parquet", index=False)
print(len(df), "crimes", df["category"].nunique(), "categories",
      df["month"].min().strftime("%Y-%m"))
```
Run by us on 2026-11-01 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 1772 crimes 14 categories 2026-08

## Limits
- Rate limit: 15 requests per second on average with a burst of 30.
- Point street-crime requests cover a one-mile radius.
- A custom polygon containing more than 10,000 crimes returns HTTP 503.

## Quirks
- Street and coordinate values are approximate and are not exact incident locations.
- month has month precision; the day used by the last-updated endpoint is irrelevant.
- The id field belongs to the API and is not a police identifier; persistent_id is the stable crime identifier when populated.
- Coverage varies by force and month, so check the availability endpoint and changelog before comparing regions.

## Terms and attribution
- The crime data is offered under the Open Government Licence v3.0.
- Reuse requires source acknowledgement; the licence excludes items such as personal data and third-party rights.
- Terms page: https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/

## Sources
- https://data.police.uk/docs/authentication/: "The Police API no longer requires authentication."
- https://data.police.uk/docs/api-call-limits/: "15 requests per second with a burst of 30"
- https://data.police.uk/docs/method/crime-last-updated/: "Crime data in the API is updated once a month."
- https://data.police.uk/docs/method/crime-street/: "If a custom area contains more than 10,000 crimes, the API will return a 503 status code."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
