{
  "openapi": "3.0.1",
  "info": {
    "title": "SpareRoom UK Flatshare Budget & Radius Search",
    "description": "Search SpareRoom.co.uk for rooms to rent by city, budget range and distance from the centre, or fetch specific listings by URL, returning rent, bills-included status, property type, landlord type and availability.",
    "version": "1.0",
    "x-build-id": "rbc0peMiPHCI8GRZn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~spareroom-uk-flatshare-budget-and-radius-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-spareroom-uk-flatshare-budget-and-radius-search",
        "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/dataspryva~spareroom-uk-flatshare-budget-and-radius-search/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-spareroom-uk-flatshare-budget-and-radius-search",
        "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/dataspryva~spareroom-uk-flatshare-budget-and-radius-search/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-spareroom-uk-flatshare-budget-and-radius-search",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "details",
              "searchRooms",
              "searchByCity",
              "searchByBudget",
              "roomDetails"
            ],
            "type": "string",
            "description": "Search current room listings, or fetch full details for a list of SpareRoom listing URLs.",
            "default": "search"
          },
          "city": {
            "title": "City or area",
            "type": "string",
            "description": "UK city, town, neighbourhood or postcode (for example London, Manchester, Camden, SW2). A SpareRoom /flatshare/... URL is also accepted. Used in search mode.",
            "default": "London"
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after this many listings. SpareRoom itself exposes at most 1,000 results per search.",
            "default": 20
          },
          "maxBudget": {
            "title": "Maximum rent (GBP per month)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Only include rooms advertised at or below this monthly rent. Weekly adverts are matched by SpareRoom's own monthly conversion.",
            "default": 1500
          },
          "minBudget": {
            "title": "Minimum rent (GBP per month)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Only include rooms advertised at or above this monthly rent."
          },
          "milesFromCenter": {
            "title": "Search radius (miles)",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Search radius around the chosen location. SpareRoom's own selector uses 0-5, 10, 15, 20, 30 and 40 miles.",
            "default": 3
          },
          "roomType": {
            "title": "Room type",
            "enum": [
              "any",
              "double",
              "single",
              "ensuite",
              "studio"
            ],
            "type": "string",
            "description": "Narrow results to double rooms, single rooms, en-suite rooms or studio/1-bed properties.",
            "default": "any"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "any",
              "roomsInShares",
              "studios",
              "wholeProperties"
            ],
            "type": "string",
            "description": "Choose rooms in existing shared houses, studio/1-bed flats, or whole properties suitable for sharing.",
            "default": "any"
          },
          "billsIncluded": {
            "title": "Bills included only",
            "type": "boolean",
            "description": "Only include adverts that state bills are included in the rent.",
            "default": false
          },
          "furnished": {
            "title": "Furnishing",
            "enum": [
              "any",
              "furnished",
              "unfurnished"
            ],
            "type": "string",
            "description": "Filter by furnished or unfurnished adverts.",
            "default": "any"
          },
          "postedBy": {
            "title": "Posted by",
            "enum": [
              "any",
              "privateLandlords",
              "flatmates",
              "liveIn",
              "noLiveIn"
            ],
            "type": "string",
            "description": "Filter by who placed the advert.",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "relevance",
              "newest",
              "lastUpdated",
              "priceLow",
              "priceHigh"
            ],
            "type": "string",
            "description": "How SpareRoom should order results before collection.",
            "default": "relevance"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Only include adverts whose text matches this keyword, for example tube, ensuite, garden."
          },
          "moveInDate": {
            "title": "Move-in date (YYYY-MM-DD)",
            "type": "string",
            "description": "Ask SpareRoom for rooms available on or before this date. Leave blank for any date."
          },
          "shortLet": {
            "title": "Short lets only",
            "type": "boolean",
            "description": "Only include adverts that consider short-term lets.",
            "default": false
          },
          "photosOnly": {
            "title": "Photo adverts only",
            "type": "boolean",
            "description": "Only include adverts with at least one photo.",
            "default": false
          },
          "freeToContact": {
            "title": "Free to contact only",
            "type": "boolean",
            "description": "Only include adverts that are free to contact.",
            "default": false
          },
          "noDeposit": {
            "title": "No / low deposit only",
            "type": "boolean",
            "description": "Only include adverts marked as no or low deposit.",
            "default": false
          },
          "petsAllowed": {
            "title": "Pets considered only",
            "type": "boolean",
            "description": "Only include adverts where pets are considered.",
            "default": false
          },
          "parking": {
            "title": "Parking only",
            "type": "boolean",
            "description": "Only include properties with parking available.",
            "default": false
          },
          "disabledAccess": {
            "title": "Disabled access only",
            "type": "boolean",
            "description": "Only include properties with disabled access.",
            "default": false
          },
          "sharedLivingRoom": {
            "title": "Shared living room only",
            "type": "boolean",
            "description": "Only include properties with a shared living room.",
            "default": false
          },
          "minBeds": {
            "title": "Minimum bedrooms in property",
            "enum": [
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10"
            ],
            "type": "string",
            "description": "Only include properties with at least this many bedrooms."
          },
          "maxBeds": {
            "title": "Maximum bedrooms in property",
            "enum": [
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10"
            ],
            "type": "string",
            "description": "Only include properties with at most this many bedrooms (6 means 6+ on SpareRoom)."
          },
          "roomUrls": {
            "title": "SpareRoom listing URLs",
            "type": "array",
            "description": "One or more public SpareRoom listing URLs for details mode. Both /flatshare/<area>/<id> and flatshare_detail.pl?flatshare_id=<id> links are accepted.",
            "default": [],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}