House Prices by Postcode API

Complete sold price history for any UK postcode area, with filtering by postcode, street, property type, price range, and pagination

REST API
JSON Responses
API Key Authentication
1 Credit Per API Call

House prices by postcode API overview

The Area Sold Prices API provides access to the complete Land Registry Price Paid dataset for any UK postcode area. Unlike the radius-based Sold Prices API, this endpoint queries directly from our database of millions of property transactions, supporting pagination, street-level filtering, and comprehensive query options.

Data included in the response:

  • Individual sold prices — full address, price, date, property type, new build status, estate type (freehold/leasehold), street, town, district, and county
  • Summary statistics — total results, average price, median price, price range, and breakdown by property type
  • Pagination — offset-based pagination for iterating through large result sets

This API is ideal for:

  • Bulk analysis of sold prices across an entire postcode area
  • Market research tools comparing areas or streets
  • Property investment analysis with granular filtering
  • Data pipelines requiring paginated access to sold price data
  • Street-level price analysis within an area

How is this different from the Sold Prices API? The Sold Prices API uses a radius-based search around a postcode via the Land Registry SPARQL endpoint. This Area Sold Prices API queries our complete local database of Land Registry Price Paid records by postcode area, offering higher result limits, pagination, and street-level filtering.

Scotland: Land Registry data covers England and Wales only. For Scottish postcodes and districts the API returns Registers of Scotland area statistics instead: sales count, mean, median, lower and upper quartile price by calendar year for the 2011 data zone, electoral ward and council area of a postcode (or the council areas covering a district), plus Scotland. These are area figures, not individual sales, so properties is empty. The latest published year is currently 2023 and RoS updates the series once a year.

Authentication

All requests to the Area Sold Prices 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

Never expose your API key in client-side code. Always make API calls from your server-side application to protect your credentials.

House prices by postcode API endpoints

Base URL

https://propertyinsights.co.uk/api/v1/

Get Area Sold Prices

GET
/area/sold-prices

Returns sold prices for a postcode area with optional filtering by postcode, street, property type, price range, and new build status. Supports pagination via offset and limit parameters.

Request Parameters

ParameterRequiredTypeDescription
areaRequired*StringPostcode area code (e.g. "SW1", "M1", "BS8")
postcodeRequired*StringFull UK postcode (e.g. "SW1A 1AA"). Area is inferred and results are filtered to this exact postcode.
streetOptionalStringStreet name filter (partial match, case-insensitive)
monthsOptionalIntegerLookback period in months (default: 24, max: 360)
limitOptionalIntegerMaximum results to return (default: 100, max: 500)
offsetOptionalIntegerPagination offset (default: 0)
typeOptionalStringProperty type: D (Detached), S (Semi-Detached), T (Terraced), F (Flat), O (Other)
minPriceOptionalIntegerMinimum sold price filter in GBP
maxPriceOptionalIntegerMaximum sold price filter in GBP
newBuildOptionalBooleanFilter to new builds only when set to true

* Either area or postcode is required. If postcode is provided, the area is extracted automatically and results are filtered to that exact postcode. You can combine area with street for street-level analysis within an area.

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 headerMeaning
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 structure:

{
  "success": true,
  "data": {
    "area": "SW1",
    "postcode": null,
    "street": null,
    "period": "24 months",
    "totalResults": 1250,
    "returned": 100,
    "offset": 0,
    "summary": {
      "averagePrice": 850000,
      "medianPrice": 725000,
      "priceRange": { "min": 150000, "max": 5200000 },
      "byPropertyType": {
        "D": { "count": 45, "avgPrice": 1200000 },
        "S": { "count": 120, "avgPrice": 650000 },
        "T": { "count": 310, "avgPrice": 580000 },
        "F": { "count": 775, "avgPrice": 420000 }
      }
    },
    "properties": [ ... ]
  }
}

properties (array)

Each item represents a single property sale from the Land Registry.

{
  "address": "12 High Street, London, SW1A 1AA",
  "postcode": "SW1A 1AA",
  "price": 750000,
  "date": "2025-06-15",
  "propertyType": "T",
  "newBuild": false,
  "estateType": "Freehold",
  "street": "High Street",
  "town": "London",
  "district": "Westminster",
  "county": "Greater London"
}

