# 🏡 OnTheMarket Scraper - UK Property Listings (`benthepythondev/onthemarket-scraper`) Actor

Scrape UK property listings (for sale & to rent) from OnTheMarket.com. Clean fields: price, bedrooms, type, address, agent, geo-coordinates & features. Filter by location, price & bedrooms.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🏡 OnTheMarket Scraper — UK Property Listings (For Sale & To Rent)

Extract **UK property listings from OnTheMarket.com**, one of Britain's three big
property portals, as clean, structured data — **price, bedrooms, property type, full
address, listing agent, geo-coordinates and key features** — for both **for sale** and
**to rent**. It reads OnTheMarket's own embedded data, so you get typed fields instead
of brittle HTML scraps, and a great complement to Rightmove/Zoopla coverage for UK
real-estate analysis, lead generation and proptech. Export to JSON/CSV/Excel, run on a
schedule, call via API, or connect to Make, Zapier or n8n.

### 🏡 What is the OnTheMarket Scraper?

It turns any OnTheMarket search into a structured dataset. Enter a location (and
optional filters for sale/rent, price or bedrooms), or paste exact search URLs for
precise control, and it returns every matching listing with full details, agent
contact and latitude/longitude. Because it parses OnTheMarket's embedded structured
data and paginates automatically, the output is clean and consistent — ready for
mapping, dashboards or a property product.

#### What data does it extract?

- **Price** as text (`£435,000`) and as a numeric `price_value` for filtering and maths
- **Price qualifier** (e.g. "Guide price", "Offers over")
- **Bedrooms, bathrooms and property type** (apartment, terraced, detached, …)
- **Full address** and the listing's **latitude/longitude** for mapping
- **Listing agent name and phone number** for lead lists
- **Key features** (balcony, parking, station distance, …) as a list
- **For-sale vs to-rent** flag and how recently it was added
- **Cover image** and the listing URL, plus a `scraped_at` timestamp

### ⬇️ Input

Run it two ways — search a location with filters, or paste exact OnTheMarket URLs:

| Field | Description |
|-------|-------------|
| `listingType` | `for-sale` or `to-rent` |
| `location` | OnTheMarket location slug, e.g. `london`, `manchester`, `bristol`, `leeds` |
| `startUrls` | Paste exact onthemarket.com search URLs (overrides the fields above; most precise) |
| `minPrice` / `maxPrice` | Price range in £ |
| `minBedrooms` | Minimum number of bedrooms |
| `maxResults` | Max listings to return (1–10000) |
| `proxyConfiguration` | Apify Proxy (default); switch to RESIDENTIAL GB if you hit blocks |

#### Example input

