# SpareRoom Scraper - UK Room Rentals (`benthepythondev/spareroom-scraper`) Actor

Scrape SpareRoom UK rental listings with title, location, postcode, price, room type, advertiser role and photos.

- **URL**: https://apify.com/benthepythondev/spareroom-scraper.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** Real estate, Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## SpareRoom Scraper - UK Room Rental Listings

Scrape SpareRoom UK room rental listings into clean structured data. The actor extracts listing ID, title, URL, location, postcode, property type, rooms in property, advertiser role, listing type, status, days old, availability, monthly price, room type, photo count, video flag, verification flag, and image URL. Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

### What is the SpareRoom Scraper?

SpareRoom is one of the best-known UK flatshare and room-rental marketplaces. It is used by tenants, landlords, agents, relocation researchers, rental-market analysts, and lead-generation teams. This actor turns public SpareRoom listing pages into a structured dataset that can be filtered, monitored, enriched, and exported.

The actor works with SpareRoom search or listing URLs. Apply filters on SpareRoom first, such as city, rent range, room type, availability, or household preferences, then paste the URL into the actor. It reads the server-rendered listing cards and stable `data-listing-*` attributes, which makes it lighter and more reliable than a browser-based scraper.

#### What data does it extract?

- Listing ID and direct listing URL
- Listing title
- Location and postcode
- Property type
- Number of rooms in property
- Advertiser role
- Listing type and brand
- Listing status
- Days old
- Available-now flag
- Price and price period
- Room type
- Photo count
- Video flag
- Verification flag
- Main image URL
- Source URL

### Input

| Field | Type | Description |
| --- | --- | --- |
| `urls` | array | SpareRoom search/listing URLs to scrape. |
| `maxResults` | integer | Maximum listings to return per URL. |

#### Example input

