Skip to main content

Overview

This endpoint returns aggregated crime statistics for a specific area, including trends, comparisons, and safety ratings.

Query Parameters

ParameterTypeRequiredDescription
latnumberYesLatitude coordinate
lngnumberYesLongitude coordinate
radiusnumberNoSearch radius in metres (default: 1000, max: 5000)
periodstringNoTime period: 3months, 6months, 12months (default: 12months)

Response

{
  "data": {
    "location": {
      "latitude": 51.5074,
      "longitude": -0.1278,
      "radius": 1000
    },
    "period": {
      "from": "2023-04",
      "to": "2024-03",
      "months": 12
    },
    "statistics": {
      "totalCrimes": 1847,
      "crimesPerMonth": 154,
      "crimeRate": 65.4,
      "byCategory": {
        "anti-social-behaviour": {
          "count": 567,
          "percentage": 30.7,
          "trend": "decreasing"
        },
        "burglary": {
          "count": 123,
          "percentage": 6.7,
          "trend": "stable"
        },
        "violent-crime": {
          "count": 298,
          "percentage": 16.1,
          "trend": "increasing"
        }
      }
    },
    "trends": {
      "overall": "stable",
      "monthlyData": [
        {
          "month": "2023-04",
          "count": 142
        },
        {
          "month": "2023-05",
          "count": 156
        }
      ]
    },
    "comparison": {
      "vsNational": {
        "difference": -12.3,
        "status": "below_average"
      },
      "vsRegion": {
        "difference": -5.2,
        "status": "below_average"
      }
    },
    "safetyRating": {
      "score": 72,
      "grade": "B",
      "description": "Good safety levels compared to national average"
    }
  }
}

Safety Rating Grades

GradeScore RangeDescription
A+90-100Excellent - Very low crime rates
A80-89Very Good - Below average crime
B70-79Good - Moderately safe
C60-69Average - Typical crime levels
D50-59Below Average - Higher crime
E0-49Poor - Significantly high crime

Trend Values

  • increasing - Crime rate is rising
  • stable - Crime rate is stable
  • decreasing - Crime rate is falling

Example Request

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

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

const stats = await vepler.safety.getCrimeStats({
  lat: 51.5074,
  lng: -0.1278,
  radius: 1500,
  period: '12months'
});

console.log(`Safety Rating: ${stats.safetyRating.grade}`);
console.log(`Crime Rate: ${stats.statistics.crimeRate} per 1000 residents`);
console.log(`Trend: ${stats.trends.overall}`);

Use Cases

  • Property listing enhancements with safety scores
  • Area comparison tools
  • Investment risk assessment
  • Market reports with neighbourhood analysis
  • Automated valuation models (AVMs) incorporating crime data