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

Every residential sale in England and Wales since 1995, from HM Land Registry Price Paid Data: one row per transaction with price, completion date, full address, postcode, property type, tenure and new-build flag. Filter by postcode, outcode, street, town, district, date range and price band.

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

## Pricing

from $0.70 / 1,000 sale record returneds

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 Sold House Prices: HM Land Registry Price Paid Records

Every residential sale in England and Wales since 1995, from HM Land Registry Price Paid Data: one row per transaction with price, completion date, full address, postcode, property type, tenure and new-build flag. Filter by postcode, outcode, street, town, district, date range and price band.

These are the prices people actually paid, taken from the public register of completed sales — not asking prices from a listings page. Give the actor a postcode, a sector, an outcode, a street with its town, a town, a district or a county, add a date window or a price band if you want one, and it writes one row per registered sale with the price in pounds, the completion date, the full address and the register's own flags for tenure, new build and transaction category. The register is read through its open query service: no API key, no login, no proxy and no browser.

> **Need it tailored to your workflow?** Missing a field, a filter, another source or a different output format? [Open an issue](https://apify.com/yadroo/uk-land-registry-sold-prices/issues) and describe what you need — we read every request and adapt the actor.

### Use cases

- **Value one property against its own street**: ask for the street and its town, or just the postcode, and read every sale the register holds back to 1995 — the comparable evidence a valuer, a conveyancer or a seller argues with.
- **Build a training set for a price model**: take a district or a county one year at a time with `fromDate`/`toDate` and `maxItems` 2000, keep `categories: ["standard"]` so repossessions and portfolio transfers do not pollute the fit.
- **Watch an area month by month**: schedule a run on a town or an outcode with `onlyNew` on; the register republishes monthly and you get only the sales it has added since your last run.
- **Separate new supply from resale**: `newBuild: "new"` in a town gives the housebuilders' completions, `"established"` gives everything else — a split listing sites do not make cleanly.
- **Study the top of one borough's market**: `district` plus `minPrice` and `sortBy: "priceDesc"` lists the prime sales of a London borough, which is the only way to isolate a borough because the register records every London address with the town `LONDON`.
- **Check what a single address sold for**: a full postcode plus the flat or house number in the output tells you the sale history of that unit, including the flat number in `saon`.

### Input

Every field is optional, but at least one area is required: `postcodes`, `street` (with a town or a postcode), `town`, `district` or `county`. A run with no area at all stops with that message instead of trying to read the whole register.

| Field | Type | Default | Allowed values / notes |
|---|---|---|---|
| `postcodes` | string\[] | — | Up to 25 entries, one area each: a full postcode (`PL6 8RU`), a postcode sector (`PL6 8`), or an outcode (`SW11`). Case and a missing space inside a full postcode are fixed for you, so `pl68ru` works. A sector needs its space — `PL68` is read as the outcode `PL68`. Anything that is not one of the three shapes stops the run and says so. See [Postcodes, sectors and outcodes](#postcodes-sectors-and-outcodes) |
| `street` | string | — | Street without a house number, as the register prints it (`PATTINSON DRIVE`, `Abbey Road`). Case and extra spaces are fixed for you. Needs a town or a postcode beside it |
| `town` | string | — | Postal town (`PLYMOUTH`, `MANCHESTER`). A dropdown of the ten largest towns is offered and any other town can be typed; case and extra spaces are fixed for you. Every Greater London address is `LONDON` — use `district` or an outcode for a part of London |
| `district` | string | — | Local authority district or London borough (`CAMDEN`, `CITY OF PLYMOUTH`, `CORNWALL`) |
| `county` | string | — | County (`GREATER LONDON`, `DEVON`). A county on its own needs `fromDate`, otherwise the run stops and asks for a date window or a smaller area |
| `fromDate` | string | — | `YYYY-MM-DD`. Completion date on or after this day. Empty = back to January 1995 |
| `toDate` | string | — | `YYYY-MM-DD`. Completion date on or before this day |
| `minPrice` | integer | — | Keep sales of at least this many pounds |
| `maxPrice` | integer | — | Keep sales of at most this many pounds |
| `propertyTypes` | string\[] | all | Strict list: `detached`, `semi-detached`, `terraced`, `flat-maisonette`, `other`. See [Property types](#property-types) |
| `tenure` | string\[] | both | Strict list: `freehold`, `leasehold` |
| `newBuild` | string | `any` | Strict list: `any`, `new`, `established` |
| `categories` | string\[] | both | Strict list: `standard`, `additional`. See [Transaction categories](#transaction-categories) |
| `sortBy` | string | `dateDesc` | Strict list: `dateDesc`, `dateAsc`, `priceDesc`, `priceAsc`. Decides which sales a capped run keeps |
| `onlyNew` | boolean | `false` | Write only sales this actor or task has not written before, remembered by the register's transaction id |
| `maxItems` | integer | `50` | 1–2000. Hard cap on the rows written, and so on the cost |
| `fields` | string\[] | all | Keep only these columns, in this order. `transactionId`, `price`, `date`, `address`, `postcode`, `url` and `fetchedAt` are always kept — they come first unless you list them, and a name you list keeps the position you gave it. Column names are matched ignoring case and spaces, plus a few spellings (`pricePaid` → `price`, `type` → `propertyType`); a name that is no column at all is reported in the run status and ignored |

`propertyTypes`, `tenure`, `newBuild`, `categories` and `sortBy` are strict lists: Apify refuses an off-list value with HTTP 400 before the run starts and names the allowed values, so there is nothing to spell loosely there. The free-text fields (`postcodes`, `street`, `town`, `district`, `county`) accept any case and extra spaces, and `postcodes` also accepts a missing space; names must otherwise match how the register prints them, and a name the register does not hold returns no rows with a status that says so, rather than a guess at a different place.

### Reference

#### Postcodes, sectors and outcodes

| You type | Read as | What you get |
|---|---|---|
| `PL6 8RU`, `pl68ru`, `pl6 8ru` | full postcode `PL6 8RU` | every sale registered at that postcode |
| `PL6 8` | sector `PL6 8` | every sale whose postcode starts with `PL6 8` |
| `SW11`, `sw11` | outcode `SW11` | every sale in the `SW11` outcode (the trailing space is added, so `SW11` never matches `SW110`) |
| `W1A`, `EC1A` | outcode | London outcodes with a letter work the same way |

Each entry is queried on its own, one after another, and the rows arrive area by area in the order you chose. The register covers England and Wales only, so Scottish and Northern Irish postcodes have no data here.

#### Property types

| Value | Meaning |
|---|---|
| `detached` | Detached house |
| `semi-detached` | Semi-detached house |
| `terraced` | Terraced house, including end-of-terrace |
| `flat-maisonette` | Flat or maisonette |
| `other` | The register's catch-all: property it could not place in the four classes above, often whole buildings or mixed-use premises. Read those rows with care |

#### Tenure

`freehold` and `leasehold`, as recorded on the transfer. A flat sold on a long lease is `leasehold` even where the freehold of the block changed hands separately.

#### Transaction categories

| Value | Meaning |
|---|---|
| `standard` | Sale at full market value between unconnected parties — what a price index or a valuation model wants |
| `additional` | Repossessions, sales under a power of sale, buy-to-let purchases and transfers to a non-private buyer. The price is often not a market price |

#### Record status

`add`, `change` or `delete` — how the register last touched the record in its monthly update. Almost every row is `add`.

#### Sort orders

`dateDesc` newest completion first (default), `dateAsc` oldest first, `priceDesc` highest price first, `priceAsc` lowest first. With `maxItems` this is what decides which sales you keep: newest first for a watch, oldest first to build a history from 1995 forward, highest first to see the top of a market.

#### Districts and counties, as the register spells them

Districts are local authorities in upper case: `CAMDEN`, `WESTMINSTER` (printed `CITY OF WESTMINSTER`), `WANDSWORTH`, `BIRMINGHAM`, `MANCHESTER`, `CITY OF PLYMOUTH`, `CORNWALL`, `LEEDS`. Counties are the register's county line: `GREATER LONDON`, `DEVON`, `WEST MIDLANDS`, `GREATER MANCHESTER`, `WEST YORKSHIRE`, `CORNWALL`. Some unitary authorities print the same value in both (`CITY OF PLYMOUTH`). When a name is wrong the run writes nothing and says so — check the `district` and `county` columns of a postcode you know to see the exact spelling.

### Examples

**Every sale at one postcode**

```json
{ "postcodes": ["PL6 8RU"], "maxItems": 20 }
```

**Flats sold in a London outcode this year**

```json
{ "postcodes": ["SW11"], "propertyTypes": ["flat-maisonette"], "fromDate": "2026-01-01", "maxItems": 40 }
```

**New-build completions in a town**

```json
{ "town": "PLYMOUTH", "newBuild": "new", "fromDate": "2025-01-01", "maxItems": 30 }
```

**The sale history of one street**

```json
{ "street": "Abbey Road", "town": "LONDON", "sortBy": "dateDesc", "maxItems": 30 }
```

**Million-pound sales in a London borough, five chosen columns**

```json
{ "district": "CAMDEN", "minPrice": 2000000, "fromDate": "2025-01-01", "sortBy": "priceDesc", "fields": ["price", "date", "address", "postcode", "propertyType"], "maxItems": 25 }
```

**A monthly watch on a city**

```json
{ "town": "MANCHESTER", "fromDate": "2026-06-01", "onlyNew": true, "sortBy": "dateDesc", "maxItems": 40 }
```

### Output

One row per registered sale. A real row from the run of the prefill input on 2026-11-05 (run `gK0kIWmKKfTyisQX0`):

```json
{
  "transactionId": "5CD70F5C-FFFD-FB1F-E063-4704A8C08825",
  "price": 222500,
  "date": "2026-09-25",
  "address": "23 PATTERDALE CLOSE, PLYMOUTH, PL6 8XA",
  "saon": null,
  "paon": "23",
  "street": "PATTERDALE CLOSE",
  "locality": null,
  "town": "PLYMOUTH",
  "district": "CITY OF PLYMOUTH",
  "county": "CITY OF PLYMOUTH",
  "postcode": "PL6 8XA",
  "propertyType": "terraced",
  "tenure": "freehold",
  "newBuild": false,
  "category": "standard",
  "recordStatus": "add",
  "currency": "GBP",
  "url": "https://landregistry.data.gov.uk/data/ppi/transaction/5CD70F5C-FFFD-FB1F-E063-4704A8C08825/current",
  "fetchedAt": "2026-11-05T00:25:29.173Z"
}
```

| Field | Type | Meaning |
|---|---|---|
| `transactionId` | string | The register's own identifier of the sale; the key `onlyNew` remembers |
| `price` | number | Price on the transfer deed, whole pounds, no fees and no estimate |
| `date` | string | Completion date, `YYYY-MM-DD` |
| `address` | string | One line built from the address parts below |
| `saon` | string | null | Flat or unit ("FLAT 43"); mostly flats and maisonettes |
| `paon` | string | null | House number or house name |
| `street` | string | null | Street, upper case as the register prints it |
| `locality` | string | null | Village or suburb; often empty |
| `town` | string | null | Postal town; `LONDON` for all of Greater London |
| `district` | string | null | Local authority district or London borough |
| `county` | string | null | County |
| `postcode` | string | null | Postcode at the time of the sale; a few records have none |
| `propertyType` | string | `detached`, `semi-detached`, `terraced`, `flat-maisonette`, `other` |
| `tenure` | string | `freehold` or `leasehold` |
| `newBuild` | boolean | True when this was the first sale of a newly built property |
| `category` | string | `standard` or `additional` |
| `recordStatus` | string | `add`, `change` or `delete` |
| `currency` | string | Always `GBP` |
| `url` | string | The register's own page for this transaction, for a person to open |
| `fetchedAt` | string | When the row was read, ISO-8601 UTC |

`transactionId`, `price`, `date`, `address`, `postcode`, `url` and `fetchedAt` are always written, whatever `fields` asks for.

Dataset views: **Sold prices** (date, price, address, postcode, town, type, tenure, new build, link), **Addresses** (the register's address parts), **Price analysis** (date, price, type, tenure, new build, category, record status, postcode, town, district).

### Use it from code / agents

```bash
curl -X POST "https://api.apify.com/v2/acts/yadroo~uk-land-registry-sold-prices/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"postcodes":["PL6 8"],"fromDate":"2024-01-01","maxItems":50}'
```

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('yadroo/uk-land-registry-sold-prices').call({ postcodes: ['SW11'], propertyTypes: ['flat-maisonette'], fromDate: '2026-01-01', maxItems: 40 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

```python
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("yadroo/uk-land-registry-sold-prices").call(run_input={"district": "CAMDEN", "minPrice": 2000000, "fromDate": "2025-01-01", "maxItems": 25})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

MCP: add `https://mcp.apify.com` to Claude / Cursor / any MCP client and call the `yadroo/uk-land-registry-sold-prices` tool with the same JSON input.

With `onlyNew` on, the memory belongs to the actor or the task you run and to the filters you used, so two tasks watching two areas never mix. The first run writes everything that matches; later runs write only transaction ids that were not written before. Switch it off to get the full area again.

### Pricing

Pay per event: **$0.001 per run start + $0.001 per sale row**. Every run pays the start event, also a run that finds nothing. Every row written to the dataset is charged once, and rows are the only other charge — there is no charge per request or per minute.

| Run | What it costs |
|---|---|
| 20 sales at one postcode | $0.001 start + 20 × $0.001 = **$0.021** |
| 50 sales (the default cap, and the prefill example) | $0.001 + 50 × $0.001 = **$0.051** |
| 500 sales of a district for a year | $0.001 + 500 × $0.001 = **$0.501** |
| 2000 sales, the largest cap | $0.001 + 2000 × $0.001 = **$2.001** |

A run that matches nothing writes no row, so it costs the start event alone ($0.001) — this actor writes no "not found" marker rows. Apify's paid plans discount the row event automatically (Bronze −10 %, Silver −20 %, Gold and above −30 %); the start event is flat. The run also stops as soon as it reaches your **Maximum cost per run**, keeps every row you have already paid for, and says so in its status: "Stopped at your spending limit: N rows delivered".

### Limits & FAQ

- **Coverage.** The register behind this actor covers England together with Wales. Scottish sales live in a separate Scottish register and Northern Irish ones in theirs, so neither appears here. The data starts on 1 January 1995.
- **Freshness.** HM Land Registry republishes Price Paid Data monthly, and a sale reaches it two weeks to two months after completion, so the two newest months are always incomplete. On 2026-11-05 the newest completion anywhere in the register was 2026-09-28.
- **Measured speed (2026-11-05, Apify cloud).** One query returns up to 500 sales, and the actor sends at most one query per second. A full postcode, a street with its town, a district or a town with a date window answers in 1–6 s (20–40 rows). 25 postcodes in one run took 25 queries and 30 s for 335 sales. The prefill sector `PL6 8` answered 50 rows in 19–78 s, and a London outcode with a property type and a date window 40 rows in 43–70 s; a full 500-row page of the `SW11` outcode took about 30 s. So an area-wide 2000-row run is four queries and fits many times over into the default 900 s run timeout, while a long list of outcodes is the one input that can run into it.
- **Rate limit.** The register publishes none for this service. The actor keeps to at most one query per second per run, retries included, and never runs two queries at once; that pace was never throttled in our runs. The service does answer **HTTP 429** when several callers query it at the same time (measured 2026-11-05: four of our runs in parallel, four 429s), so avoid starting several runs of this actor at the same moment. A 429 is waited out — 15 s, 30 s, 60 s, or whatever `Retry-After` asks for — and only if the service stays busy does the run end with a status saying to start again in a few minutes.
- **A very wide area is refused, not run to death.** The register's query service gives up on a query it cannot answer in about 90 seconds. A county on its own is refused before the run starts, with a request for a date window or a smaller area; if the service still gives up on a query, the run says so, names what to narrow, and keeps the rows it had already saved.
- **A run near its timeout stops cleanly.** The actor stops starting new work before the run timeout, saves everything read so far and ends successfully with "Stopped before the run timeout: N rows saved" — the same for your spending limit. Rows already written are never lost or charged twice.
- **What the register leaves out** (HM Land Registry's own exclusions): sales never lodged with the register, sales that were not for value, right-to-buy sales at a discount, transfers subject to an existing mortgage, divorce settlements, gifts, compulsory purchases, transfers by court order, leases of seven years or less, and additional-category sales below £100 or above £99,999,999.
- **No names.** The register publishes addresses and prices, never the names of buyers or sellers, and this actor adds nothing of the kind.
- **Missing columns.** `saon` is empty for houses, `locality` is often empty, and a few records — mostly whole buildings at the top of the market — carry no postcode. The columns are always present; their value is `null`.
- **`other` property type** is a catch-all that mixes whole buildings and unusual premises, which is why a 217 million pound "sale" can appear in a borough's top sales.
- **Licence.** Price Paid Data belongs to HM Land Registry, which releases it for reuse — commercial reuse included — under version 3.0 of the Open Government Licence. The licence asks for a credit, so keep "Contains HM Land Registry data © Crown copyright and database right 2026" with anything you publish from these rows.
- **Why the prices differ from a listings site.** This is what was paid and registered, not what was asked. Asking prices are a different dataset.
- Questions or problems: open an issue on the Issues tab of this actor.

***

Made by **Yadroo**. Sibling actors: [rightmove-uk](https://apify.com/yadroo/rightmove-uk), [uk-planning-applications](https://apify.com/yadroo/uk-planning-applications), [ons-release-calendar](https://apify.com/yadroo/ons-release-calendar), [data-gov-datasets](https://apify.com/yadroo/data-gov-datasets), [osm-geocode](https://apify.com/yadroo/osm-geocode).

# Actor input Schema

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

One per line. A full postcode (`PL6 8RU`) returns the sales registered at that postcode; a sector (`PL6 8`) or an outcode (`PL6`, `SW11`) returns every sale inside it. Case and a missing space are fixed for you, so `pl68ru` and `PL6 8RU` are the same input. A value that is not a UK postcode shape stops the run and names what was wrong, instead of quietly returning another area's sales. The register covers England and Wales only - Scottish and Northern Irish postcodes have no data here.

## `street` (type: `string`):

Street as the register prints it, with no house number: `PATTINSON DRIVE`, `Abbey Road`. Case and extra spaces are fixed for you. A street needs a town or a postcode beside it, because the same street name exists in hundreds of towns; the run stops with that message when neither is set.

## `town` (type: `string`):

Town or city as the register prints it. Pick one of the ten largest from the list or type any other town - this is a free-text field, so case and extra spaces are fixed for you and anything the register holds works. The register stores the postal town, so every Greater London address is `LONDON`; to work on one part of London use an outcode or a district instead.

## `district` (type: `string`):

District as the register prints it: `CITY OF PLYMOUTH`, `CAMDEN`, `BIRMINGHAM`, `CORNWALL`. This is the filter for a London borough, where the town is always `LONDON`. Case and extra spaces are fixed for you; the values live in README -> Reference.

## `county` (type: `string`):

County as the register prints it: `GREATER LONDON`, `DEVON`, `WEST MIDLANDS`. The widest area filter there is - a county holds millions of sales, so use it together with a date window and the row cap.

## `fromDate` (type: `string`):

Lower bound on the completion date written on the transfer deed, as `YYYY-MM-DD`. Empty = back to January 1995, where the register starts. A date window is the cheapest way to keep a town- or county-wide run small.

## `toDate` (type: `string`):

Upper bound on the completion date, as `YYYY-MM-DD`. Use it with the lower bound to take one year or one quarter at a time - the usual shape of a run that feeds a valuation model.

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

Keep only sales of at least this many pounds. The figure is the price on the transfer deed in whole pounds: no fees, no VAT and no estimate.

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

Upper bound on the price paid, in pounds. A band between the two bounds isolates one part of the market - starter homes in a county, or everything above a million in a borough.

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

Empty = every type. These five are the register's own classes and the only values this field takes: the platform refuses anything else before the run starts (allowed: detached, semi-detached, terraced, flat-maisonette, other). `other` is the register's catch-all and holds a mix, so read those rows with care.

## `tenure` (type: `array`):

Empty = both. Only these two values are accepted and the platform refuses anything else before the run starts. The register records the tenure of the transfer, so a flat sold on a long lease is `leasehold` even where the freehold of the block changed hands separately.

## `newBuild` (type: `string`):

The register's new-build flag. `new` is the first sale of a property that had just been built, which is how a housebuilder's output shows up in the data; `established` is every other sale. Only these three values are accepted.

## `categories` (type: `array`):

Empty = both, which is what the register publishes. A valuation or price-index model normally wants `standard` only, because the additional category mixes repossessions and portfolio transfers whose price is not a market price. Only these two values are accepted.

## `sortBy` (type: `string`):

Decides which rows a capped run keeps: newest first for a watch on an area, oldest first to build a history from 1995 forward, highest price first to see the top of a market. Only these four values are accepted.

## `onlyNew` (type: `boolean`):

Remember the register's transaction identifier of every row written and, on the next run of the same actor or task, write only identifiers that were not written before - so a monthly schedule appends what the register added instead of resending and recharging the whole area. The first run writes everything that matches. The memory belongs to the actor or task, so two tasks watching two postcodes never mix.

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

Hard cap on the rows this run writes, and so on what it costs. Rows arrive in the order chosen above, so a capped newest-first run holds the most recent sales of the area. The register is read in pages of 500 rows; a county with no date window holds millions of sales, so keep the cap and the window together.

## `fields` (type: `array`):

Keep only the named columns, in this order - for example `price, date, address, propertyType`. Empty = every column. `transactionId`, `price`, `date`, `address`, `postcode`, `url` and `fetchedAt` are always written; name one of them here and it moves to the position you gave it. An unknown name is reported in the run status rather than dropped in silence.

## Actor input object example

```json
{
  "postcodes": [
    "PL6 8"
  ],
  "fromDate": "2024-01-01",
  "newBuild": "any",
  "sortBy": "dateDesc",
  "onlyNew": false,
  "maxItems": 50
}
```

# 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": [
        "PL6 8"
    ],
    "fromDate": "2024-01-01"
};

// Run the Actor and wait for it to finish
const run = await client.actor("yadroo/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": ["PL6 8"],
    "fromDate": "2024-01-01",
}

# Run the Actor and wait for it to finish
run = client.actor("yadroo/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": [
    "PL6 8"
  ],
  "fromDate": "2024-01-01"
}' |
apify call yadroo/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,yadroo/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/B9uX1xkUEQHe2M4p1/builds/mfeulkOhxQoHRMVbv/openapi.json
