{
  "openapi": "3.0.1",
  "info": {
    "title": "SpareRoom Scraper - UK Rooms to Rent and Flatshares",
    "description": "Scrape SpareRoom.co.uk room ads by UK town or neighbourhood, for rooms to rent and rooms wanted. Get rent per room, bills, deposit, availability, terms, the current household, flatmate preferences, GPS and photos.",
    "version": "1.0",
    "x-build-id": "jtRffbBcJIBm7Ro6c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~spareroom-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-spareroom-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/sian.agency~spareroom-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-spareroom-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/sian.agency~spareroom-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-spareroom-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": {
          "operation": {
            "title": "🎯 What do you want to scrape?",
            "enum": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "Search returns room ads for the towns or neighbourhoods you name. Room Details opens listing addresses you already have and returns the full record. Tick Add full details on a search to get both in one run.",
            "default": "search"
          },
          "locations": {
            "title": "📍 Towns or neighbourhoods",
            "type": "array",
            "description": "UK towns or neighbourhoods, one per line, as SpareRoom names them: london, manchester, Milton Keynes. For a neighbourhood use town/area, e.g. london/acton or bristol/montpelier. Each one runs its own search. A name SpareRoom doesn't know gets an error row and isn't charged.",
            "default": [
              "london"
            ],
            "items": {
              "type": "string"
            }
          },
          "adType": {
            "title": "🏠 Rooms to rent or rooms wanted",
            "enum": [
              "offered",
              "wanted"
            ],
            "type": "string",
            "description": "Rooms to rent are ads from landlords, flatmates and agents. Rooms wanted are ads from people looking for a room, with their budget and preferred areas. The room, advertiser, property type, bills and postcode filters apply to rooms to rent only.",
            "default": "offered"
          },
          "maxResults": {
            "title": "🔢 Max rooms",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many ads across all locations. The run stops exactly at this number. Free accounts stop at 25. Room Details ignores it and returns every listing you pasted.",
            "default": 100
          },
          "includeDetails": {
            "title": "📄 Add full details",
            "type": "boolean",
            "description": "Opens each room ad's own page and adds every room's rent and deposit, the minimum and maximum term, furnishings, amenities, who lives there now, flatmate preferences, GPS, the full description and every photo. Rooms to rent only. Each ad also bills one Room Details event.",
            "default": false
          },
          "minRent": {
            "title": "💷 Min rent (£ per month)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest monthly rent to include. Weekly rents are converted to monthly (x52/12) before the comparison. Leave it empty for no floor."
          },
          "maxRent": {
            "title": "💰 Max rent (£ per month)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest monthly rent to include. For rooms wanted this is the person's budget. Leave it empty for no ceiling."
          },
          "roomType": {
            "title": "🚪 Room or whole place",
            "enum": [
              "any",
              "room",
              "whole"
            ],
            "type": "string",
            "description": "Most SpareRoom ads are rooms in a shared home. A smaller share are whole flats, studios or houses to rent.",
            "default": "any"
          },
          "advertiser": {
            "title": "👤 Advertiser",
            "enum": [
              "any",
              "private",
              "live_in_landlord",
              "flatmates",
              "live_out_landlord",
              "agent"
            ],
            "type": "string",
            "description": "Who placed the ad. Private means live-in landlords, flatmates and current tenants: the rooms that rarely show up on the big property portals.",
            "default": "any"
          },
          "propertyType": {
            "title": "🏘️ Property type",
            "enum": [
              "any",
              "flat",
              "house",
              "property"
            ],
            "type": "string",
            "description": "The type of home the room is in, as the advertiser described it.",
            "default": "any"
          },
          "billsIncludedOnly": {
            "title": "💡 Bills included only",
            "type": "boolean",
            "description": "Only rooms whose rent includes bills.",
            "default": false
          },
          "postcodeDistricts": {
            "title": "📮 Postcode districts",
            "type": "array",
            "description": "Only rooms in these postcode districts, e.g. E14, SE16, M14. Use it with a town in Towns or neighbourhoods; it narrows that town's ads, it does not search a district on its own.",
            "items": {
              "type": "string"
            }
          },
          "maxDaysOld": {
            "title": "🆕 Posted in the last N days",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Only ads posted or renewed within this many days. 0 means today only. Schedule a daily run with 1 to pick up new rooms as they appear."
          },
          "searchUrls": {
            "title": "🔗 SpareRoom location pages",
            "type": "array",
            "description": "SpareRoom location pages instead of names, e.g. https://www.spareroom.co.uk/flatshare/london/acton or https://www.spareroom.co.uk/flatmate/bristol. Pages with search filters in the address are refused rather than read without them; use the filter fields above instead.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingUrls": {
            "title": "📄 Listing URLs",
            "type": "array",
            "description": "Used by Room Details: SpareRoom room ad addresses, one per line, such as https://www.spareroom.co.uk/flatshare/london/euston/18433162 or the short form https://www.spareroom.co.uk/18433162.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}