{
  "openapi": "3.0.1",
  "info": {
    "title": "OnTheMarket Property Scraper - UK Sale, Rent & New Homes",
    "description": "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.",
    "version": "1.0",
    "x-build-id": "NbJIzj0ztW8CTzR4Q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/confidential_gnat~onthemarket-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-confidential_gnat-onthemarket-property-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/confidential_gnat~onthemarket-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-confidential_gnat-onthemarket-property-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/confidential_gnat~onthemarket-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-confidential_gnat-onthemarket-property-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": {
          "startUrls": {
            "title": "Search or property URLs",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "cacheProjectName": {
            "title": "Cache project name",
            "type": "string",
            "description": "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": {
            "title": "Max items per search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum properties saved for each search URL or location. Above 1,000 the search is split by price automatically.",
            "default": 20
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Towns, areas or postcode districts such as london, manchester, sw1. Each one is searched with the filters below.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "channel": {
            "title": "Listing type",
            "enum": [
              "for-sale",
              "to-rent",
              "new-homes"
            ],
            "type": "string",
            "description": "Applies to the locations above.",
            "default": "for-sale"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "property",
              "houses",
              "flats-apartments",
              "detached",
              "semi-detached",
              "terraced",
              "bungalows",
              "land",
              "farms-land"
            ],
            "type": "string",
            "description": "Applies to the locations above (not used for new homes).",
            "default": "property"
          },
          "minPrice": {
            "title": "Minimum price (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Sale price, or monthly rent for rentals."
          },
          "maxPrice": {
            "title": "Maximum price (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Sale price, or monthly rent for rentals."
          },
          "minBedrooms": {
            "title": "Minimum bedrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Fewest bedrooms. Leave empty for no minimum."
          },
          "maxBedrooms": {
            "title": "Maximum bedrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Most bedrooms. Leave empty for no maximum."
          },
          "radius": {
            "title": "Search radius (miles)",
            "enum": [
              "0.25",
              "0.5",
              "1.0",
              "2.0",
              "3.0",
              "4.0",
              "5.0",
              "7.5",
              "10.0",
              "15.0",
              "20.0",
              "30.0",
              "40.0"
            ],
            "type": "string",
            "description": "Include nearby areas. Leave empty for this area only."
          },
          "recentlyAdded": {
            "title": "Recently added",
            "enum": [
              "24-hours",
              "3-days",
              "7-days"
            ],
            "type": "string",
            "description": "Only properties added within this period. Leave empty for all."
          },
          "furnished": {
            "title": "Furnishing (rentals)",
            "enum": [
              "furnished",
              "part-furnished",
              "unfurnished"
            ],
            "type": "string",
            "description": "Furnishing filter, for rentals only. Leave empty for all."
          },
          "sortField": {
            "title": "Sort by",
            "enum": [
              "recommended",
              "price",
              "update_date"
            ],
            "type": "string",
            "description": "How results are ordered.",
            "default": "recommended"
          },
          "sortDirection": {
            "title": "Sort direction",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Used when sorting by price.",
            "default": "asc"
          },
          "specialFilters": {
            "title": "Special filters",
            "type": "array",
            "description": "Keep only listings of these kinds.",
            "items": {
              "type": "string",
              "enum": [
                "reduced",
                "auction",
                "retirement",
                "shared-ownership",
                "pet-friendly",
                "online-viewings",
                "student",
                "house-share"
              ],
              "enumTitles": [
                "Reduced price",
                "Auction",
                "Retirement",
                "Shared ownership",
                "Pet friendly",
                "Online viewings",
                "Student",
                "House share"
              ]
            },
            "default": []
          },
          "includeUnderOffer": {
            "title": "Include under offer / let agreed",
            "type": "boolean",
            "description": "Also return properties that are already under offer or let agreed.",
            "default": false
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "Only listings mentioning this word, for example garden."
          },
          "scrapeDetails": {
            "title": "Scrape property details",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "expandSearchArea": {
            "title": "Widen the area if there are too few results",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "trackDelistings": {
            "title": "Track delistings",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests. Keep low without a proxy.",
            "default": 4
          },
          "maxRequestsPerMinute": {
            "title": "Max requests per minute",
            "minimum": 10,
            "maximum": 1000,
            "type": "integer",
            "description": "Slows the run down to stay under the site's rate limit. Raise it only with a proxy.",
            "default": 150
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed for small runs. Use datacenter proxies for large runs (thousands of properties) if you see rate-limit errors.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}