{
  "openapi": "3.0.1",
  "info": {
    "title": "SpareRoom API & Scraper - UK Rooms to Rent & New Room Monitor",
    "description": "For landlords, letting agents and rent research: UK rooms to rent and flatshares from SpareRoom as an API, by city or area. Rent in GBP with pw/pcm and a monthly figure, bills, room type, available date, postcode district, agent or landlord. Monitoring returns only new rooms and rent drops.",
    "version": "0.1",
    "x-build-id": "V1hUpXqmQCo1CRfuk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~spareroom-listings-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-spareroom-listings-monitor",
        "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~spareroom-listings-monitor/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-spareroom-listings-monitor",
        "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~spareroom-listings-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-spareroom-listings-monitor",
        "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": {
          "city": {
            "title": "UK town or city",
            "type": "string",
            "description": "The town or city to search on SpareRoom UK, written as SpareRoom spells it: London, Manchester, Bristol, Edinburgh, Milton Keynes. Required unless a SpareRoom list URL is given. An unknown name returns a free row saying SpareRoom does not know the place."
          },
          "area": {
            "title": "Area inside the city (optional)",
            "type": "string",
            "description": "An area SpareRoom lists inside the city, e.g. Canning Town or Shoreditch (London), Didsbury (Manchester). Leave empty to search the whole city."
          },
          "searchUrl": {
            "title": "SpareRoom list URL (optional)",
            "type": "string",
            "description": "Paste a SpareRoom rooms-to-rent list page, e.g. https://www.spareroom.co.uk/flatshare/london or https://www.spareroom.co.uk/flatshare/london/canning_town. When set, city and area are ignored. Leave empty to use the fields above."
          },
          "maxListings": {
            "title": "Maximum listings to return",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many room listings to return. You are charged only for rows you receive. SpareRoom shows 10 listings per page and at most 1,000 per search; empty = 20."
          },
          "maxPages": {
            "title": "Maximum pages to read",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Hard cap on list pages requested (SpareRoom stops at page 100). 0 or empty = decided from maxListings (monitoring: 30 pages). Outside monitoring, reading pages is free and only returned listings are charged; in monitoring mode each page compared without a change is charged one search-checked event."
          },
          "minRentPcm": {
            "title": "Minimum rent per month (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep rooms whose rent is at least this many pounds per calendar month. Weekly rents are converted (x 52 / 12) before comparing. 0 or empty = no minimum."
          },
          "maxRentPcm": {
            "title": "Maximum rent per month (GBP)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep rooms whose rent is at most this many pounds per calendar month (for a price range, the lowest room counts). Weekly rents are converted (x 52 / 12). 0 or empty = no maximum."
          },
          "roomTypes": {
            "title": "Room types",
            "type": "array",
            "description": "Keep only these room types: double, single, whole-property (a whole flat or house offered). A listing offering both single and double rooms matches single or double. Listings whose room type cannot be read are dropped when this is set. Empty = all types.",
            "items": {
              "type": "string",
              "enum": [
                "double",
                "single",
                "whole-property"
              ],
              "enumTitles": [
                "Double room",
                "Single room",
                "Whole flat or house"
              ]
            }
          },
          "excludeAgents": {
            "title": "Exclude letting agents",
            "type": "boolean",
            "description": "On: drop listings placed by letting agents and keep landlords and flatmates. Listings whose advertiser type cannot be read are dropped too. Off: keep everyone.",
            "default": false
          },
          "billsIncludedOnly": {
            "title": "Bills included only",
            "type": "boolean",
            "description": "On: keep only listings that SpareRoom marks as bills included. Off: keep all.",
            "default": false
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep listings whose title, summary, area or postcode district contains one of these words, e.g. ensuite, garden, E14. Not case-sensitive. Empty = no keyword filter.",
            "items": {
              "type": "string"
            }
          },
          "monitoringMode": {
            "title": "Monitoring mode (new rooms and rent drops only)",
            "type": "boolean",
            "description": "On: the first run remembers every listing on the pages read and its rent (free); every later run returns only rooms that are new or cheaper since the last run, with changeType and previousRentPcmEquivalent. Off: return the current listings.",
            "default": false
          },
          "resetMonitoringState": {
            "title": "Reset monitoring memory",
            "type": "boolean",
            "description": "On: forget what monitoring remembered for this search, so the next monitoring run starts again from a free baseline. Off: keep the memory.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}