Scottish response

Scottish requests keep the same top-level keys and add nation, basis and scotland. months sets how many of the latest published years are returned (24 months gives 2 years). Street, property type, price and new build filters are not applied. Prices are null for a year with fewer than 5 sales. The summary uses the smallest area with published prices in the latest year. Illustrative figures for a fictional postcode:

{
  "success": true,
  "data": {
    "area": "PH99",
    "postcode": "PH99 9ZZ",
    "street": null,
    "period": "24 months",
    "nation": "Scotland",
    "basis": "ros-area-statistics",
    "totalResults": 0,
    "returned": 0,
    "offset": 0,
    "summary": {
      "averagePrice": 214500,
      "medianPrice": 192000,
      "priceRange": null,
      "byPropertyType": {},
      "area": { "type": "dataZone", "code": "S01099991", "name": "Example Glen - 01", "year": 2023 }
    },
    "properties": [],
    "scotland": {
      "note": "Individual Scottish sales are not available from Land Registry data. ...",
      "latestYear": 2023,
      "areas": [
        {
          "type": "dataZone",
          "code": "S01099991",
          "name": "Example Glen - 01",
          "years": [
            { "year": 2022, "salesCount": 21, "meanPrice": 205000, "medianPrice": 185000, "lowerQuartilePrice": 150000, "upperQuartilePrice": 240000 },
            { "year": 2023, "salesCount": 24, "meanPrice": 214500, "medianPrice": 192000, "lowerQuartilePrice": 158000, "upperQuartilePrice": 251000 }
          ]
        },
        { "type": "ward", "code": "S13099991", "name": "Example Ward", "years": [ ... ] },
        { "type": "councilArea", "code": "S12099991", "name": "Example Council", "years": [ ... ] },
        { "type": "country", "code": "S92000003", "name": "Scotland", "years": [ ... ] }
      ]
    },
    "source": {
      "name": "Registers of Scotland, House Prices - Residential Properties Sales and Price",
      "url": "https://data.gov.scot/dataset/house_prices___residential_properties_sales_and_price",
      "licence": "Open Government Licence v3.0",
      "attribution": "Contains Registers of Scotland data, Crown copyright and database right."
    }
  }
}

For a district (area=PH99) the areas are the council areas that contain the district's postcodes, most postcodes first, each with a postcodeCount, then Scotland.

Property Type Codes

CodeProperty Type
DDetached
SSemi-Detached
TTerraced
FFlat/Maisonette
OOther

Examples

Basic Area Query

GET https://propertyinsights.co.uk/api/v1/area/sold-prices?area=SW1

Full Postcode Query

GET https://propertyinsights.co.uk/api/v1/area/sold-prices?postcode=SW1A%201AA

Street-Level Search

GET https://propertyinsights.co.uk/api/v1/area/sold-prices?area=SW1&street=High%20Street&type=T

Filtered with Pagination

GET https://propertyinsights.co.uk/api/v1/area/sold-prices?area=M1&type=F&minPrice=100000&maxPrice=300000&limit=50&offset=100

Request example

curl -X GET "https://propertyinsights.co.uk/api/v1/area/sold-prices?area=BS8&months=12&type=D&limit=50" \
  -H "x-api-key: YOUR_API_KEY"

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of requests.

CodeError CodeDescription
400MISSING_AREA_OR_POSTCODEEither area or postcode parameter is required
400INVALID_AREAInvalid postcode area format
400INVALID_PROPERTY_TYPEProperty type must be D, S, T, F, or O
400INVALID_POSTCODEA Scottish postcode must be a full postcode
401UNAUTHORIZEDAPI key is missing or invalid
402INSUFFICIENT_CREDITSInsufficient API credits to process this request
404POSTCODE_NOT_FOUND / AREA_NOT_FOUNDThe Scottish postcode or district is not in the postcode lookups
404NO_STATISTICS_FOUNDNo Registers of Scotland statistics for the Scottish areas found
500DATABASE_ERRORAn error occurred while querying sold prices

Error Response Example

{
  "success": false,
  "error": {
    "code": "MISSING_AREA_OR_POSTCODE",
    "message": "Either area or 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.