{
  "openapi": "3.0.1",
  "info": {
    "title": "OnTheMarket Scraper - UK Property Listings & Agent Contacts",
    "description": "Scrape onthemarket.com for-sale, to-rent and new-homes listings with 85+ fields: price, address & geo, bedrooms/bathrooms, full description, key info, nearest stations & schools, area stats, floorplans, virtual tours and complete agent contacts. Search by location + filters or paste URLs.",
    "version": "1.0",
    "x-build-id": "Xz3zAE1eiZPFT55WQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~onthemarket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-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/abotapi~onthemarket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-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/abotapi~onthemarket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "How to start the scrape. 'Search' builds result pages from a location + filters. 'URL list' scrapes the search or property-details URLs you paste.",
            "default": "search"
          },
          "channel": {
            "title": "Channel",
            "enum": [
              "FOR-SALE",
              "TO-RENT",
              "NEW-HOMES"
            ],
            "type": "string",
            "description": "Which listings to scrape (search mode).",
            "default": "FOR-SALE"
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "One or more places to search - a town, city, postcode or area (e.g. 'London', 'Manchester', 'SW19'). Each is resolved to its OnTheMarket search area.",
            "default": [
              "London"
            ],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "URL mode only. Paste OnTheMarket search-result URLs (sale, to-rent, new homes, postcode, with filters, sort and page), property-details URLs, a place landing page (/property/london/), an agent branch page or an agents directory. Left unedited it scrapes one example of each shape. If you paste your own URLs but leave Mode on Search and Locations at London, the run switches to URL mode; if you changed Locations, Search mode ignores these URLs (warning in the log).",
            "default": [
              {
                "url": "https://www.onthemarket.com/for-sale/property/london/"
              },
              {
                "url": "https://www.onthemarket.com/for-sale/property/london/?page=2"
              },
              {
                "url": "https://www.onthemarket.com/for-sale/property/london/?sort-field=price&sort-order=asc&page=2"
              },
              {
                "url": "https://www.onthemarket.com/for-sale/2-bed-flats-apartments/london/?min-price=300000&max-price=900000&sort-field=price&radius=3"
              },
              {
                "url": "https://www.onthemarket.com/for-sale/detached/london/"
              },
              {
                "url": "https://www.onthemarket.com/for-sale/property/sw19/"
              },
              {
                "url": "https://www.onthemarket.com/to-rent/property/manchester/"
              },
              {
                "url": "https://www.onthemarket.com/to-rent/property/london/?page=2"
              },
              {
                "url": "https://www.onthemarket.com/new-homes/property/london/"
              },
              {
                "url": "https://www.onthemarket.com/for-sale/property/london/?new-homes=true"
              },
              {
                "url": "https://www.onthemarket.com/details/20490019/"
              },
              {
                "url": "https://www.onthemarket.com/details/20622528"
              },
              {
                "url": "https://www.onthemarket.com/property/london/"
              },
              {
                "url": "https://www.onthemarket.com/agents/branch/1-clickproperties-acton/"
              },
              {
                "url": "https://www.onthemarket.com/agents/london/"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "minPrice": {
            "title": "Min price",
            "type": "integer",
            "description": "Lowest price (sale price, or monthly rent for to-rent)."
          },
          "maxPrice": {
            "title": "Max price",
            "type": "integer",
            "description": "Highest price (sale price, or monthly rent for to-rent)."
          },
          "minBedrooms": {
            "title": "Min bedrooms",
            "type": "integer",
            "description": "Fewest bedrooms."
          },
          "maxBedrooms": {
            "title": "Max bedrooms",
            "type": "integer",
            "description": "Most bedrooms."
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "Filter by property type. Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "flat",
                "apartment",
                "houses",
                "detached",
                "semi-detached",
                "terraced",
                "bungalows",
                "town-house",
                "land",
                "farms-land",
                "flats-apartments",
                "mobile-park-homes"
              ],
              "enumTitles": [
                "Flat",
                "Apartment",
                "Houses",
                "Detached",
                "Semi-detached",
                "Terraced",
                "Bungalows",
                "Town house",
                "Land",
                "Farms & land",
                "Flats and apartments (flat + apartment)",
                "Mobile and park homes"
              ]
            }
          },
          "radius": {
            "title": "Search radius (miles)",
            "enum": [
              "0",
              "0.25",
              "0.5",
              "1",
              "3",
              "5",
              "10",
              "15",
              "20",
              "30",
              "40"
            ],
            "type": "string",
            "description": "Expand the search around the location by this many miles. Works with town / postcode locations."
          },
          "sortType": {
            "title": "Sort order",
            "enum": [
              "recommended",
              "price-asc",
              "price-desc"
            ],
            "type": "string",
            "description": "How to order results.",
            "default": "recommended"
          },
          "includeUnderOffer": {
            "title": "Include under offer / SSTC",
            "type": "boolean",
            "description": "Also include listings that are under offer or sold subject to contract.",
            "default": false
          },
          "addedToSite": {
            "title": "Added to site",
            "enum": [
              "24-hours",
              "3-days",
              "7-days"
            ],
            "type": "string",
            "description": "Only listings added within this window (24 hours, 3 days or 7 days). Leave empty for all."
          },
          "includeDetails": {
            "title": "Include full property details",
            "type": "boolean",
            "description": "Fetch each property's details page for the full description, key info, floorplans, nearby stations & schools, area stats, and complete agent contact details. Slower and adds a per-record detail charge.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to return. This is the run cap. Set to 0 for no item limit (stops when Max pages is reached).",
            "default": 20
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 0,
            "type": "integer",
            "description": "No page limit by default - the run stops at Max items. Set a value only to cap how many result pages are walked.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings for the run. Runs on any Apify plan.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resumeFromRunId": {
            "title": "Resume from a previous run (delta)",
            "type": "string",
            "description": "Optional. ID of a previous run of this actor (or a dataset ID). Listings and agent records already in that dataset are skipped, so this run returns only listings not collected yet. Max items then counts only the new listings. For recurring monitoring of the same search, use Incremental mode below instead."
          },
          "incrementalMode": {
            "title": "Incremental mode (recurring monitoring)",
            "type": "boolean",
            "description": "Turn this on for daily or recurring monitoring. The first run returns all matching listings as NEW. Later runs compare every listing against the last run (price, qualifier, bedrooms, bathrooms, title, description, features, agent details, labels and the other listing fields) and return only NEW, UPDATED and REAPPEARED listings, with an UPDATED row's changedFields naming exactly what moved. The days-since-added counter, the age and promotion labels (main label, label id, sticker, premium, spotlight), image lists, area statistics, view counter and similar-property lists are never compared, since they change on their own. Every returned row is billed as a dataset item; unchanged listings are suppressed (not returned, not billed) unless you turn on Emit unchanged. Max items counts returned rows. A listing is remembered as delivered only once its row was stored, so rows cut by Max items or the maximum cost limit come back on the next run. State is kept separately for each search setup (locations or URLs, channel, filters, details on or off). To continue one specific interrupted run instead, use Resume above.",
            "default": false
          },
          "stateKey": {
            "title": "State key (optional, incremental mode only)",
            "type": "string",
            "description": "Optional. Name this monitoring campaign to keep its state stable, or to deliberately share state across differently configured runs. Leave empty to derive a key automatically from the search settings."
          },
          "emitUnchanged": {
            "title": "Emit unchanged listings (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return listings that have not changed since the last run, marked UNCHANGED. These rows are returned in the dataset, so they are billed like any other returned row and count toward Max items.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired listings (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return listings that were present in a previous run but are no longer found, marked EXPIRED. Only produced after a complete scan of the tracked search, never when Max items, Max pages, a single listing URL or Resume cut it short. These rows are returned in the dataset, so they are billed like any other returned row and count toward Max items.",
            "default": false
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Optional. Top-level field names to exclude from UPDATED change detection, in addition to the built-in handling (days since added, age and promotion labels, images, area statistics, view counter and similar-property lists never trigger an UPDATED). Use this if another field turns out to be noisy in your setup.",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize a connector once under Apify → Settings → Integrations, then select it here. The connector receives a condensed, human-readable summary per item (title + key fields), not the full JSON — the complete record stays in the dataset. Leave empty to skip. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com)."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL (or id) of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}