A How-To Guide to the United Kingdom's Police Data API


The Home Office of the United Kingdom is the agency responsible for the police, immigration, and the internal security service of Great Britain. The Home Office has created a police and crime data API covering England, Wales, and Northern Ireland (but not Scotland). It is possible to access information related to various local police forces, crime related information, and neighborhood specific information through this API. The API can be queried using HTML GET requests and returns JSON objects.

This guide will walkthrough the various types of data available through the API and will demonstrate by using PHP examples how to make requests for specific types of data and how to process those requests to extract the information.

There are three general categories of information available within this database.

Each of these general categories have varying levels of completeness in regards to the data that is supposed to be available to the public. In addition, subcategories of requests within these general areas sometimes share unique key identifiers. Since this API lacks any documentation about the database itself, I have attempted to identify and document the primary keys for readers so they can execute more fruitful searches against the data.

Let's begin with some queries that provide information about the data set itself.