```json
{
  "urls": [
    "https://www.spareroom.co.uk/flatshare/london"
  ],
  "maxResults": 25
}
````

### Output

```json
{
  "id": "17799978",
  "title": "From 1St of July! Zone 1 ! Flat with 2 Bathrooms!",
  "url": "https://www.spareroom.co.uk/flatshare/london/liverpool_street/17799978",
  "location": "Liverpool Street",
  "postcode": "E1",
  "property_type": "flat",
  "rooms_in_property": 4,
  "advertiser_role": "agent",
  "listing_type": "offered",
  "status": "new",
  "days_old": 1,
  "available_now": true,
  "price": 875,
  "price_period": "pcm",
  "room_type": "Double room",
  "photo_count": 10,
  "has_video": false,
  "verified": false,
  "source": "spareroom"
}
```

### Use cases

- Rental-market research: monitor price, room type, and availability by location.
- Lead generation: find agents, landlords, and active rental adverts in target areas.
- Relocation workflows: build room shortlists from filtered SpareRoom searches.
- Market monitoring: schedule runs and compare listing IDs over time.

### Practical tips

Use SpareRoom's filters before running the actor. A focused URL gives cleaner data than scraping a broad city page. For example, filter by postcode, budget, available-now, room type, or advertiser type, then paste the resulting URL. Keep `id` as your deduplication key when comparing scheduled runs.

For lead-gen workflows, combine this actor with website/contact enrichment only when listings include an external website or advertiser information from downstream detail-page enrichment. This version focuses on search results because those fields are stable and fast.

### Data quality notes

SpareRoom result pages expose useful structured attributes directly on each listing card. The actor uses those attributes first, then falls back to visible card text when needed. This gives you cleaner IDs, prices, availability flags, advertiser roles, room counts, and listing status than a simple text scraper would produce.

The `price` field is numeric and the `price_period` field keeps the original billing interval, such as `pcm` for per calendar month. That makes it easier to compare rents in spreadsheets, BI dashboards, and scheduled monitoring workflows. `available_now`, `has_video`, and `verified` are boolean fields so you can filter quickly without parsing display labels.

Some public result cards may hide certain details until the listing page is opened. In those cases, the actor still returns the direct `url`, listing ID, image, location, price, and search-level metadata so you can enrich selected rows later. The goal is a reliable high-volume search scraper first, with detail-page enrichment kept separate so daily checks remain fast.

### Monitoring workflow

For daily room-market monitoring, create one Apify schedule per target city or postcode cluster and keep `maxResults` conservative. Export the dataset to CSV or connect it to Make, Zapier, n8n, Airtable, Google Sheets, BigQuery, or your own API endpoint. Use `id` as the stable key, then compare price, status, days old, and availability between runs.

Typical monitoring fields:

- New listing IDs that appeared since the last run
- Listings marked as available now
- Price changes for the same listing ID
- New agent or landlord adverts in a postcode
- Rooms with photos or videos
- Listings that move from new to older status

This is especially useful for relocation teams, student housing research, rental-market reports, and property lead workflows where timing matters. Instead of manually checking the same searches every morning, you can let the actor collect a clean snapshot and review only the rows that changed.

### Reliability and performance

The actor uses direct HTTP and parses server-rendered listing cards. It does not launch a browser. That keeps the actor inexpensive and suitable for Apify health checks. If one URL fails, the actor logs the issue and continues with the next input URL.

Because it avoids a browser, the actor is also cheaper to run than a Playwright-based workflow. It is designed for public search result pages, small scheduled runs, and simple exports. If SpareRoom changes its card layout, the actor will fail visibly instead of returning silently malformed records.

### FAQ

**Does it require a SpareRoom account?** No. It reads public listing result pages.

**Can I scrape filtered searches?** Yes. Apply filters on SpareRoom and paste the URL.

**Does it open detail pages?** This version extracts search-result fields and direct listing URLs. Detail enrichment can be added later.

**Does it include phone numbers or emails?** Not from the search page. Use detail enrichment or contact workflows where appropriate.

**Can I export to Excel?** Yes. Apify datasets export to JSON, CSV, Excel, XML, and RSS.

**Can I schedule monitoring?** Yes. Use Apify schedules for recurring rental-market checks.

**Is it legal?** The actor reads public pages. You must respect website terms, rate limits, privacy rules, and applicable laws.

**How is billing calculated?** Pay-per-event billing charges per listing pushed to the dataset.

**What areas are supported?** Any public SpareRoom listing/search URL that uses the standard result layout.

**Why is the price period separate?** Keeping `price` and `price_period` separate makes filtering and currency cleanup easier.

### You might also like

- Rightmove Scraper
- Zoopla Scraper
- Craigslist Real Estate Scraper
- Pararius Scraper
- Real Estate Agent Lead Scraper

**Keywords:** SpareRoom scraper, UK room rental scraper, flatshare scraper, room listings, rental leads, London room scraper, real estate scraper, property listings, room rental data, landlord leads, rental market research, Apify real estate scraper, flatshare data, UK property data, rental monitoring

# Actor input Schema

## `urls` (type: `array`):

SpareRoom listing/search URLs to scrape. Apply filters on SpareRoom first, then paste the URL.

## `maxResults` (type: `integer`):

Maximum listings to return per URL.

## Actor input object example

```json
{
  "urls": [
    "https://www.spareroom.co.uk/flatshare/london"
  ],
  "maxResults": 10
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://www.spareroom.co.uk/flatshare/london"
    ],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/spareroom-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": ["https://www.spareroom.co.uk/flatshare/london"],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/spareroom-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.spareroom.co.uk/flatshare/london"
  ],
  "maxResults": 10
}' |
apify call benthepythondev/spareroom-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=benthepythondev/spareroom-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SpareRoom Scraper - UK Room Rentals",
        "description": "Scrape SpareRoom UK rental listings with title, location, postcode, price, room type, advertiser role and photos.",
        "version": "1.0",
        "x-build-id": "CbR8lsKGPzxQU9ql6"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~spareroom-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-spareroom-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/benthepythondev~spareroom-scraper/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-spareroom-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/benthepythondev~spareroom-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-spareroom-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": {
                    "urls": {
                        "title": "SpareRoom search URLs",
                        "type": "array",
                        "description": "SpareRoom listing/search URLs to scrape. Apply filters on SpareRoom first, then paste the URL.",
                        "default": [
                            "https://www.spareroom.co.uk/flatshare/london"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results per URL",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum listings to return per URL.",
                        "default": 25
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
