# OnTheMarket UK Real Estate & Property Scraper (`plastic_bisque/onthemarket-uk-scraper`) Actor

Fast, high-performance scraper for OnTheMarket.com UK real estate listings. Extracts property prices, geocodes, floor areas, bedrooms, agent info, and 32 institutional-grade fields without browser overhead.

- **URL**: https://apify.com/plastic_bisque/onthemarket-uk-scraper.md
- **Developed by:** [Le Hung](https://apify.com/plastic_bisque) (community)
- **Categories:** Real estate, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 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.

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

## 🏢 OnTheMarket UK Real Estate & Property Scraper

> **High-speed, institutional-grade scraper for OnTheMarket.com**. Extracts real estate properties for sale and to rent across the United Kingdom with prices, coordinates, floor areas, bedroom counts, and estate agent contacts.

***

### ⚡ Why Use This Scraper?

- **Blazing Fast & Cost Efficient**: Unlike heavy browser-based scrapers (Puppeteer/Playwright) that consume massive Compute Units (CU) and take hours, this actor directly extracts structured JSON data from OnTheMarket's Next.js application layer via fast HTTP requests.
- **Zero Headless Overhead**: Consumes minimal memory (~128MB RAM), reducing your Apify cloud execution costs by up to **80%**.
- **Institutional Quality Schema**: Outputs clean, standardized data matching the institutional `REAL-ESTATE-BASIC` 32-attribute specification.
- **Full UK Coverage**: Supports all 33 Greater London boroughs, all major UK metropolitan areas (Manchester, Birmingham, Leeds, Glasgow, etc.), and UK postal districts (outcodes).
- **No API Keys or Login Required**: Works out of the box with optional proxy support for high-volume jobs.

***

### 📋 What Data Does It Extract?

Every scraped property listing includes 32 standardized attributes:

- **Listing Details**: Unique Listing ID, Title, Property Type (Detached, Semi-detached, Terraced, Flat, Bungalow, Maisonette, etc.).
- **Pricing**: Current Price (£ GBP), Original Price, and calculated **Price per m²** (`price_per_sqm`). Fully supports both sales prices and rental rates (pcm / pw).
- **Property Specs**: Number of bedrooms/rooms, bathrooms, estimated/extracted floor area in square meters (`area_sqm`).
- **Amenities Detected**: Indicators for parking/garage (`has_parking`), terrace/balcony (`has_terrace`), garden (`has_garden`), swimming pool (`has_pool`), and elevator/lift (`has_elevator`).
- **Location & Geocodes**: Full address, city, region, postal outcode, and exact **Latitude** & **Longitude** for GIS mapping.
- **Estate Agency**: Agency brand name, branch phone number.
- **Media & URLs**: Direct listing URL on OnTheMarket and high-resolution main photo URL.

***

### 🛠️ Input Parameters

| Parameter | Type | Required | Default | Description |
| :--- | :---: | :---: | :---: | :--- |
| `locations` | Array | No | `["camden", "westminster"]` | List of UK locations, boroughs, cities, or postal outcodes (e.g. `camden`, `manchester`, `SW1A`, `E1`). |
| `startUrls` | Array | No | `null` | Optional direct OnTheMarket search or listing URLs (e.g. `https://www.onthemarket.com/for-sale/property/camden/`). |
| `operationType` | String | **Yes** | `"for-sale"` | Choose `"for-sale"` (properties for sale) or `"to-rent"` (properties to rent). |
| `minPrice` | Integer | No | `null` | Optional minimum price in GBP (£). |
| `maxPrice` | Integer | No | `null` | Optional maximum price in GBP (£). |
| `minBedrooms` | Integer | No | `null` | Optional minimum number of bedrooms. |
| `maxBedrooms` | Integer | No | `null` | Optional maximum number of bedrooms. |
| `maxItems` | Integer | No | `100` | Maximum total records to scrape across all locations (`0` for unlimited). |
| `proxyConfiguration`| Object | No | `null` | Apify Proxy configuration (Apify Datacenter or Residential proxy). |

#### Example Input (JSON)

```json
{
  "locations": ["camden", "westminster", "manchester"],
  "operationType": "for-sale",
  "minPrice": 250000,
  "maxPrice": 1500000,
  "minBedrooms": 2,
  "maxItems": 200
}
```

***

### 📦 Sample Output Record (JSON)

```json
{
  "website_name": "onthemarket.com",
  "competence_date": "2026-10-04",
  "country_code": "GBR",
  "currency_code": "GBP",
  "listing_id": "19729283",
  "operation_type": "sale",
  "property_type": "Terraced House",
  "title": "2 bedroom terraced house for sale",
  "price": 1225000.0,
  "price_original": 1225000.0,
  "price_per_sqm": 16333.33,
  "area_sqm": 75.0,
  "rooms": "2",
  "bathrooms": "1",
  "floor": "",
  "has_elevator": "",
  "has_parking": "1",
  "has_terrace": "",
  "has_garden": "1",
  "has_pool": "",
  "energy_certificate": "",
  "region": "Camden",
  "city": "London",
  "neighborhood": "Camden High Street, London NW1",
  "address_raw": "Camden High Street, London NW1",
  "latitude": "51.5392",
  "longitude": "-0.1426",
  "agency_name": "Dexters Camden",
  "contact_phone": "020 7483 6390",
  "description": "A charming two bedroom period freehold house...",
  "itemurl": "https://www.onthemarket.com/details/19729283/",
  "imageurl": "https://media.onthemarket.com/properties/19729283/image-0-1024x768.webp"
}
```

***

### 💼 Ideal Use Cases

1. **Real Estate Investors & Buy-to-Let Analysts**: Track rental yields and price-per-sqm trends across UK metro areas.
2. **Proptech Startups**: Power automated valuation models (AVMs), property search portals, and alert bots.
3. **Estate Agencies**: Monitor competitor inventory, newly added listings, and local market price movements.
4. **Academic & Demographic Research**: Urban housing supply studies and regional UK price disparities.

***

### 🛡️ Privacy & Compliance

This Actor strictly extracts public real estate listings intended for general market viewing. No personally identifiable information (PII) of private home owners is collected. All data outputs are structured for commercial, research, and analysis workflows.

# Actor input Schema

## `locations` (type: `array`):

List of UK boroughs, cities, or postal outcodes to scrape (e.g. camden, westminster, manchester, birmingham, SW1A, E1).

## `startUrls` (type: `array`):

Optional direct OnTheMarket search or listing URLs (e.g. https://www.onthemarket.com/for-sale/property/camden/).

## `operationType` (type: `string`):

Choose whether to scrape properties for sale or to rent (ignored if direct URLs are provided).

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

Optional minimum price filter in GBP (£).

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

Optional maximum price filter in GBP (£).

## `minBedrooms` (type: `integer`):

Optional minimum number of bedrooms.

## `maxBedrooms` (type: `integer`):

Optional maximum number of bedrooms.

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

Maximum number of properties to scrape across all locations (set to 0 for unlimited).

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

Optional proxy configuration. Standard Apify Proxy or datacenter proxies work well.

## Actor input object example

```json
{
  "locations": [
    "camden",
    "westminster"
  ],
  "operationType": "for-sale",
  "maxItems": 100
}
```

# Actor output Schema

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

Structured property listings with 32 institutional fields (prices, coordinates, areas, agent info)

# 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 = {
    "locations": [
        "camden",
        "westminster"
    ],
    "operationType": "for-sale",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("plastic_bisque/onthemarket-uk-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 = {
    "locations": [
        "camden",
        "westminster",
    ],
    "operationType": "for-sale",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("plastic_bisque/onthemarket-uk-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 '{
  "locations": [
    "camden",
    "westminster"
  ],
  "operationType": "for-sale",
  "maxItems": 100
}' |
apify call plastic_bisque/onthemarket-uk-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plastic_bisque/onthemarket-uk-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/XmXfW5ASSygYcmXT4/builds/5Hr17p0Yi7dV0th8u/openapi.json
