# OnTheMarket Property Scraper - UK Sale, Rent & New Homes (`confidential_gnat/onthemarket-property-scraper`) Actor

Scrapes UK property listings from OnTheMarket (onthemarket.com): price, address, coordinates, bedrooms, agent contacts, images, floorplans, EPC, council tax, tenure, broadband and schools. Search by location or URL, with price-change and delisting tracking.

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

## Pricing

from $1.50 / 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/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 Property Scraper (UK Sale, Rent & New Homes)

**Scrape UK property listings from OnTheMarket (onthemarket.com)**: price, address, coordinates, bedrooms, agent contacts, images, floorplans, EPC rating, council tax, tenure, broadband, schools, stations and area stats. Search by location or paste any filtered search URL, then export **JSON, CSV or Excel**, or call it as an **API**. It also tracks **price changes and delistings** between runs.

**Target website:** [OnTheMarket (onthemarket.com)](https://www.onthemarket.com)

### ✨ Features of this OnTheMarket property scraper

- **Property listing extraction** — properties for sale, to rent and new homes from search pages, with 50+ fields per property when details are on.
- **Pagination support** — walks every results page for each search.
- **Search by location, URL or property page** — type `london`, `manchester` or `sw1`, paste a search URL with filters already applied, or paste a property URL such as `https://www.onthemarket.com/details/20309371/`.
- **Filtering** — price, bedrooms, property type, radius, recently added, furnishing, sort order, keywords, and special filters such as reduced, auction, retirement, shared ownership, pet friendly and student.
- **Beyond the 1,000-result limit** — the site stops at about 1,000 results per search. When you ask for more, the scraper splits the search into price ranges on the site's own price steps, so every range fits and you do not pay for tiny ranges.
- **Widen the area automatically** — when a location has fewer properties than you asked for, the search radius grows step by step, only as far as needed.
- **Cache, price changes and delistings** — use one cache name across scheduled runs to get only new properties and price changes, plus properties that have disappeared.
- **Proxy support** — configurable, off by default.
- **No browser required** — fast and cheap runs.

### 🚀 How to scrape OnTheMarket property listings in 5 steps

1. [Sign up](https://apify.com/sign-up) for a free Apify account — includes **$5 monthly credit**.
2. Open the actor page and click **Try for free**.
3. Add one or more **locations** (for example `london`) or paste OnTheMarket search URLs.
4. Click **Start** and wait for the run to complete.
5. Download results from the **Output** tab in JSON, CSV, or Excel format.

You can also run this actor via the [Apify API](https://docs.apify.com/api/v2) or integrate it directly into your workflows using [Zapier](https://zapier.com/apps/apify), [Make](https://www.make.com/), or [n8n](https://n8n.io/).

### 💰 Pricing

This actor uses **pay-per-event** billing: a charge for each property saved, plus a charge for each property whose full detail page is scraped.

- New Apify accounts include **$5 of free monthly credit**.
- It uses plain HTTP requests, so it costs significantly less to run than browser-based scrapers.
- Proxies are off by default, which keeps runs cheapest.
- Turn **Scrape property details** off for fast, cheaper listing-card data.
- With a cache name, properties you already have are skipped and not charged.

### 🔧 Input configuration

The form is short on purpose: paste a URL, optionally add a cache name, and set how many items you want. Everything else sits in the collapsible **Filters and options** section, because a search URL already carries its own filters.

![OnTheMarket property scraper input form with the search URL, cache project name and max items fields marked 1, 2 and 3](https://i.postimg.cc/XvMRskfM/image.png)

The numbered markers in the screenshot show the three fields most runs need:

1. **Search or property URLs** — paste an OnTheMarket search page (with any filters already applied) or a property page such as `https://www.onthemarket.com/details/20309371/`.
2. **Cache project name** — optional. Use the same name on every scheduled run to receive only new properties and price changes.
3. **Max items per search** — how many properties to save for each search URL (20 by default).

| Field | Type | Required | Default | Description |
| ----- | ---- | -------- | ------- | ----------- |
| Search or property URLs | array | — | new-york for-sale search | OnTheMarket search pages (filters in the URL are used as they are) or property pages. |
| Cache project name | string | — | — | Same name on each scheduled run gives only new properties and price changes. |
| Max items per search | integer | — | 20 | Per location or search URL. Above 1,000 the search is split by price automatically. |
| **Filters and options** (collapsible) | | | | |
| Locations | array | — | — | Towns, areas or postcode districts such as `london`, `manchester`, `sw1`. |
| Listing type | string | — | for-sale | for-sale, to-rent or new-homes. |
| Property type | string | — | property | Any, houses, flats-apartments, detached, semi-detached, terraced, bungalows, land, farms-land. |
| Minimum / maximum price (£) | integer | — | — | Sale price, or monthly rent. |
| Minimum / maximum bedrooms | integer | — | — | Bedroom range. |
| Search radius (miles) | string | — | this area only | 0.25 to 40 miles. |
| Recently added | string | — | — | Last 24 hours, 3 days or 7 days. |
| Furnishing (rentals) | string | — | — | furnished, part-furnished, unfurnished. |
| Sort by / direction | string | — | recommended / asc | recommended, price or update_date. |
| Special filters | array | — | — | reduced, auction, retirement, shared-ownership, pet-friendly, online-viewings, student, house-share. |
| Include under offer / let agreed | boolean | — | false | Also return properties already under offer or let agreed. |
| Keywords | string | — | — | For example garden. |
| Scrape property details | boolean | — | true | Open each property page for the full data set. |
| Widen the area if there are too few results | boolean | — | true | Grow the radius until Max items can be reached. |
| Track delistings | boolean | — | false | Needs a cache name. Adds records for properties that disappeared. |
| Max concurrency | integer | — | 4 | Parallel requests. |
| Max requests per minute | integer | — | 150 | Keeps the run under the site's rate limit. |
| Proxy configuration | object | — | no proxy | For large runs with rate-limit errors. |

**Supported URL types:**

- Search pages: `https://www.onthemarket.com/for-sale/property/london/`, `/to-rent/...`, `/new-homes/...`, with any filters in the query string
- Property pages: `https://www.onthemarket.com/details/20309371/`

### 📦 OnTheMarket property scraper output data

The dataset is JSON, one record per property, with the keys `id`, `url`, `title`, `propertyType`, `channel`, `label`, `price`, `priceNumeric`, `pricePeriod`, `pricePerWeek`, `shortPrice`, `priceQualifier`, `bedrooms`, `bathrooms`, `address`, `locality`, `postcode`, `latitude`, `longitude`, `features`, `summary`, `description`, `descriptionHtml`, `images`, `imageCount`, `coverImage`, `floorplans`, `virtualTours`, `videos`, `documents`, `agentName`, `agentCompany`, `agentBranchId`, `agentPhone`, `agentAddress`, `agentWebsite`, `agentUrl`, `agentLogo`, `agentRank`, `tenure`, `leaseYearsRemaining`, `councilTaxBand`, `keyInfo`, `epcRating`, `broadband`, `mobileReception`, `stations`, `schools`, `areaAveragePrice`, `areaAverageLabel`, `crimeLevel`, `crimeScore`, `soldNearby`, `totalViews`, `listingStatus`, `isReduced`, `isRecentlyAdded`, `isSpotlight`, `isPremium`, `isExclusive`, `isNewHome`, `hasVirtualTour`, `pricePerBedroom`, `priceVsAreaAveragePct`, `changeType`, `previousPrice`, `searchUrl` and `scrapedAt`. With details switched off you get the listing-card fields only.

There is 1 dataset view: **Overview**, a compact table of id, title, price, bedrooms, bathrooms, address, postcode, type, agent, change type and link.

**Output at a glance:**

| Property | Price | Beds | Baths | Postcode | Tenure | EPC |
| -------- | ----- | ---- | ----- | -------- | ------ | --- |
| [3 bedroom townhouse for sale](https://www.onthemarket.com/details/20061523/) | £300,000 | 3 | 2 | NE29 9JE | Ask agent | C |
| [2 bedroom apartment for sale](https://www.onthemarket.com/details/19090598/) | £80,000 | 2 | 1 | NE29 8AT | Leasehold | — |
| [2 bedroom flat for sale](https://www.onthemarket.com/details/19925537/) | £95,000 | 2 | 1 | NE29 8DN | Leasehold | D |
| [2 bedroom terraced house for sale](https://www.onthemarket.com/details/20335629/) | £159,950 | 2 | 1 | NE29 8BQ | Leasehold | C |
| [3 bedroom terraced house for sale](https://www.onthemarket.com/details/20464589/) | £247,500 | 3 | 1 | NE29 9EA | Freehold | — |

**Sample output (raw JSON):**

```json
[
  {
    "id": "20061523",
    "url": "https://www.onthemarket.com/details/20061523/",
    "title": "3 bedroom townhouse for sale",
    "propertyType": "Townhouse",
    "channel": "for-sale",
    "label": "Spotlight Property",
    "price": "£300,000",
    "priceNumeric": 300000,
    "pricePeriod": null,
    "pricePerWeek": null,
    "shortPrice": "£300k",
    "priceQualifier": null,
    "bedrooms": 3,
    "bathrooms": 2,
    "address": "Bishopbourne Court, North Shields NE29",
    "postcode": "NE29 9JE",
    "latitude": 55.025684,
    "longitude": -1.45621,
    "features": [
      "Spacious Three-Bedroom Townhouse",
      "Impressive Principal Bedroom with Private En-Suite"
    ],
    "images": [
      "https://media.onthemarket.com/properties/20061523/1634380724/image-0-1024x1024.jpg",
      "https://media.onthemarket.com/properties/20061523/1634380724/image-1-1024x1024.jpg"
    ],
    "imageCount": 14,
    "coverImage": "https://media.onthemarket.com/properties/20061523/1634380724/image-0-1024x1024.jpg",
    "agentName": "Rook Matthews Sayer - Whitley Bay",
    "agentPhone": "020 4645 3863",
    "agentUrl": "https://www.onthemarket.com/agents/branch/rook-matthews-sayer-whitley-bay/",
    "agentLogo": "https://media.onthemarket.com/agents/companies/845/260218120131859/logo-190x100.png",
    "listingStatus": "Added > 14 days",
    "isReduced": false,
    "isSpotlight": false,
    "isPremium": true,
    "isExclusive": false,
    "isRecentlyAdded": true,
    "hasVirtualTour": false,
    "changeType": null,
    "previousPrice": null,
    "searchUrl": "https://www.onthemarket.com/for-sale/property/new-york/?sort-field=recommended",
    "scrapedAt": "2026-10-06T17:33:53.983Z",
    "locality": "North Shields",
    "summary": "Arranged across three floors, this spacious three-bedroom townhouse offers an versatile layout, with generous reception space, two particularly substantial u...",
    "description": "Arranged across three floors, this spacious three-bedroom townhouse offers an versatile layout, with generous reception space, two particularly substantial u...",
    "descriptionHtml": "<p>Arranged across three floors, this spacious three-bedroom townhouse offers an versatile layout, with generous reception space, two particularly substantia...",
    "floorplans": [
      "https://media.onthemarket.com/properties/20061523/1634380724/floor-plan-0-original.jpg"
    ],
    "virtualTours": [],
    "videos": [],
    "documents": [
      {
        "name": "Full Details",
        "url": "http://www.expertagent.co.uk/in4glestates/{1228D913-6598-46D3-B2C8-D176A1DA7F9D}/{bd8957e4-e637-410b-8295-7d216da99a32}/external.pdf",
        "brochure": true
      }
    ],
    "agentCompany": "Rook Matthews Sayer",
    "agentBranchId": 3775,
    "agentAddress": "84 Park View, Whitley Bay, NE26 2TH",
    "agentWebsite": "https://www.rookmatthewssayer.co.uk",
    "tenure": "Ask agent",
    "leaseYearsRemaining": null,
    "councilTaxBand": null,
    "keyInfo": {
      "Tenure": "Ask agent",
      "Council tax": "Ask agent",
      "Broadband": "Ultra-fast 1000Mbps *"
    },
    "epcRating": "C",
    "broadband": {
      "type": "ultra-fast",
      "maxDownloadMbps": 1000,
      "maxUploadMbps": 100
    },
    "mobileReception": {
      "o2": "green",
      "three": "green",
      "vodafone": "green",
      "ee": "green"
    },
    "stations": [
      {
        "name": "Cullercoats (Tyne and Wear Metro Station)",
        "distance": "1.0mi."
      },
      {
        "name": "Whitley Bay (Tyne and Wear Metro Station)",
        "distance": "1.1mi."
      }
    ],
    "schools": [
      {
        "name": "Preston Grange Primary School",
        "distance": "0.3mi."
      },
      {
        "name": "John Spence Community High School",
        "distance": "0.3mi."
      }
    ],
    "areaAveragePrice": 242094,
    "areaAverageLabel": "3 bedroom townhouses",
    "crimeLevel": "very-low",
    "crimeScore": 2,
    "soldNearby": [
      {
        "address": "Eden Place, North Shields NE30",
        "propertyType": "Semi-detached house",
        "price": "£325,000",
        "date": null
      },
      {
        "address": "Solway Avenue, North Shields NE30",
        "propertyType": "Semi-detached house",
        "price": "£320,000",
        "date": null
      }
    ],
    "totalViews": "2500+",
    "isNewHome": false,
    "agentRank": 2,
    "pricePerBedroom": 100000,
    "priceVsAreaAveragePct": 23.9
  }
]
```

### 🐍 How to scrape OnTheMarket with Python, JavaScript or the API

Run the actor programmatically with the official Apify clients. Replace `<YOUR_API_TOKEN>` with the token from your [Apify Console](https://console.apify.com/account/integrations).

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run = client.actor("confidential_gnat/onthemarket-property-scraper").call(run_input={
    "locations": ["london"],
    "channel": "for-sale",
    "maxPrice": 500000,
    "minBedrooms": 2,
    "maxItems": 100,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**JavaScript** (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const run = await client.actor('confidential_gnat/onthemarket-property-scraper').call({
    locations: ['london'],
    channel: 'for-sale',
    maxPrice: 500000,
    minBedrooms: 2,
    maxItems: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**cURL** — start a run and wait for the dataset:

```bash
curl -X POST "https://api.apify.com/v2/acts/confidential_gnat~onthemarket-property-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"locations": ["london"], "channel": "for-sale", "maxPrice": 500000, "minBedrooms": 2, "maxItems": 100}'
```

### 💡 What you can use OnTheMarket property data for

- Price monitoring and alerts for reduced properties in chosen areas
- Rental yield and buy-to-let analysis using sale and rent data side by side
- Estate agent competitor tracking by branch, listings and pricing
- Lead lists of agents and branches with phone numbers and websites
- Local market research on tenure, council tax, EPC ratings, broadband and schools

Property investors, estate agents, proptech companies, mortgage brokers and market researchers typically use this data.

### ⚠️ Limitations & known issues

- **1,000 results per search** — the site never shows more than about 1,000 results for one search. The scraper splits larger searches by price automatically, but if a single price is shared by more than 1,000 listings the first 1,000 are collected and a warning is logged.
- **Rate limiting** — fast runs without a proxy can be rate limited. The default of 150 requests per minute stays under it; use a datacenter proxy for large runs.
- **Missing fields** — some fields (tenure, council tax, EPC) are only shown by some agents, so they are empty for some properties.
- **UK only** — only properties listed on onthemarket.com are covered.

### ❓ Frequently asked questions

#### Can I scrape OnTheMarket legally?

The actor only collects data already publicly visible on onthemarket.com — no login, paywall, or private content is accessed. Scraping publicly available data is generally considered lawful (see *hiQ Labs v. LinkedIn*), but you are responsible for complying with the site's Terms of Service and applicable laws such as GDPR if you process personal data like agent contact details.

#### What data does the OnTheMarket scraper return?

Price, address, postcode, coordinates, bedrooms, bathrooms, property type, features, images, agent name and phone. With details on you also get the description, floorplans, videos, EPC rating, council tax band, tenure and lease length, broadband and mobile signal, nearby schools and stations, area average price, crime level and nearby sold prices.

#### How many properties can I scrape from one search?

**Max items per search** applies to each location or URL separately. A single search shows at most about 1,000 results, so for larger numbers the actor splits it into price ranges automatically.

#### Do I need a proxy to scrape onthemarket.com?

No. Proxies are off by default and small and medium runs work without one. For very large runs, enable a datacenter proxy if you see rate-limit errors.

#### How do I scrape OnTheMarket with Python?

Use the Python example above and iterate over the dataset items returned by the run.

#### Can I run this OnTheMarket scraper on a schedule?

Yes, with Apify Schedules. Give every scheduled run the same **Cache project name** and you only receive new properties and price changes, each marked with `changeType`. Turn on **Track delistings** to also get records for properties that have disappeared.

#### What output formats are supported?

JSON, CSV, Excel, XML and RSS, either from the **Output** tab or through the Apify API.

#### What if my location has very few properties?

If a location has fewer properties than **Max items**, the actor widens the search radius step by step until the target is reachable, and logs the radius it used. Turn **Widen the area** off, or set a radius yourself, to stay in the exact area.

### 🔗 Other actors you may find useful

| Actor | Description |
| ----- | ----------- |
| [🎓 University Living Housing Scraper](https://apify.com/confidential_gnat/universityliving-housing-scraper) | Scrapes student housing listings and property details from universityliving.com. |
| [🛏️ AmberStudent Accommodation Scraper](https://apify.com/confidential_gnat/amberstudent-accomodation-scraper) | Scrapes student accommodation with pricing, availability, photos, amenities and reviews. |
| [⛪ Church Finder Scraper](https://apify.com/confidential_gnat/churchfinder-scraper) | Scrapes church listings with denomination, address, phone, service times and reviews. |
| [🏢 UniAcco Student Accommodation Scraper](https://apify.com/confidential_gnat/uniacco-property-scraper) | Scrapes UniAcco student accommodation with price range, address, amenities and reviews. |
| [🏠 HousingAnywhere Property Scraper](https://apify.com/confidential_gnat/housinganywhere-property-scraper) | Scrapes HousingAnywhere rentals with price, city, coordinates, facilities and images. |

### 💬 Support & contact

If you encounter any issues or have questions, please [open an issue](https://apify.com/confidential_gnat/onthemarket-property-scraper/issues/open) or reach out via the [Apify Community Forum](https://community.apify.com/).

You can also find more of our actors on the [Actor Flow](https://apify.com/confidential_gnat) page.

# Actor input Schema

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

OnTheMarket search result pages or property pages, for example https://www.onthemarket.com/for-sale/property/london/ or https://www.onthemarket.com/details/20309371/. Any filters already in a search URL are used as they are, so you usually need nothing else.

## `cacheProjectName` (type: `string`):

Use the same name on each scheduled run to get only new properties and price changes. Properties already seen with the same price are skipped and not charged. Each record gets a changeType: new or price_change.

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

Maximum properties saved for each search URL or location. Above 1,000 the search is split by price automatically.

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

Towns, areas or postcode districts such as london, manchester, sw1. Each one is searched with the filters below.

## `channel` (type: `string`):

Applies to the locations above.

## `propertyType` (type: `string`):

Applies to the locations above (not used for new homes).

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

Sale price, or monthly rent for rentals.

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

Sale price, or monthly rent for rentals.

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

Fewest bedrooms. Leave empty for no minimum.

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

Most bedrooms. Leave empty for no maximum.

## `radius` (type: `string`):

Include nearby areas. Leave empty for this area only.

## `recentlyAdded` (type: `string`):

Only properties added within this period. Leave empty for all.

## `furnished` (type: `string`):

Furnishing filter, for rentals only. Leave empty for all.

## `sortField` (type: `string`):

How results are ordered.

## `sortDirection` (type: `string`):

Used when sorting by price.

## `specialFilters` (type: `array`):

Keep only listings of these kinds.

## `includeUnderOffer` (type: `boolean`):

Also return properties that are already under offer or let agreed.

## `keywords` (type: `string`):

Only listings mentioning this word, for example garden.

## `scrapeDetails` (type: `boolean`):

Opens each property page for the full description, floorplans, EPC, council tax, broadband, schools, stations, area stats and more. Billed as a property-details event. Turn off for fast, cheap listing-card data.

## `expandSearchArea` (type: `boolean`):

When a location has fewer results than Max items, the search radius is widened step by step (up to 40 miles) just enough to reach it. Does nothing when the URL or Search radius already sets a radius.

## `trackDelistings` (type: `boolean`):

Needs a cache project name. Adds a record with changeType delisted for properties that were in a search last time but are gone now. Only checked for searches that were scraped completely.

## `maxConcurrency` (type: `integer`):

Parallel requests. Keep low without a proxy.

## `maxRequestsPerMinute` (type: `integer`):

Slows the run down to stay under the site's rate limit. Raise it only with a proxy.

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

Not needed for small runs. Use datacenter proxies for large runs (thousands of properties) if you see rate-limit errors.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.onthemarket.com/for-sale/property/new-york/?view=map-list"
    }
  ],
  "maxItems": 20,
  "locations": [],
  "channel": "for-sale",
  "propertyType": "property",
  "sortField": "recommended",
  "sortDirection": "asc",
  "specialFilters": [],
  "includeUnderOffer": false,
  "scrapeDetails": true,
  "expandSearchArea": true,
  "trackDelistings": false,
  "maxConcurrency": 4,
  "maxRequestsPerMinute": 150,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (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/for-sale/property/new-york/?view=map-list"
        }
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("confidential_gnat/onthemarket-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 = {
    "startUrls": [{ "url": "https://www.onthemarket.com/for-sale/property/new-york/?view=map-list" }],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("confidential_gnat/onthemarket-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 '{
  "startUrls": [
    {
      "url": "https://www.onthemarket.com/for-sale/property/new-york/?view=map-list"
    }
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call confidential_gnat/onthemarket-property-scraper --silent --output-dataset

```

## MCP server setup

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