```json
{
  "listingType": "for-sale",
  "location": "manchester",
  "minPrice": 200000,
  "maxPrice": 500000,
  "minBedrooms": 2,
  "maxResults": 200
}
````

### ⬆️ Output

Every property is one clean row — view it as a **table**, or export **JSON / CSV /
Excel**:

```json
{
  "id": "19775581",
  "title": "2 bedroom apartment for sale",
  "property_type": "Apartment",
  "price": "£435,000",
  "price_value": 435000,
  "price_qualifier": "Guide price",
  "bedrooms": 2,
  "bathrooms": 1,
  "address": "Lombard Square, Nathan Way, Greenwich SE28",
  "listing_type": "for-sale",
  "added": "Added < 7 days",
  "latitude": 51.490498,
  "longitude": 0.086649,
  "agent_name": "Peabody",
  "agent_phone": "020 8139 0250",
  "features": ["Private balcony", "5-min walk from Plumstead Station"],
  "image": "https://media.onthemarket.com/properties/19775581/cover.jpg",
  "url": "https://www.onthemarket.com/details/19775581/",
  "scraped_at": "2026-06-26T15:30:00.000Z"
}
```

### 💡 Use cases

- **📊 UK market analysis:** track asking prices, rents and supply by area, type and bedroom count over time.
- **🎯 Lead generation:** build estate-agent and listing lead lists with names and phone numbers.
- **🛠️ Proptech & portals:** power a search product, valuation tool or alerting service with fresh listings.
- **💰 Investment sourcing:** filter by price, beds and location, then map opportunities with the geo-coordinates.

### ❓ FAQ

**How do I scrape OnTheMarket listings?** Enter a `location` slug, choose `for-sale`
or `to-rent`, add optional price/bedroom filters, and Run. You get structured listings
with price, beds, type, address, agent, geo-coordinates and features.

**Do I need an API key or login?** No — it reads publicly available listing data. Just
give it a location (or a search URL) and your filters.

**How do I find a location slug?** Search on onthemarket.com and copy the part after
`/property/` in the URL (e.g. `.../for-sale/property/london/` → `london`). For any
filter the site supports, paste the whole search URL into `startUrls`.

**Can I scrape both for sale and to rent?** Yes — set `listingType`. If you paste
`startUrls`, the Actor detects sale vs rent from each URL automatically.

**Do the listings include geo-coordinates?** Yes — every listing carries `latitude`
and `longitude`, so you can map results or run spatial analysis out of the box.

**Do I need a proxy?** Apify Proxy (the default) works for most runs. For very large
runs or if you hit blocks, switch the proxy to RESIDENTIAL with country GB.

**How many listings can it return?** Up to your `maxResults` cap (up to 10,000); it
paginates through the search results automatically.

**Can I run it on a schedule or via API?** Yes — schedule recurring runs in Apify,
call it via the API/SDK, or connect it to Make, Zapier or n8n.

**Is scraping OnTheMarket legal?** It extracts publicly available listing data. Use it
responsibly for research and lead generation, and follow applicable laws and
OnTheMarket's terms.

### 🔗 You might also like

- **[Craigslist Real Estate Scraper](https://apify.com/benthepythondev/craigslist-real-estate-scraper)** — FSBO, rentals & off-market property
- **[Redfin Scraper](https://apify.com/benthepythondev/redfin-scraper)** — US homes for sale, rent & sold
- **[Zumper Rental Scraper](https://apify.com/benthepythondev/zumper-rental-scraper)** — US apartment & rental listings

***

**Keywords:** OnTheMarket scraper, UK property data, UK real estate scraper, property listings API, Rightmove alternative, Zoopla alternative, UK house prices, rental listings UK, estate agent leads, property data export, proptech data, UK property API, houses for sale UK, flats to rent UK.

# Actor input Schema

## `listingType` (type: `string`):

Whether to scrape properties for sale or to rent.

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

OnTheMarket location slug, e.g. 'london', 'manchester', 'bristol', 'leeds'. Tip: search on onthemarket.com and copy the bit after /property/ in the URL.

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

Paste exact onthemarket.com search URLs (overrides the fields above). Most reliable for precise filters — search on the site and copy the URL.

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

Only keep listings at or above this price.

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

Only keep listings at or below this price.

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

Minimum number of bedrooms.

## `maxResults` (type: `integer`):

Maximum number of listings to return.

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

Apify Proxy is recommended. If you hit blocks on large runs, switch to RESIDENTIAL with country GB.

## Actor input object example

```json
{
  "listingType": "for-sale",
  "location": "london",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

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

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

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/onthemarket-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "listingType": "for-sale",
  "location": "london",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call benthepythondev/onthemarket-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=benthepythondev/onthemarket-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🏡 OnTheMarket Scraper - UK Property Listings",
        "description": "Scrape UK property listings (for sale & to rent) from OnTheMarket.com. Clean fields: price, bedrooms, type, address, agent, geo-coordinates & features. Filter by location, price & bedrooms.",
        "version": "0.1",
        "x-build-id": "eHNtbVquRHofIdicz"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~onthemarket-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-onthemarket-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/benthepythondev~onthemarket-scraper/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-onthemarket-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/benthepythondev~onthemarket-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-onthemarket-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "listingType": {
                        "title": "For sale or to rent",
                        "enum": [
                            "for-sale",
                            "to-rent"
                        ],
                        "type": "string",
                        "description": "Whether to scrape properties for sale or to rent.",
                        "default": "for-sale"
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "OnTheMarket location slug, e.g. 'london', 'manchester', 'bristol', 'leeds'. Tip: search on onthemarket.com and copy the bit after /property/ in the URL.",
                        "default": "london"
                    },
                    "startUrls": {
                        "title": "Start URLs (optional)",
                        "type": "array",
                        "description": "Paste exact onthemarket.com search URLs (overrides the fields above). Most reliable for precise filters — search on the site and copy the URL.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "minPrice": {
                        "title": "Min price (£)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only keep listings at or above this price."
                    },
                    "maxPrice": {
                        "title": "Max price (£)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only keep listings at or below this price."
                    },
                    "minBedrooms": {
                        "title": "Min bedrooms",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Minimum number of bedrooms."
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of listings to return.",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Apify Proxy is recommended. If you hit blocks on large runs, switch to RESIDENTIAL with country GB.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
