{
  "openapi": "3.0.1",
  "info": {
    "title": "OnTheMarket Scraper - UK Property Data, Price & Tenure",
    "description": "OnTheMarket.com listings for sale or to rent as clean JSON: price as a number with its meaning (sale or monthly rent, weekly rent from the page), tenure with lease years, bedrooms, bathrooms, features, coordinates, the agency and added/reduced status. Filters cost no extra requests. Unofficial.",
    "version": "0.1",
    "x-build-id": "ZFztiG90GS8zOoqI2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~onthemarket-listings/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-onthemarket-listings",
        "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/neverempty~onthemarket-listings/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-onthemarket-listings",
        "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/neverempty~onthemarket-listings/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-onthemarket-listings",
        "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": {
          "searchUrl": {
            "title": "OnTheMarket search URL (optional)",
            "type": "string",
            "description": "Paste an OnTheMarket listing page, for example https://www.onthemarket.com/for-sale/property/london/ or https://www.onthemarket.com/to-rent/property/manchester/, and the two fields below are ignored. Query parameters and property-type paths are dropped: OnTheMarket's robots.txt forbids them, so every filter runs here on the rows already fetched."
          },
          "channel": {
            "title": "For sale or to rent",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "sale = for-sale, rent = to-rent.",
            "default": "sale"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "A town (london, manchester, milton-keynes) or a postcode area (sw1a, m1), as it appears in OnTheMarket's own addresses. A place OnTheMarket does not know comes back as a no-such-search row (OnTheMarket answers 404), not as an empty result.",
            "default": "london"
          },
          "maxListings": {
            "title": "Maximum properties",
            "minimum": 1,
            "maximum": 950,
            "type": "integer",
            "description": "How many properties to return. You are charged for the rows you actually receive. OnTheMarket serves at most 34 pages (about 950 properties) per search; narrow the place to see more.",
            "default": 20
          },
          "maxPages": {
            "title": "Maximum listing pages to open",
            "minimum": 0,
            "maximum": 34,
            "type": "integer",
            "description": "A hard stop on how many pages are requested, whatever the filters do. 0 lets the run work it out. OnTheMarket has 34 pages at most.",
            "default": 0
          },
          "useProxy": {
            "title": "Use an Apify proxy",
            "type": "boolean",
            "description": "Off by default because OnTheMarket answers Apify's own network directly. If OnTheMarket ever starts blocking, the run switches to a proxy on its own.",
            "default": false
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep only properties whose title, address, type, features, labels, price qualifier or agency contain these words. No extra requests are made.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "any: at least one keyword. all: every keyword.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop properties containing any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "agencyNames": {
            "title": "Agencies",
            "type": "array",
            "description": "Keep only properties marketed by these agencies. Partial names work.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "A sale price is a total; a rent is per calendar month, the way OnTheMarket shows it. 0 means no minimum.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum price (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "0 means no maximum. A property with no published price is kept.",
            "default": 0
          },
          "requirePrice": {
            "title": "Only properties with a published price",
            "type": "boolean",
            "description": "Off by default: a property with no price is not treated as a cheap one, it is simply kept.",
            "default": false
          },
          "minBedrooms": {
            "title": "Minimum bedrooms",
            "minimum": -1,
            "maximum": 20,
            "type": "integer",
            "description": "-1 turns the filter off. A property without a bedroom count is kept.",
            "default": -1
          },
          "maxBedrooms": {
            "title": "Maximum bedrooms",
            "minimum": -1,
            "maximum": 20,
            "type": "integer",
            "description": "-1 turns the filter off.",
            "default": -1
          },
          "minBathrooms": {
            "title": "Minimum bathrooms",
            "minimum": -1,
            "maximum": 20,
            "type": "integer",
            "description": "-1 turns the filter off. A property without a bathroom count is kept.",
            "default": -1
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "OnTheMarket's words, partial match: Apartment, Flat, Terraced house, Semi-detached house, Detached house, Bungalow, Maisonette, Studio, Chalet, Land …",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tenureTypes": {
            "title": "Tenure",
            "type": "array",
            "description": "FREEHOLD, LEASEHOLD, SHARE_OF_FREEHOLD. A property whose tenure is not published in its features is kept.",
            "items": {
              "type": "string",
              "enum": [
                "FREEHOLD",
                "LEASEHOLD",
                "SHARE_OF_FREEHOLD"
              ],
              "enumTitles": [
                "Freehold",
                "Leasehold",
                "Share of freehold"
              ]
            },
            "default": []
          },
          "excludeSharedOwnership": {
            "title": "Exclude shared ownership",
            "type": "boolean",
            "description": "Drop listings whose price qualifier is 'Shared ownership'.",
            "default": false
          },
          "excludeDevelopments": {
            "title": "Exclude new-home developments",
            "type": "boolean",
            "description": "Drop developer listings that advertise a range of homes rather than one property.",
            "default": false
          },
          "recentlyAddedOnly": {
            "title": "Recently added only",
            "type": "boolean",
            "description": "Keep only listings OnTheMarket flags as recently added.",
            "default": false
          },
          "monitoringMode": {
            "title": "Only return listings that are new since the last run",
            "type": "boolean",
            "description": "Turn this on and schedule the Actor: each run returns only the properties it has never returned before, so you are charged for new stock rather than for the same pages again. Properties that did not fit under the limit are still waiting for you on the next run.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Forget what was already returned",
            "type": "boolean",
            "description": "Clears the memory for this search, so the next monitoring run starts from scratch. Works with or without monitoring mode on.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}