{
  "openapi": "3.0.1",
  "info": {
    "title": "OnTheMarket Scraper",
    "description": "Scrape OnTheMarket.com property for sale, to rent and new homes from any search, map, agent, development or ad URL, or by place: price, bedrooms, address and map pin, photos, estate agent and office phone, EPC, tenure and material information.",
    "version": "0.1",
    "x-build-id": "oKUqKCvOWiCBdiRJf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ribtools~onthemarket-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ribtools-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/ribtools~onthemarket-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ribtools-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/ribtools~onthemarket-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ribtools-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": {
          "county": {
            "title": "County or area",
            "type": "string",
            "description": "The area the place sits in, as OnTheMarket's search box names it after the dash: a county (Surrey, Greater Manchester), London, or a town for its neighbourhoods (Manchester for Didsbury). Alone it searches the whole county or area."
          },
          "city": {
            "title": "Town, borough or neighbourhood",
            "type": "string",
            "description": "A town, London borough or neighbourhood inside the county or area above: Nine Elms, Camden, Richmond, Didsbury. A name OnTheMarket lists in several places is refused with the candidates: add the county or area."
          },
          "postcode": {
            "title": "Postcode",
            "pattern": "^\\s*[A-Za-z]{1,2}[0-9][A-Za-z0-9]?(\\s*[0-9]([A-Za-z]{2})?)?\\s*$",
            "type": "string",
            "description": "Instead of a place: an outcode (SW11), a postal sector (SW11 5) or a full UK postcode (SW11 8NU). Use the Search radius filter to widen it."
          },
          "startUrls": {
            "title": "OnTheMarket URLs",
            "type": "array",
            "description": "Searches (/for-sale/, /to-rent/, /new-homes/, /student/, commercial; any place, type, bedrooms, filters, map view), agent branch pages (/agents/branch/<slug>/), developments (/new-homes/developers/development/<slug>-<id>/) or ads (/details/<id>/). A URL keeps its own filters.",
            "items": {
              "type": "string"
            }
          },
          "maxRequests": {
            "title": "Max results per search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of properties for the place search and each URL above. Each result is a charged event. OnTheMarket pages a search only to 1,000 results; past that the actor splits it by price band. Default 10.",
            "default": 10
          },
          "transaction": {
            "title": "Buy, rent or new homes",
            "enum": [
              "sale",
              "rent",
              "new_homes"
            ],
            "type": "string",
            "description": "Homes for sale, to rent, or new homes (OnTheMarket's own new-homes section).",
            "default": "sale"
          },
          "propertyTypes": {
            "title": "Property types",
            "uniqueItems": true,
            "type": "array",
            "description": "Only these types (OnTheMarket's own filter list); empty means all.",
            "items": {
              "type": "string",
              "enum": [
                "detached",
                "semi_detached",
                "terraced",
                "bungalows",
                "flats",
                "farms_land",
                "park_homes"
              ],
              "enumTitles": [
                "Detached",
                "Semi-detached",
                "Terraced",
                "Bungalow",
                "Flats / apartments",
                "Farms / land",
                "Park homes"
              ]
            }
          },
          "priceFrom": {
            "title": "Price from (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price to include, in pounds: the asking price for sales, the monthly rent for lets."
          },
          "priceTo": {
            "title": "Price to (£)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price to include, in pounds: the asking price for sales, the monthly rent for lets."
          },
          "bedroomsFrom": {
            "title": "Bedrooms from",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Fewest bedrooms to include; 0 includes studios."
          },
          "bedroomsTo": {
            "title": "Bedrooms to",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Most bedrooms to include; 0 means studios only. Leave empty for no upper limit."
          },
          "radius": {
            "title": "Search radius",
            "enum": [
              "0",
              "0.25",
              "0.5",
              "1",
              "2",
              "3",
              "4",
              "5",
              "7.5",
              "10",
              "15",
              "20",
              "30",
              "40"
            ],
            "type": "string",
            "description": "Widen the place by this many miles, as OnTheMarket's own radius list.",
            "default": "0"
          },
          "addedWithin": {
            "title": "Added to site",
            "enum": [
              "any",
              "24_hours",
              "3_days",
              "7_days"
            ],
            "type": "string",
            "description": "Only homes added to OnTheMarket within this time.",
            "default": "any"
          },
          "newHomes": {
            "title": "New-build homes",
            "enum": [
              "include",
              "exclude",
              "only"
            ],
            "type": "string",
            "description": "Homes for sale only: include new builds, leave them out, or show only them.",
            "default": "include"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "default",
              "newest"
            ],
            "type": "string",
            "description": "Order of the place search: OnTheMarket's own (Recommended), or newest first (most recently added or reduced). A pasted URL keeps its own order.",
            "default": "default"
          },
          "detailsAddon": {
            "title": "Property details add-on",
            "type": "boolean",
            "description": "Also read each property's ad page: full description, key information (tenure and years left, service charge, ground rent, council tax band), EPC rating, every photo, floor plans, brochures, virtual tour, nearby stations and schools. Charged per item with details.",
            "default": false
          },
          "sellerDataAddon": {
            "title": "Agent data add-on",
            "type": "boolean",
            "description": "Also return the estate agent's or developer's branch: trading name, office phone, profile page and logo (plus the office address for ad URLs). Charged per item with an office phone.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}