Postcode Data API
Consolidated area intelligence including crime statistics, council tax, and demographic data for any UK postcode
Postcode data API overview
The Area Statistics API provides consolidated area intelligence for any UK postcode. It aggregates data from multiple sources including Police UK crime data, council tax band information, and postcode demographic data into a single, easy-to-consume response.
Data included in the response:
- Crime statistics — overall crime rating, crime score (0-10), last 12 months total, and category breakdown (violent, burglary, vehicle crime, antisocial). Scottish postcodes get a data zone crime rate instead (see below)
- Council tax — local authority name and tax bands A–H with annual amounts
- Demographics — Census 2021 population, households and average household size for the postcode's neighbourhood (England and Wales)
- Schools — schools within 3km: counts by phase, Ofsted Outstanding schools and a distance-weighted rating out of 10 (England)
This API is ideal for:
- Property platforms needing area context alongside listings
- Relocation services comparing different areas
- Insurance companies assessing area risk profiles
- Property investors evaluating neighbourhood quality
- Estate agents providing comprehensive area reports
Authentication
All requests to the Area Statistics API require authentication using an API key. You can obtain your API key from your PropertyInsights dashboard after subscribing to an API plan.
Include your API key in the request header as follows:
X-API-Key: your_api_key_here
Security Warning
Postcode data API endpoints
Base URL
https://propertyinsights.co.uk/api/v1/
Get Area Statistics
/area/statistics
Returns consolidated area intelligence including crime statistics, council tax bands, and demographic data for the specified postcode.
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| postcode | Required | String | UK postcode (e.g., "SW1A 1AA") |
Billing details in the response
Successful chargeable JSON responses include a top-level billing object. The endpoint examples on this page focus on the endpoint-specific data, so this repeated block may not be shown in every example.
"billing": {
"mode": "prepaid",
"creditsCharged": 1,
"creditsRemaining": 1999,
"creditsRefreshAt": "2026-08-14T09:30:00.000Z"
}| Field or header | Meaning |
|---|---|
| billing.creditsCharged X-Credits-Charged | Credits charged by this call. Failed and non-chargeable calls return 0 in the header. |
| billing.creditsRemaining X-Credits-Remaining | The credit balance after the call. |
| billing.creditsRefreshAt X-Credits-Refresh-At | The next monthly credit refresh as an ISO 8601 timestamp. Trial and non-renewing balances return null and omit the header. |
All authenticated API-key calls expose the billing headers, including validation errors and zero-credit status or management requests. Only successful chargeable JSON responses add the billing object to the response body.
When credits run out
If your balance is lower than the cost of a request, the API returns HTTP 402 and charges nothing. The error includes the credits needed, your balance and a link to change plan.
{
"statusCode": 402,
"statusMessage": "Payment Required",
"data": {
"success": false,
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "This request costs 35 API credits. Upgrade your plan or wait for your monthly refresh: https://propertyinsights.co.uk/billing",
"required": 35,
"available": 12,
"upgradeUrl": "https://propertyinsights.co.uk/billing"
}
}
}Response Format
The response is returned in JSON format with the following top-level structure:
{
"success": true,
"data": {
"demographics": { ... },
"amenities": { ... },
"crime": { ... },
"schools": { ... },
"transport": { ... }
}
}crime
Crime statistics for the area based on Police UK data from the last 12 months.
{
"overall": "Moderate",
"score": 5.5,
"last12Months": 452,
"changeVsPreviousYear": null,
"breakdown": {
"violent": 120,
"burglary": 34,
"vehicleCrime": 28,
"antisocial": 89,
"other": 181
},
"comparedToNational": null
}changeVsPreviousYear and comparedToNational are always null for England and Wales. For percentiles against other areas, use the crime by postcode API.
Police Scotland does not publish street-level crime, so Scottish postcodes get the recorded crime rate for their 2011 data zone from the SIMD 2020v2 crime domain (Scottish Government). It counts crimes of violence, sexual offences, domestic housebreaking, vandalism, drugs offences and common assault per 10,000 people. It is an area rate, not a count of incidents near the postcode, so score, last12Months, changeVsPreviousYear and breakdown are null. overall follows the crime domain decile: 1 to 3 is High, 8 to 10 is Low. About 500 data zones have suppressed figures and return crime: null.
{
"overall": "High",
"score": null,
"last12Months": null,
"changeVsPreviousYear": null,
"breakdown": null,
"comparedToNational": "Crime domain decile 2 of 10 across Scottish data zones (1 has the highest recorded crime rate)",
"basis": "simd-2020v2-data-zone",
"areaRate": {
"dataZone": { "code": "S01010379", "name": "Kelvingrove and University - 06" },
"recordedCrimesPer10k": 573.2,
"recordedCrimes": 70.3,
"crimeDomainRank": 752,
"crimeDomainDecile": 2,
"scotlandDataZoneCount": 6976,
"source": "SIMD 2020v2 crime domain (Scottish Government)",
"definition": "Recorded crimes of violence, sexual offences, ..."
}
}demographics
Census 2021 totals for the postcode's LSOA in England and Wales. The other fields are always null, and every field is null in Scotland. For the full census breakdown, use the demographics API.
{
"population": 1643,
"populationDensity": null,
"medianAge": null,
"households": 702,
"averageHouseholdSize": 2.34,
"employmentRate": null,
"medianIncome": null
}schools
Schools within 3km of the postcode. averageRating is the Ofsted rating of each school on a 0 to 10 scale, weighted towards closer schools. Fields are null where no school has an Ofsted rating, which includes Scotland and Wales.
{
"averageRating": 7.8,
"primary": 14,
"secondary": 4,
"ofstedOutstanding": 3,
"topSchools": [
{ "name": "Example Primary School", "phase": "Primary", "ofstedRating": "Outstanding", "distance": 0.6 }
]
}transport
These fields, and those in amenities, are always null. For the nearest stations, shops and health services, use the nearest amenities API.
{
"tubeStations": null,
"railStations": null,
"busRoutes": null,
"cycleHireStations": null,
"averageCommuteToCity": null,
"trafficLevel": null
}Examples
Basic Request
GET https://propertyinsights.co.uk/api/v1/area/statistics?postcode=SW1A%202AA
Request example
curl -X GET "https://propertyinsights.co.uk/api/v1/area/statistics?postcode=SW1A%202AA" \
-H "x-api-key: YOUR_API_KEY"Error Handling
The API uses standard HTTP status codes to indicate the success or failure of requests.
| Code | Error Code | Description |
|---|---|---|
| 400 | MISSING_POSTCODE | Postcode parameter is required |
| 401 | UNAUTHORIZED | API key is missing or invalid |
| 402 | INSUFFICIENT_CREDITS | Insufficient API credits to process this request |
| 500 | INTERNAL_ERROR | An error occurred while fetching area statistics |
Error Response Example
{
"success": false,
"error": {
"code": "MISSING_POSTCODE",
"message": "Postcode parameter is required"
}
}Need Help?
If you need assistance with implementation or have questions about the API, our support team is here to help.