Skip to main content

Overview

This endpoint returns crime data for a specific geographic area. The data includes crime types, frequencies, and location information sourced from police.uk.

Query Parameters

ParameterTypeRequiredDescription
latnumberYesLatitude coordinate
lngnumberYesLongitude coordinate
radiusnumberNoSearch radius in metres (default: 1000, max: 5000)
startDatestringNoStart date for crime data (YYYY-MM format)
endDatestringNoEnd date for crime data (YYYY-MM format)

Response

{
  "data": {
    "crimes": [
      {
        "id": "crime_123",
        "category": "anti-social-behaviour",
        "location": {
          "latitude": 51.5074,
          "longitude": -0.1278,
          "street": {
            "id": 123,
            "name": "High Street"
          }
        },
        "month": "2024-03",
        "outcomeStatus": {
          "category": "Under investigation",
          "date": "2024-03"
        }
      }
    ],
    "summary": {
      "totalCrimes": 145,
      "byCategory": {
        "anti-social-behaviour": 45,
        "burglary": 12,
        "robbery": 8,
        "vehicle-crime": 15,
        "violent-crime": 25,
        "other-crime": 40
      },
      "period": {
        "from": "2024-01",
        "to": "2024-03"
      }
    }
  }
}

Crime Categories

  • anti-social-behaviour - Anti-social behaviour
  • burglary - Burglary
  • robbery - Robbery
  • vehicle-crime - Vehicle crime
  • violent-crime - Violence and sexual offences
  • shoplifting - Shoplifting
  • criminal-damage-arson - Criminal damage and arson
  • drugs - Drugs
  • other-theft - Other theft
  • possession-of-weapons - Possession of weapons
  • public-order - Public order
  • theft-from-the-person - Theft from the person
  • other-crime - Other crime

Example Request

import { Vepler } from '@vepler/sdk';

const vepler = new Vepler({ apiKey: process.env.VEPLER_API_KEY });

const crimeData = await vepler.safety.getCrimeData({
  lat: 51.5074,
  lng: -0.1278,
  radius: 2000,
  startDate: '2024-01',
  endDate: '2024-03'
});

console.log(crimeData.summary);

Use Cases

  • Property valuation adjustments based on local crime rates
  • Neighbourhood safety scoring
  • Area comparison for relocation decisions
  • Due diligence for property investments
  • Market analysis and reporting