Custom Connector

UK Police Data Connector

UK

The UK Police Data Connector facilitates seamless integration with the UK Police Data API, providing access to police-related data including neighbourhood teams, upcoming events, street-level crime and outcome data, and nearest police stations for UK police forces. It acts as a proxy for force details, crime data, neighbourhood information, and stop-and-search records.

Type
Virtual machines, Single VM, BYOL
Runs on
Google Compute Engine
Last update
24 Oct 2024
Category
Integration
Overview

Integration Overview

This document provides a detailed guide for each integration point, its purpose, configuration, and workflow support using the UK Police Data Connector on Google Cloud Platform.

  • listForces. List all UK police forces.
  • getForce. Details for a specific police force.
  • getForceSeniorOfficers. Senior officers for a police force.
  • getStreetLevelCrimes. Street-level crime data for an area or polygon.
  • getCrimesStreetDates. Available dates for street-level crime data.
  • getStreetLevelOutcomes. Street-level crime outcomes for a location.
  • getCrimesAtLocation. Crimes at a specific location.
  • getCrimesNoLocation. Crimes without specific location data.
  • getCrimeCategories. Available crime categories.
  • getCrimeLastUpdated. Last-updated date for crime data.
  • getOutcomesForCrime. Outcomes for a specific crime.
  • listNeighbourhoods. Neighbourhoods for a police force.
  • getNeighbourhood. Details for a specific neighbourhood.
  • getNeighbourhoodBoundary. Geographic boundary for a neighbourhood.
  • getNeighbourhoodTeam. Team members for a neighbourhood.
  • getNeighbourhoodEvents. Upcoming events for a neighbourhood.
  • getNeighbourhoodPriorities. Policing priorities for a neighbourhood.
  • locateNeighbourhood. Locate a neighbourhood by coordinates.
  • getStopAndSearchesByArea. Stop-and-search records for an area.
  • getStopAndSearchesAtLocation. Stop-and-search records at a location.
  • getStopAndSearchesNoLocation. Stop-and-search records without location.
  • getStopAndSearchesByForce. Stop-and-search records for a force.
Documentation

Detailed Integration Documentation

List All Police Forces

ActionlistForces
PurposeRetrieves a comprehensive list of all UK police forces. The primary entry point for police-force data.
ParametersRequired:
None. Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with id and name. Failure: HTTP 404/500 with error message.
Workflow exampleExecute listForces, then use the result to select a force for crime-data queries.

Get Specific Police Force

ActiongetForce
PurposeRetrieves details for a specific UK police force.
ParametersRequired:
id (police force ID, e.g. metropolitan). Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON object with id and name. Failure: error details (invalid-id).
Workflow exampleExecute getForce with id=metropolitan, then use the details for reporting.

Get Senior Officers

ActiongetForceSeniorOfficers
PurposeRetrieves senior officers for a specific police force.
ParametersRequired:
id (police force ID). Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with name, rank, bio. Failure: error details (invalid-id).
Workflow exampleExecute getForceSeniorOfficers with id=metropolitan, then display leadership info in a dashboard.

Get Street-Level Crimes

ActiongetStreetLevelCrimes
PurposeRetrieves street-level crime data for a specified area or polygon.
ParametersRequired:
at least one of lat/lng or poly. Optional:
lat, lng, poly (lat,lng:lat,lng:…), date (YYYY-MM).
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of crime objects (id, category, location, date). Failure: error details (invalid-parameters).
Workflow exampleExecute getStreetLevelCrimes with lat=51.5074, lng=-0.1278, date=2023-01, then map crime locations.

Get Available Crime Dates

ActiongetCrimesStreetDates
PurposeRetrieves available dates for street-level crime data.
ParametersRequired:
None. Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of strings (e.g. [“2023-01”, “2023-02”]). Failure: HTTP 500.
Workflow exampleExecute getCrimesStreetDates, then select a valid date for crime queries.

Get Street-Level Outcomes

ActiongetStreetLevelOutcomes
PurposeRetrieves street-level crime outcomes for a specified location.
ParametersRequired:
at least one of location_id, lat/lng, or poly. Optional:
location_id, lat, lng, poly, date.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with crime_id, outcome, date. Failure: error details (invalid-parameters).
Workflow exampleExecute getStreetLevelOutcomes with lat, lng, and date, then analyze outcomes in BigQuery.

Get Crimes at Location

ActiongetCrimesAtLocation
PurposeRetrieves crimes at a specific location.
ParametersRequired:
at least one of location_id or lat/lng. Optional:
location_id, lat, lng, date.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of crime objects. Failure: error details (invalid-location).
Workflow exampleExecute getCrimesAtLocation with location_id and date, then visualize in a dashboard.

Get Crimes with No Location

ActiongetCrimesNoLocation
PurposeRetrieves crimes without specific location data, for force-wide analysis.
ParametersRequired:
category, force. Optional:
date.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of crime objects. Failure: error details (invalid-category).
Workflow exampleExecute getCrimesNoLocation with category=burglary, force=metropolitan, date=2023-01.

Get Crime Categories

ActiongetCrimeCategories
PurposeRetrieves available crime categories.
ParametersRequired:
None. Optional:
date.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with url and name. Failure: HTTP 500.
Workflow exampleExecute getCrimeCategories with date=2023-01, then populate a category selector.

Get Last Updated Date

