# OnTheMarket Scraper - UK Property Listings (`evpp/onthemarket-uk`) Actor

Extract OnTheMarket UK property listings as clean JSON: prices, bedrooms, locations, agents, photos, property details, timestamps, and listing URLs.

- **URL**: https://apify.com/evpp/onthemarket-uk.md
- **Developed by:** [Evp Labs](https://apify.com/evpp) (community)
- **Categories:** Real estate, Lead generation, Other
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 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/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

## OnTheMarket Scraper - UK Property Listings

Extract property listings from **OnTheMarket.com**, one of the UK's leading property portals: sale and rental listings with prices, addresses, bedrooms, tenure, EPC ratings, estate agent details, photos and full key facts such as council tax, ground rent, service charge, nearest station/school and broadband speed.

The Actor reads the structured `__NEXT_DATA__` JSON embedded in every OnTheMarket page and optionally enriches each listing from its detail page. No browser rendering, no login, no proxy required - it is fast, cheap and stable.

### What you can scrape

- **Property investors** - monitor new listings in target postcodes, filter by beds/price, spot price reductions via `addedReduced`.
- **Estate agents & proptech** - competitor inventory, stock levels per branch, listing quality (photos, virtual tours, spotlight flags).
- **Relocation & tenant services** - live rental feeds with monthly price, tenancy info, broadband speed and transport links.
- **Analytics & research** - track asking prices, time-on-market proxies and turnover per area over time.
- **Lead generation** - collect agent branches and their active stock.

### Quick start input

Target source: `onthemarket.com`. Paste this JSON into the Actor input tab for a fast first run, or use it as the body of the Apify API run call:

```json
{
    "mode": "for-sale",
    "location": "london",
    "fetchDetails": true,
    "maxItems": 10
}
```

The default input is intentionally small. Raise `maxItems` only after validating the first property listing records.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `for-sale` | `for-sale` or `to-rent` - maps to `/for-sale/property/<location>/` or `/to-rent/property/<location>/`. |
| `location` | string | `london` | Location slug as it appears in OnTheMarket URLs: `london`, `manchester`, `edinburgh`, `bristol`, `cornwall`, or an outcode like `se6`. |
| `minPrice` | integer | - | Minimum price in GBP (`min-price` filter; monthly rent for `to-rent`). |
| `maxPrice` | integer | - | Maximum price in GBP (`max-price` filter). |
| `minBeds` | integer | - | Minimum bedrooms (`min-bedrooms` filter). |
| `maxBeds` | integer | - | Maximum bedrooms (`max-bedrooms` filter). |
| `fetchDetails` | boolean | `true` | Also fetch each property's detail page for description, tenure, EPC, key facts, POIs and floorplan. Disable for faster list-only harvests. |
| `maxItems` | integer | `15` | Maximum properties to collect (30 per results page). |
| `proxyConfiguration` | object | disabled | Optional Apify proxy. Not needed normally - enable only for very large runs. |

#### Example input

```json
{
    "mode": "for-sale",
    "location": "london",
    "minPrice": 200000,
    "maxPrice": 400000,
    "minBeds": 2,
    "maxItems": 100
}
```

### Output

One flat JSON item is produced per property listing. Download the dataset as JSON, CSV, Excel, or HTML, or consume it through the Apify API.

#### Field reference

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | OnTheMarket property ID (from the details URL) |
| `title` | string | Property title (detail page SEO title or 'N bedroom <type> - <address>') |
| `url` | string | Canonical URL of the property details page |
| `listingType` | string | for-sale or to-rent |
| `price` | number | Numeric price in GBP (monthly rent for to-rent). Absent for POA listings. |
| `priceCurrency` | string | Currency of the price, always GBP (present only when price is set) |
| `priceLabel` | string | Price as displayed on the site |
| `priceQualifier` | string | Price qualifier such as 'Offers in excess of', 'Guide price' or 'pcm' for rentals |
| `address` | string | Display address of the property |
| `postcode` | string | UK postcode outcode extracted from the address (OnTheMarket does not publish full postcodes) |
| `city` | string | Town/city where the property is located |
| `latitude` | number | Latitude of the property location |
| `longitude` | number | Longitude of the property location |
| `bedrooms` | integer | Number of bedrooms |
| `bathrooms` | integer | Number of bathrooms |
| `sittingRooms` | integer | Number of reception/sitting rooms when listed |
| `propertyType` | string | Humanised property type: Flat, Detached, Terraced, Property, ... |
| `tenure` | string | Tenure information, e.g. 'Freehold' or 'Leasehold | 105 yrs left' |
| `epcRating` | string | Energy Performance Certificate rating (A-G) when available |
| `addedReduced` | string | Humanised added/reduced label, e.g. 'Added yesterday', 'Added > 14 days', 'Reduced on ...' |
| `totalViews` | string | Total view count as shown on the site, e.g. '2500+' |
| `agentName` | string | Estate agent branch name |
| `agentUrl` | string | URL of the agent branch page on OnTheMarket |
| `agentPhone` | string | Agent telephone number as displayed |
| `agentId` | integer | Internal OnTheMarket agent/branch ID |
| `imageUrl` | string | URL of the main property photo |
| `imageUrls` | string\[] | URLs of all property photos (1024px on detail pages, 480px on list-only items) |
| `imageCount` | integer | Number of property photos |
| `floorplanUrl` | string | URL of the first floorplan image when available |
| `description` | string | Property description trimmed to about 400 characters |
| `features` | string\[] | Bullet-point features shown on the search card (often include tenure, nearest station and school) |
| `propertyLabels` | string\[] | Property labels such as Retirement, New build, Auction |
| `nearestStation` | string | Name of the nearest train/tube station from the detail page |
| `nearestSchool` | string | Name of the nearest school from the detail page |
| `broadbandSpeedMbps` | number | Maximum broadband download speed in Mbps measured by OnTheMarket |
| `spotlight` | boolean | Whether the listing is a paid Spotlight/featured placement |
| `exclusive` | boolean | Whether the listing is an OnTheMarket exclusive |
| `newHome` | boolean | Whether the property is a new-build home |
| `recentlyAdded` | boolean | Whether the property was added recently |
| `virtualTour` | boolean | Whether a virtual/Matterport tour is attached |
| `tenancyInfo` | string | Tenancy fees/deposit information shown for rentals (trimmed to ~300 chars) |

#### Real sample output (latest live dataset)

```json
{
    "id": "20863132",
    "title": "Redden Court Road, Harold Wood 2 bed apartment for sale - £270,000",
    "url": "https://www.onthemarket.com/details/20863132/",
    "listingType": "for-sale",
    "price": 270000,
    "priceCurrency": "GBP",
    "priceLabel": "£270,000",
    "priceQualifier": "Guide price",
    "address": "Redden Court Road, Harold Wood",
    "city": "Harold Wood",
    "latitude": 51.5853998,
    "longitude": 0.229061,
    "bedrooms": 2,
    "bathrooms": 1,
    "propertyType": "Apartment",
    "tenure": "Leasehold | 118 yrs left",
    "epcRating": "C",
    "addedReduced": "Added yesterday",
    "agentName": "haart Estate Agents - Harold Wood",
    "agentUrl": "https://www.onthemarket.com/agents/branch/haart-estate-agents-harold-wood/",
    "agentPhone": "01708 573651",
    "agentId": 5359,
    "imageUrl": "https://media.onthemarket.com/properties/20863132/1662300373/image-0-1024x1024.jpg",
    "imageUrls": [
        "https://media.onthemarket.com/properties/20863132/1662300373/image-0-1024x1024.jpg",
        "https://media.onthemarket.com/properties/20863132/1662300373/image-1-1024x1024.jpg",
        "https://media.onthemarket.com/properties/20863132/1662300373/image-2-1024x1024.jpg",
        "https://media.onthemarket.com/properties/20863132/1662300373/image-3-1024x1024.jpg"
    ],
    "imageCount": 11,
    "floorplanUrl": "https://media.onthemarket.com/properties/20863132/1662300373/floor-plan-0-1024x1024.jpg",
    "description": "Situated in a sought-after and well-connected residential location in Harold Wood, this beautifully presented two double bedroom, second-floor apartment offers an excellent combination of space, comfort and convenience, making it an ideal purchase for first...",
    "features": [
        "Tenure: Leasehold (118 years remaining)",
        "Two Double Bedroom Apartment",
        "Communal Parking",
        "Long Length Lease"
    ],
    "propertyLabels": [
        "Study"
    ],
    "nearestStation": "Harold Wood",
    "nearestSchool": "Redden Court School",
    "broadbandSpeedMbps": 35,
    "exclusive": true,
    "recentlyAdded": true,
    "param_ground_rent": "£10 per annum | review period: unconfirmed",
    "param_service_charge": "£1,500 per annum",
    "param_council_tax": "Band B",
    "param_broadband": "Super-fast 35Mbps *"
}
```

### How it works

1. Builds an OnTheMarket search URL from `mode`, `location`, price and bedroom filters - e.g. `https://www.onthemarket.com/for-sale/property/london/?min-price=200000&min-bedrooms=2`.
2. Fetches result pages with a plain HTTP client (CheerioCrawler) at up to 10 concurrent requests, parsing the embedded `__NEXT_DATA__` JSON (30 properties per page).
3. With `fetchDetails` enabled, visits each property's `/details/<id>/` page and merges description, tenure, EPC, key facts, stations/schools and floorplan into the same flat item. Detail failures fall back to the search-card data.
4. Paginates automatically until `maxItems` is reached.

### Use with AI agents (MCP), n8n, Make, and Python

- **AI agents / MCP:** add `https://mcp.apify.com/?tools=evpp/onthemarket-uk` to your MCP client, then ask the agent to scrape OnTheMarket data or export the latest dataset.
- **n8n / Make / Zapier:** run Actor `evpp/onthemarket-uk` with the quick-start input, then map dataset items into Google Sheets, a CRM, a webhook, or a monitoring workflow.
- **Python:** install the client with `pip install apify-client` and run:

```python
import json
from apify_client import ApifyClient

client = ApifyClient()
run_input = json.loads('''{"mode":"for-sale","location":"london","fetchDetails":true,"maxItems":10}''')
run = client.actor("evpp/onthemarket-uk").call(run_input=run_input)
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(items[0])
```

The same dataset is available as JSON, CSV, Excel, XML, RSS, and HTML through the Apify API.

### Cost

The Actor runs on HTTP requests only - no browser, so a single run costs almost nothing in compute. With `fetchDetails` on, scraping **1,000 properties** (about 34 search pages + 1,000 detail pages) typically finishes in **~10 minutes** on 256-512 MB of memory; list-only mode is roughly 30x cheaper. With pay-per-event pricing of **$3.00 per 1,000 properties**, cost is linear and predictable.

### Limits & notes

- OnTheMarket caps deep pagination at roughly page 34 (~1,000 results). For large harvests, split runs by location, price band or bedroom count.
- Prices are asking prices in GBP; rentals are monthly (`pcm` in `priceQualifier`, weekly equivalent stays in `priceLabel`). `POA` listings have no `price` field.
- `postcode` is the outcode (e.g. `SE6`) - OnTheMarket does not publish full postcodes.
- `description` is trimmed to ~400 characters and `tenancyInfo` to ~300 for compact items.
- Please respect OnTheMarket's terms of service - this Actor reads publicly available listing pages only.

### FAQ

**Do I need a proxy?** No - listing pages are fetched directly and the default works. Enable a proxy only if you run very large jobs and hit rate limits.

**How fresh is the data?** Real-time: every run fetches live pages, and `addedReduced` surfaces new and reduced listings.

**Why `param_*` fields?** Detail pages carry a variable set of key facts (tenure, ground rent, service charge, council tax, broadband, mobile signal). Instead of hardcoding a few, the Actor exports all of them flat so nothing is lost.

**Can I scrape a city that is not in the enum?** Yes - `location` is free text. Use any OnTheMarket location slug from the site's search URLs (`cambridge`, `st-albans`, `cornwall`, ...).

**What does `fetchDetails: false` do?** It skips detail pages entirely, so a 1,000-item run needs only ~34 requests. You lose `description`, `tenure`, `epcRating`, `param_*`, POIs and floorplan, but keep all search-card fields.

# Actor input Schema

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

Whether to scrape properties for sale or to rent. Maps to /for-sale/property/<location>/ or /to-rent/property/<location>/ URLs.

## `location` (type: `string`):

OnTheMarket location slug as it appears in search URLs, e.g. london, manchester, edinburgh, bristol, brighton, cornwall or an outcode like se6. Towns, cities, regions and counties all work.

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

Only show properties priced at or above this amount in GBP (OnTheMarket 'min-price' filter). For rentals this is the monthly rent. Leave empty for no lower bound.

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

Only show properties priced at or below this amount in GBP (OnTheMarket 'max-price' filter). For rentals this is the monthly rent. Leave empty for no upper bound.

## `minBeds` (type: `integer`):

Only show properties with at least this many bedrooms (OnTheMarket 'min-bedrooms' filter). Leave empty for no lower bound.

## `maxBeds` (type: `integer`):

Only show properties with at most this many bedrooms (OnTheMarket 'max-bedrooms' filter). Leave empty for no upper bound.

## `fetchDetails` (type: `boolean`):

When enabled (default), the Actor also visits each property's detail page to collect the description, tenure, EPC rating, council tax, ground rent, service charge, nearest station/school, broadband speed and floorplan. Disable it for faster list-only harvests (search-card fields only).

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

Maximum number of properties to push to the dataset. OnTheMarket returns 30 listings per search page; the Actor stops as soon as this many items are collected.

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

Proxy settings for outbound requests. Not needed for this Actor: OnTheMarket pages are fetched directly. Keep disabled unless you hit rate limits on very large runs.

## Actor input object example

```json
{
  "mode": "for-sale",
  "location": "london",
  "fetchDetails": true,
  "maxItems": 15,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset containing all scraped OnTheMarket properties

# 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 = {
    "location": "london",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("evpp/onthemarket-uk").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 = {
    "location": "london",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("evpp/onthemarket-uk").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 '{
  "location": "london",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call evpp/onthemarket-uk --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,evpp/onthemarket-uk"
        }
    }
}
```

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/Tf2EYIJR6WiiqevJl/builds/bH4rqHMWyWaNr65tk/openapi.json
