# OnTheMarket Scraper\[$1.5/1k] (`melah/onthemarket-scraper`) Actor

Extract detailed property listings from OnTheMarket in seconds. Scrape both properties for sale and rent using search result URLs or individual property URLs. Get structured JSON including prices, location, features, images, and estate agent details—ready for analysis or integration.

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

## Pricing

from $1.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/platform/actors/running/actors-in-store#pay-per-event

## 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 Property Scraper

Extract detailed property listings from **OnTheMarket** for both **Properties for Sale** and **Properties to Rent**.

Simply provide one or more OnTheMarket search URLs and specify the maximum number of listings you want. The actor automatically crawls all relevant result pages, visits each property listing, and returns comprehensive, structured property data in JSON format.

Whether you're building a property database, analyzing market trends, monitoring listings, or integrating real estate data into your application, this actor saves you hours of manual work.

---

### Input

#### `startUrls`

Provide one or more OnTheMarket search result URLs.

These can include any search filters available on OnTheMarket, such as:

* Location
* Property type
* Sale or Rent
* Minimum & maximum price
* Number of bedrooms
* Radius
* New homes
* Added date
* And any other supported search filters


Also, start Url can also be list of detail Urls.

Example:

```json
{
    "startUrls": [
        {
            "url": "https://www.onthemarket.com/to-rent/property/bs1/?max-price=2000&min-bedrooms=1&min-price=1250"
        },
        {
            "url": "https://www.onthemarket.com/details/19772799/"
        }
    ],
    "maxResults": 100
}
````

***

### `maxResults`

Specify the maximum number of property listings you want returned.

The actor will stop once approximately this number of properties has been collected.

***

## How it Works

The actor automatically:

- Reads your search URL(s)
- Crawls every search results page
- Finds every property listing
- Visits each property detail page
- Extracts structured information
- Returns the data in a clean JSON format

Supports both:

✅ Properties for Sale

✅ Properties for Rent

***

## Output

Every property contains detailed information similar to the example below.

#### Property Information

- Property ID
- Search Type (Sale / Rent)
- Property Title
- Full Property URL
- Source Search URL
- Property Address
- Price
- Formatted Price
- Bedrooms
- Bathrooms
- Property Latitude
- Property Longitude
- Days on Market

#### Property Features

Returns available property features, for example:

- No admin fees
- Flexible tenancy
- Roof terrace
- Balcony
- Garden
- Parking
- Gym
- Concierge
- Lift
- Furnished status
- EPC information
- And many more depending on the listing

#### Images

Returns all available listing images, including:

- Interior photos
- Exterior photos
- Floor plans (when available)
- EPC images (when available)

#### Estate Agent Information

Returns agent details such as:

- Agent ID
- Agent Name
- Agent Phone Number
- Agent Website
- Contact URL
- Agent Logo
- Agent Office Coordinates

***

### Example Output

```json
{
    "search_type": "to-rent",
    "id": "19778817",
    "title": "Apartment in Bristol to rent",
    "property_location_lat": 51.448227,
    "property_location_lon": -2.584184,
    "url": "https://www.onthemarket.com/details/19778817/",
    "source_url": "/to-rent/property/bs1/",
    "adress": "B217 Cranberry House, Redcliff Street BS1",
    "price": 1645,
    "short_price": "£1,645",
    "bathrooms": 1,
    "bedrooms": 1,
    "days_on_market": "Added < 14 days",
    "features": [...],
    "images": [...],
    "agent_id": 71395,
    "agent_name": "Grainger - Glasshouse Square",
    "agent_phone": "0117 295 3190",
    "agent_url": "...",
    "agent_contact_url": "...",
    "agent_logo": "...",
    "agent_location_lat": 51.448227,
    "agent_location_lon": -2.584184
}
```

***

## Common Use Cases

This actor is perfect for:

- Real estate market research
- Property investment analysis
- Rental market monitoring
- Property price tracking
- Building real estate databases
- Lead generation
- Competitor analysis
- Data science projects
- BI dashboards
- Property search platforms
- CRM integrations

***

## Need More Data?

If there's additional information you'd like to extract that isn't currently included in the output, feel free to reach out.

I'm continuously improving this actor and welcome feature requests. If the data is available on the property page, I'll do my best to add it in a future update.

***

## Export Your Results

Your extracted data can be exported directly from Apify in multiple formats, including:

- JSON
- CSV
- Excel
- XML
- HTML
- RSS

Or accessed programmatically through the Apify API for seamless integration into your own applications and workflows.

# Actor input Schema

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

URLs to start scraping from.

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

Maximum number of items to extract before stopping.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.onthemarket.com/to-rent/property/city-of-bristol/"
    },
    {
      "url": "https://www.onthemarket.com/details/19772799/"
    }
  ],
  "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 = {
    "startUrls": [
        {
            "url": "https://www.onthemarket.com/to-rent/property/city-of-bristol/"
        },
        {
            "url": "https://www.onthemarket.com/details/19772799/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("melah/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 = { "startUrls": [
        { "url": "https://www.onthemarket.com/to-rent/property/city-of-bristol/" },
        { "url": "https://www.onthemarket.com/details/19772799/" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("melah/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 '{
  "startUrls": [
    {
      "url": "https://www.onthemarket.com/to-rent/property/city-of-bristol/"
    },
    {
      "url": "https://www.onthemarket.com/details/19772799/"
    }
  ]
}' |
apify call melah/onthemarket-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OnTheMarket Scraper[$1.5/1k]",
        "description": "Extract detailed property listings from OnTheMarket in seconds. Scrape both properties for sale and rent using search result URLs or individual property URLs. Get structured JSON including prices, location, features, images, and estate agent details—ready for analysis or integration.",
        "version": "0.0",
        "x-build-id": "ax6vtgvVhPX6zOAu2"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/melah~onthemarket-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-melah-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/melah~onthemarket-scraper/runs": {
            "post": {
                "operationId": "runs-sync-melah-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/melah~onthemarket-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-melah-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",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "URLs to start scraping from.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of items to extract before stopping.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
