# UK Sold House Prices (Land Registry Price Paid) (`leathered_luna/uk-land-registry-sold-prices`) Actor

Sold house prices for any UK postcode or street from official HM Land Registry Price Paid Data. Sales plus area price stats (median, trend). No scraping, no API key.

- **URL**: https://apify.com/leathered_luna/uk-land-registry-sold-prices.md
- **Developed by:** [SiennaWorks](https://apify.com/leathered_luna) (community)
- **Categories:** Real estate, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 sale records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## UK Sold House Prices (HM Land Registry Price Paid Data)

Look up **what UK homes actually sold for**, by postcode, street, town, district or county, using official **HM Land Registry Price Paid Data**. You get every matching sale, plus an optional **area price summary** (median, mean, range, by property type and year, and 12-month change). No scraping, no API key.

Built for estate agents and investors, property analysts, mortgage and valuation tools, conveyancers, relocation research and AI agents that need reliable sold-price facts.

### How this is different

- **Official open data, not a scraped portal.** It queries the Land Registry's own public linked-data endpoint. It does not copy Rightmove, Zoopla or similar sites, so it does not break when they change.
- **Sales plus statistics.** One run can return the individual sales and a ready-made area summary per search.
- **Useful filters.** Date range, price range, property types, new builds only.
- **Clean, flat records** with a ready-to-read address, property type, tenure, new-build flag and transaction ID.
- **Honest failures.** An invalid postcode or a search with no sales gives a row with a clear status and costs nothing.

### What you get

**Sale records** (`record_type: "sale"`): `transaction_id`, `price_paid_gbp`, `date_of_transfer`, `year`, `property_type`, `tenure`, `new_build`, `transaction_category`, `saon`, `paon`, `street`, `locality`, `town`, `district`, `county`, `postcode`, `address`, `query`, `retrieved_at`.

**Area summaries** (`record_type: "area_summary"`): `sales_count`, first and last sale date, `median_price_gbp`, `mean_price_gbp`, `min_price_gbp`, `max_price_gbp`, `by_property_type`, `by_year`, last 12 months sales and median, previous 12 months median and `median_change_pct_year_on_year`.

**Problems** (never charged): `status` and `message` for invalid postcodes or searches with no data.

An example of each record type is in [`examples/example_output.json`](examples/example_output.json).

### Input

```json
{
    "postcodes": ["M1 1AE"],
    "searches": [{"street": "Deansgate", "town": "Manchester"}],
    "sinceDate": "2024-01-01",
    "propertyTypes": ["flat-maisonette"],
    "maxSalesPerSearch": 100,
    "includeAreaSummary": true
}
```

| Field | Meaning |
|---|---|
| `postcodes` | Full UK postcodes. Spacing and case are normalised. |
| `searches` | Objects with any of `street`, `town`, `district`, `county`, `postcode`. A street needs a town, district, county or postcode as well. Matching is on the official upper-case values, for example `MANCHESTER`. |
| `sinceDate` / `untilDate` | `YYYY-MM-DD`. Add `sinceDate` for whole towns or districts to keep runs fast. |
| `minPrice` / `maxPrice` | Price range in GBP. |
| `propertyTypes` | `detached`, `semi-detached`, `terraced`, `flat-maisonette`, `other`. |
| `newBuildOnly` | Only newly built properties. |
| `maxSalesPerSearch` | Default 100, up to 1,000. The most recent sales come first. |
| `includeAreaSummary` | Adds one summary record per search. |

### Pricing (pay-per-event)

- **$0.0015 per sale record** returned ($1.50 per 1,000)
- **$0.01 per area summary** returned (one per search)

Invalid postcodes and searches without data are free. Platform usage is included. Set a **maximum cost per run** in Apify Console for a hard cap. The Actor stops cleanly when the limit is reached.

### Data notes and limits

- Data covers **England and Wales** only (Scotland and Northern Ireland have separate registers). History starts in 1995.
- The register lags: sales appear some weeks after completion. `transaction_category` shows whether a sale is a standard or an additional price paid entry.
- Area summaries are based on the most recent sales returned for that search (up to `maxSalesPerSearch`). The field `based_on_most_recent_sales` says so. Raise the cap or add date filters for exact statistics.
- Each record is a property sale price and address. It does not contain buyer or seller names.

### Legal

Contains HM Land Registry data © Crown copyright and database right, supplied under the [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). Source: [Price Paid Data](https://www.gov.uk/government/statistical-data-sets/price-paid-data-downloads). Not affiliated with or endorsed by HM Land Registry. You are responsible for how you use the data under UK GDPR.

### Reliability behaviour

| Situation | Behaviour |
|---|---|
| Invalid postcode | Row in the dataset with a clear status. Not charged. |
| No sales found | Row with status `no_sales`. Not charged. |
| Endpoint busy or 5xx | Retry with backoff. If it keeps failing the query is reported, not charged, and other searches continue. |
| Invalid dates | The run fails immediately and charges nothing. |

### Local development

```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
pytest -q
```

### Changelog

- **0.1** — First version: postcode and street/town/district/county search, filters, area summaries, pay-per-event.

# Actor input Schema

## `postcodes` (type: `array`):

Full UK postcodes, one per item (e.g. M1 1AE). Spacing and case are normalised. Invalid postcodes are reported and never charged.

## `searches` (type: `array`):

Optional list of objects with any of: street, town, district, county, postcode. A street needs a town, district, county or postcode too. Matching is exact on the official (upper-case) values, e.g. town "MANCHESTER". For whole towns or districts add sinceDate to stay fast.

## `sinceDate` (type: `string`):

YYYY-MM-DD. Leave empty for all history (data starts in 1995).

## `untilDate` (type: `string`):

YYYY-MM-DD.

## `minPrice` (type: `integer`):

Keep only sales at or above this price in GBP.

## `maxPrice` (type: `integer`):

Keep only sales at or below this price in GBP.

## `propertyTypes` (type: `array`):

Keep only these property types. Leave empty for all.

## `newBuildOnly` (type: `boolean`):

Return only sales flagged as newly built properties.

## `maxSalesPerSearch` (type: `integer`):

The most recent sales are returned first. Each returned sale is one chargeable event.

## `includeAreaSummary` (type: `boolean`):

Adds one summary record per search: sales count, median/mean/min/max, breakdown by property type and year, and median change over the last 12 months.

## Actor input object example

```json
{
  "postcodes": [
    "M1 1AE"
  ],
  "searches": [
    {
      "street": "Deansgate",
      "town": "Manchester"
    }
  ],
  "newBuildOnly": false,
  "maxSalesPerSearch": 100,
  "includeAreaSummary": true
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "postcodes": [
        "M1 1AE"
    ],
    "searches": [
        {
            "street": "Deansgate",
            "town": "Manchester"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("leathered_luna/uk-land-registry-sold-prices").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "postcodes": ["M1 1AE"],
    "searches": [{
            "street": "Deansgate",
            "town": "Manchester",
        }],
}

# Run the Actor and wait for it to finish
run = client.actor("leathered_luna/uk-land-registry-sold-prices").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "postcodes": [
    "M1 1AE"
  ],
  "searches": [
    {
      "street": "Deansgate",
      "town": "Manchester"
    }
  ]
}' |
apify call leathered_luna/uk-land-registry-sold-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,leathered_luna/uk-land-registry-sold-prices"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/MZdMuErAWee0C9F2K/builds/NM9LCDIT9SBHtCqgu/openapi.json