ActiongetCrimeLastUpdated
PurposeRetrieves the last-updated date for crime data.
ParametersRequired:
None. Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON object with date. Failure: HTTP 500.
Workflow exampleExecute getCrimeLastUpdated to verify data freshness before querying.

Get Outcomes for Crime

ActiongetOutcomesForCrime
PurposeRetrieves outcomes for a specific crime.
ParametersRequired:
persistent_id (crime ID). Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with crime_id, outcome, date. Failure: error details (invalid-crime-id).
Workflow exampleExecute getOutcomesForCrime with persistent_id, then display resolution details.

List Neighbourhoods

ActionlistNeighbourhoods
PurposeRetrieves a list of neighbourhoods for a specific police force.
ParametersRequired:
force (police force ID). Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with id, name, force. Failure: error details (invalid-force).
Workflow exampleExecute listNeighbourhoods with force=leicestershire, then populate a neighbourhood selector.

Get Neighbourhood Details

ActiongetNeighbourhood
PurposeRetrieves details for a specific neighbourhood.
ParametersRequired:
force, id. Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON object with id, name, force. Failure: error details (invalid-neighbourhood).
Workflow exampleExecute getNeighbourhood with force and id, then display neighbourhood details.

Get Neighbourhood Boundary

ActiongetNeighbourhoodBoundary
PurposeRetrieves the geographic boundary for a neighbourhood.
ParametersRequired:
force, id. Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with latitude and longitude. Failure: error details (invalid-neighbourhood).
Workflow exampleExecute getNeighbourhoodBoundary, then use the boundary data for mapping.

Get Neighbourhood Team

ActiongetNeighbourhoodTeam
PurposeRetrieves team members for a neighbourhood.
ParametersRequired:
force, id. Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with name, rank, contact_details. Failure: error details (invalid-neighbourhood).
Workflow exampleExecute getNeighbourhoodTeam, then display team member details in a community portal.

Get Neighbourhood Events

ActiongetNeighbourhoodEvents
PurposeRetrieves upcoming events for a neighbourhood.
ParametersRequired:
force, id. Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with title, date, location. Failure: error details (invalid-neighbourhood).
Workflow exampleExecute getNeighbourhoodEvents, then display events in a calendar application.

Get Neighbourhood Priorities

ActiongetNeighbourhoodPriorities
PurposeRetrieves policing priorities for a neighbourhood.
ParametersRequired:
force, id. Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with issue and action. Failure: error details (invalid-neighbourhood).
Workflow exampleExecute getNeighbourhoodPriorities, then display priorities in a public portal.

Locate Neighbourhood by Coordinates

ActionlocateNeighbourhood
PurposeLocates a neighbourhood by geographic coordinates.
ParametersRequired:
q (lat,lng, e.g. 51.500617,-0.124629). Optional:
None.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON object with id, name, force. Failure: error details (invalid-coordinates).
Workflow exampleExecute locateNeighbourhood with q, then use the result for further queries.

Get Stop and Searches by Area

ActiongetStopAndSearchesByArea
PurposeRetrieves stop-and-search records for a specified area.
ParametersRequired:
at least one of lat/lng or poly. Optional:
lat, lng, poly, date.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with type, datetime, location, outcome. Failure: error details (invalid-parameters).
Workflow exampleExecute getStopAndSearchesByArea with lat, lng, date, then analyze in BigQuery.

Get Stop and Searches at Location

ActiongetStopAndSearchesAtLocation
PurposeRetrieves stop-and-search records at a specific location.
ParametersRequired:
location_id. Optional:
date.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with type, datetime, location, outcome. Failure: error details (invalid-location).
Workflow exampleExecute getStopAndSearchesAtLocation with location_id and date, then store results for reporting.

Get Stop and Searches with No Location

ActiongetStopAndSearchesNoLocation
PurposeRetrieves stop-and-search records without specific location data.
ParametersRequired:
force. Optional:
date.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with type, datetime, outcome. Failure: error details (invalid-force).
Workflow exampleExecute getStopAndSearchesNoLocation with force and date for force-wide trends.

Get Stop and Searches by Force

ActiongetStopAndSearchesByForce
PurposeRetrieves stop-and-search records for a specific police force.
ParametersRequired:
force. Optional:
date.
ConfigurationConfigure the base URL via CONNECTOR_ENV_UKPOLICEDATA_BASE_URL (e.g. https://data.police.uk/api).
OutputSuccessful: JSON array of objects with type, datetime, location, outcome. Failure: error details (invalid-force).
Workflow exampleExecute getStopAndSearchesByForce with force and date for force-level reporting.

Example Workflow: Crime and Neighbourhood Analysis

Retrieve police forcesUse listForces and identify a target force (e.g. metropolitan).
Query neighbourhoodsExecute listNeighbourhoods with force=metropolitan and select a neighbourhood.
Fetch crime dataUse getStreetLevelCrimes with lat, lng, and date to retrieve and map crimes.
Analyze outcomesExecute getStreetLevelOutcomes and store results in BigQuery for trend analysis.
Enhance UIUse getNeighbourhoodEvents and getNeighbourhoodPriorities to power a community-engagement UI.
Support

For technical support, contact custom-connectors-support@isolutions.sa.

free consultation

Schedule a Free Consultation With Our Specialists

Book a free demo
request

Begin Your Adventure With Experienced Professionals

Send request
help desk

Do You Have Questions or Want More Information? Call Now.

Contact support