{
  "openapi": "3.0.1",
  "info": {
    "title": "OnTheMarket Scraper & API - UK Property for Sale & to Rent",
    "description": "OnTheMarket scraper for UK property: homes for sale, to rent and new homes by town, borough or postcode. One row per listing: price, beds, baths, type, address, lat / lng, features, photos, agent, phone; optional tenure, council tax, EPC. Daily new-listing alerts. $0.40 per 1,000.",
    "version": "1.0",
    "x-build-id": "dLRpUx2MCLysWCal1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rel8ble~onthemarket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rel8ble-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/rel8ble~onthemarket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rel8ble-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/rel8ble~onthemarket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rel8ble-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",
        "properties": {
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "UK places as OnTheMarket names them in its URLs: towns, cities, boroughs, postcode districts, e.g. \"london\", \"manchester\", \"sw11\", \"bristol\", \"camden-north-west-london\". One search each. Default [\"london\"] (demo).",
            "default": [
              "london"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "for-sale",
              "to-rent",
              "new-homes"
            ],
            "type": "string",
            "description": "Optional. for-sale (default), to-rent or new-homes.",
            "default": "for-sale"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "property",
              "houses",
              "flats-apartments",
              "bungalows"
            ],
            "type": "string",
            "description": "Optional. property (all, default), houses, flats-apartments or bungalows.",
            "default": "property"
          },
          "bedrooms": {
            "title": "Exact bedroom counts",
            "type": "array",
            "description": "Optional. One search per count (0 = studio), e.g. [\"1\", \"2\", \"3\"]. Also a way past the ~1,000-listing cap OnTheMarket puts on one search.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "OnTheMarket search URLs",
            "type": "array",
            "description": "Optional. Search pages, e.g. https://www.onthemarket.com/for-sale/property/sw11/. Price / bedroom parameters become filters (robots.txt bars them as URL parameters).",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSearch": {
            "title": "Max properties per search",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Rows per location / bedroom count / URL, integer >= 0. Default 60; 0 = all OnTheMarket shows (about 1,000). You pay per row.",
            "default": 60
          },
          "includeDetails": {
            "title": "Add postcode, description, tenure, council tax, EPC",
            "type": "boolean",
            "description": "Optional. Opens each property page (one request per row, slower) for full postcode, description, tenure, council tax band, EPC, stations, floor plans and brochure. Default false.",
            "default": false
          },
          "minPrice": {
            "title": "Min price (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. 0 = none. Monthly rent for lettings.",
            "default": 0
          },
          "maxPrice": {
            "title": "Max price (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. 0 = none.",
            "default": 0
          },
          "minBedrooms": {
            "title": "Min bedrooms",
            "minimum": 0,
            "type": "integer",
            "description": "Optional."
          },
          "maxBedrooms": {
            "title": "Max bedrooms",
            "minimum": 0,
            "type": "integer",
            "description": "Optional."
          },
          "keywords": {
            "title": "Title / features contain",
            "type": "array",
            "description": "Optional. Keep only properties whose title, address or features contain one of these words, e.g. \"garden\", \"parking\", \"chain free\".",
            "items": {
              "type": "string"
            }
          },
          "excludeSharedOwnership": {
            "title": "Skip shared ownership",
            "type": "boolean",
            "description": "Optional. Default false.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "Optional, advanced. Parallel requests, 1-6 (the run is paced at about 80 pages a minute either way). Default 3.",
            "default": 3
          },
          "maxRequestRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "Optional, advanced. 0-15. Default 5.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional, advanced. Default Apify Proxy (datacenter).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}