# Uk House Price Index Scraper (`b2b_lead_generation/uk-house-price-index-scraper`) Actor

Expand your UK property analytics effortlessly by extracting official UK House Price Index figures by region and month from HM Land Registry data. Retrieve average prices by buyer and property type into JSON, CSV, or Excel formats.

- **URL**: https://apify.com/b2b_lead_generation/uk-house-price-index-scraper.md
- **Developed by:** [B2B Lead Generation](https://apify.com/b2b_lead_generation) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-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 House Price Index Scraper

![UK House Price Index Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/uk-house-price-index-scraper-cover.png)

Collect UK House Price Index (UKHPI) figures by region and month using publicly available HM Land Registry data. Select a region, provide a list of months, and retrieve average house prices across different buyer and property categories. Export structured results in JSON, CSV, Excel, and other supported formats.

### What It Does

This actor collects monthly UK House Price Index records published by HM Land Registry. Each record includes the reference month, region, average property prices, and available price breakdowns.

You can retrieve figures for multiple months and regions by running the actor with your preferred input settings. Additional source data fields are preserved when available, except reserved names such as `type` and `format`, which are excluded to maintain a valid dataset schema.

### Mode

- **Region Month (`region_month`)**: Retrieves UKHPI data for the selected region and each month supplied in the `months` list. Each region-month combination produces a separate record.

### Input Example

```json
{
  "mode": "region_month",
  "region": "england",
  "months": ["2024-01", "2024-02"],
  "maxItems": 50,
  "requestDelayMs": 1000
}
```

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `region_month` | Collection mode. |
| `region` | string | `england` | HM Land Registry region slug. |
| `months` | array | `["2024-01"]` | List of months in `YYYY-MM` format. |
| `maxItems` | integer | `100` | Maximum number of successful records to return. |
| `requestDelayMs` | integer | `1000` | Delay between requests in milliseconds. |
| `userAgent` | string | `ActorResearch/1.0` | HTTP User-Agent value. |
| `timeoutSecs` | integer | `300` | Overall run timeout in seconds. |
| `requestTimeoutSecs` | integer | `30` | Individual request timeout in seconds. |
| `proxyConfiguration` | object | Proxy off | Optional proxy configuration. |

### Output Example

```json
{
  "averagePrice": 278060,
  "averagePriceCash": 266976,
  "averagePriceDetached": 452626,
  "averagePriceExistingProperty": 275026,
  "averagePriceFirstTimeBuyer": 232141,
  "averagePriceFlatMaisonette": 220935,
  "averagePriceFormerOwnerOccupier": 339252,
  "averagePriceMortgage": 282482,
  "averagePriceNewBuild": 354088,
  "averagePriceSA": 278235,
  "averagePriceSemiDetached": 269879,
  "averagePriceTerraced": 228451,
  "dataSet": "http://landregistry.data.gov.uk/data/ukhpi/dataset",
  "refMonth": "2024-01",
  "refRegionLabel": "England",
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

### Output Fields

| Field | Description |
|---|---|
| `averagePrice` | Overall average house price. |
| `averagePriceCash` | Average price for cash buyers. |
| `averagePriceDetached` | Average price for detached properties. |
| `averagePriceExistingProperty` | Average price for existing properties. |
| `averagePriceFirstTimeBuyer` | Average price for first-time buyers. |
| `averagePriceFlatMaisonette` | Average price for flats and maisonettes. |
| `averagePriceFormerOwnerOccupier` | Average price for former owner-occupier buyers. |
| `averagePriceMortgage` | Average price for mortgage buyers. |
| `averagePriceNewBuild` | Average price for new-build properties. |
| `averagePriceSA` | Seasonally adjusted average price. |
| `averagePriceSemiDetached` | Average price for semi-detached properties. |
| `averagePriceTerraced` | Average price for terraced properties. |
| `dataSet` | Dataset reference URI. |
| `refMonth` | Reference month of the record. |
| `refRegionLabel` | Display name of the region. |
| `scrapedAt` | Date and time the record was collected. |

### Use Cases

- **Regional Price Monitoring:** Compare average house prices across England, Wales, Scotland, London, and other supported regions.
- **Buyer-Type Analysis:** Compare average prices for first-time buyers, cash buyers, and mortgage buyers.
- **Property-Type Trends:** Track prices for detached, semi-detached, terraced, and flat properties.
- **Historical Research:** Collect monthly UKHPI figures for property market analysis.
- **Research and Reporting:** Export structured records into spreadsheets and business intelligence tools.
- **Scheduled Data Updates:** Run recurring collections to maintain updated UK house price datasets.

### Frequently Asked Questions

**Who can use this actor?**

It is useful for property analysts, researchers, developers, and professionals working with UK housing market data.

**Which regions are supported?**

Use HM Land Registry region slugs such as `england`, `wales`, `scotland`, or `london`.

**How do I collect data for multiple months?**

Add multiple `YYYY-MM` values to the `months` array. The actor collects a separate record for each region-month combination.

**What house price information is included?**

Records can include overall average prices and breakdowns by buyer type and property type, along with available reference information.

**Can I run the actor on a schedule?**

Yes. Configure an Apify schedule to collect monthly figures periodically.

**Which export formats are supported?**

You can export the dataset as JSON, CSV, Excel, and other supported Apify dataset formats.

### Trademark Notice

HM Land Registry and related names are mentioned only to identify the source of the collected information. Their names and trademarks belong to their respective owners. This actor is independent and is not affiliated with or endorsed by HM Land Registry.

### Is Web Scraping Legal?

This actor collects publicly accessible UK House Price Index data without bypassing login screens, paywalls, or technical security measures. How collected information can be used depends on applicable laws and the source website's policies.

- **Personal Data:** UKHPI records primarily contain aggregated housing market statistics. If additional collected information includes personal data, handle it responsibly and consider applicable privacy laws, including GDPR and CCPA.
- **Copyright and Licensing:** HM Land Registry publishes UKHPI data under the Open Government Licence. Follow its attribution and reuse requirements when reproducing or redistributing the figures.
- **Platform Terms and Rate Limits:** Respect HM Land Registry's policies, applicable terms, and request limits. Keep collection activity reasonable.
- **Disclaimer:** This information is general guidance, not legal advice. Consult a qualified professional if you need advice about your intended use.

For more information, read [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `mode` (type: `string`):

What to scrape. Region month returns one UK HPI record per region and YYYY-MM.

## `region` (type: `string`):

Region slug used in the HM Land Registry path (e.g. england, wales, scotland, london).

## `months` (type: `array`):

List of months as YYYY-MM. One request is made per month.

## `maxItems` (type: `integer`):

Stop after this many successful rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Polite pacing in milliseconds. Default is about 1 request per second.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "region_month",
  "region": "england",
  "months": [
    "2024-01",
    "2024-02"
  ],
  "maxItems": 100,
  "requestDelayMs": 1000,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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 = {
    "region": "england",
    "months": [
        "2024-01"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_lead_generation/uk-house-price-index-scraper").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 = {
    "region": "england",
    "months": ["2024-01"],
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_lead_generation/uk-house-price-index-scraper").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 '{
  "region": "england",
  "months": [
    "2024-01"
  ]
}' |
apify call b2b_lead_generation/uk-house-price-index-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_lead_generation/uk-house-price-index-scraper"
        }
    }
}
```

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/ZSWvwAmIjluFLGAGw/builds/FRp5puq7AuqsAYQdG/openapi.json
