# OnTheMarket.com  UK Property Scraper (`agenscrape/onthemarket-com-uk-property-scraper`) Actor

Scrape UK property listings from OnTheMarket.com. Extract property details including price, bedrooms, bathrooms, images, agent info, and location coordinates.

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

## Pricing

from $3.00 / 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 Property Scraper

Extract property listings from OnTheMarket.com - one of the UK's leading property portals. Get comprehensive property data for sales and rentals across the United Kingdom.

### Features

- Extract property listings from any OnTheMarket.com search
- Supports all search filters (location, price, bedrooms, property type, etc.)
- Comprehensive property data extraction
- Pagination handling for large result sets
- Fast and reliable data collection

### Input

| Field | Type | Description |
|-------|------|-------------|
| `startUrl` | String | OnTheMarket.com search URL with your desired filters |
| `maxResults` | Integer | Maximum number of properties to extract (0 for unlimited) |

#### Example Input

```json
{
    "startUrl": "https://www.onthemarket.com/for-sale/property/leeds/?max-bedrooms=2",
    "maxResults": 50
}
```

### Output

Each property listing includes:

| Field | Description |
|-------|-------------|
| `id` | Unique property identifier |
| `propertyTitle` | Property listing title |
| `price` | Listed price |
| `shortPrice` | Abbreviated price |
| `priceQualifier` | Price qualifier (e.g., "Offers over", "Guide price") |
| `address` | Full property address |
| `bedrooms` | Number of bedrooms |
| `bathrooms` | Number of bathrooms |
| `propertyType` | Type of property |
| `features` | Array of property features |
| `images` | Array of image URLs |
| `detailsUrl` | Full URL to property details page |
| `agentName` | Estate agent name |
| `agentPhone` | Agent contact number |
| `agentLogo` | Agent logo URL |
| `latitude` | Property latitude coordinate |
| `longitude` | Property longitude coordinate |
| `daysSinceAdded` | Time since listing was added |
| `isSpotlight` | Spotlight/featured property flag |
| `isReduced` | Price reduced flag |
| `isRecentlyAdded` | Recently added flag |
| `hasVirtualTour` | Virtual tour availability |

#### Example Output

```json
{
    "id": "18158975",
    "propertyTitle": "2 bedroom ground floor flat for sale",
    "price": "£180,000",
    "shortPrice": "£180k",
    "priceQualifier": null,
    "address": "Flat 17, Centenary House, 53 North Street, Leeds, Yorkshire",
    "bedrooms": 2,
    "bathrooms": 2,
    "propertyType": "Ground floor flat",
    "features": [
        "Tenure: Leasehold (250 years remaining)",
        "Two double bedrooms",
        "En-suite",
        "Open-plan living"
    ],
    "images": [
        {
            "url": "https://media.onthemarket.com/properties/18158975/image-0-480x320.jpg",
            "webp": "https://media.onthemarket.com/properties/18158975/image-0-480x320.webp"
        }
    ],
    "detailsUrl": "https://www.onthemarket.com/details/18158975/",
    "agentName": "Rosedale & Jones",
    "agentPhone": "01924 765981",
    "latitude": 53.8015336,
    "longitude": -1.5385548,
    "daysSinceAdded": "Added > 14 days",
    "isSpotlight": true,
    "isReduced": false,
    "hasVirtualTour": false
}
```

### Use Cases

- **Property Market Research**: Analyze property prices and trends in specific areas
- **Investment Analysis**: Find investment opportunities based on location and price
- **Market Monitoring**: Track new listings and price changes
- **Data Aggregation**: Collect property data for portals and applications
- **Lead Generation**: Find properties matching specific criteria

# Actor input Schema

## `startUrl` (type: `string`):

OnTheMarket.com search URL. Go to onthemarket.com, set your search filters (location, price, bedrooms, etc.) and paste the URL here.

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

Maximum number of property listings to extract. Set to 0 for unlimited.

## Actor input object example

```json
{
  "startUrl": "https://www.onthemarket.com/for-sale/property/leeds/?max-bedrooms=2",
  "maxResults": 50
}
```

# 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 = {
    "startUrl": "https://www.onthemarket.com/for-sale/property/leeds/?max-bedrooms=2",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("agenscrape/onthemarket-com-uk-property-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 = {
    "startUrl": "https://www.onthemarket.com/for-sale/property/leeds/?max-bedrooms=2",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("agenscrape/onthemarket-com-uk-property-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 '{
  "startUrl": "https://www.onthemarket.com/for-sale/property/leeds/?max-bedrooms=2",
  "maxResults": 50
}' |
apify call agenscrape/onthemarket-com-uk-property-scraper --silent --output-dataset

```

## MCP server setup

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