# SpareRoom UK Flatshare & Room Rental Scraper (`devilscrapes/spareroom-flatshare-listings-scraper`) Actor

Scrape UK room-rental and flatshare listings from SpareRoom.co.uk by location. Get clean rent, neighbourhood, postcode, and room-type fields per listing while we handle blocks and fingerprint rotation for you.

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

## Pricing

Pay per event

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## SpareRoom UK Flatshare & Room Rental Scraper

**💰 $1.40 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Scrape UK room-rental and flatshare listings from SpareRoom.co.uk by location — clean rent, neighbourhood, postcode, and room-type data per listing.

</div>

***

### 🎯 What this scrapes

SpareRoom is the UK's biggest flatshare and room-rental board — a genuinely different product from every for-sale UK property Actor in this fleet: these are rooms and shares, priced per month or per week, not homes for sale. This Actor pulls every listing card off a SpareRoom `/flatshare/<location>` search page — London, Manchester, Brighton, or any other UK town or city — and normalizes it into clean fields: a bare GBP rent figure, neighbourhood, postcode, property type, and who's advertising (agent, live-in landlord, or a current flatmate), instead of the single scannable card the site renders for humans.

### 🔥 What we handle for you

- 🛡️ **Browser fingerprint rotation** — `curl-cffi` impersonates real Chrome / Firefox / Safari TLS handshakes, rotated across requests, so the target sees a browser, not Python.
- 🌐 **Proxy session rotation** via Apify Proxy — fresh session and exit IP on every block, on a fixed datacenter pack rather than a geo-random pool, and every page is checked for real GBP rents and UK postcodes before a row is emitted, so you never get a wrong page silently.
- 🔁 **Retries with exponential backoff** on `408 / 429 / 5xx` — up to 5 attempts per page, `Retry-After` honoured.
- 🧱 **Location- and listing-level fault isolation** — one blocked location or one bad card is skipped and logged, never crashes the run.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, ISO-8601 timestamps, numeric rent fields with an explicit period instead of one scannable card.
- 💰 **Pay-Per-Event pricing** — you only pay for results that hit your dataset. No data, no charge.

### 💡 Use cases

- **Room-hunting automation** — pull current listings for a city, filtered by rent range, to build your own shortlist or alert feed.
- **Rental market benchmarking** — track room-rental prices and availability across London, Manchester, Brighton, and other UK locations.
- **PropTech and rental-market analytics** — feed a clean, deduped flatshare dataset into a pricing model.
- **Relocation and student-housing services** — build client-facing room shortlists with neighbourhood and postcode data included.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Enter one or more SpareRoom location slugs — the `/flatshare/<location>` path segment (`london`, `manchester`, `brighton-and-hove`), or paste a full search URL.
3. Optionally set a rent range and how many pages to walk per location.
4. Click **Start**. Output streams into the run's dataset.
5. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `locations` | `array` | **yes** | — | SpareRoom location slugs, e.g. `london`. A full search URL also works. Up to 25. |
| `maxPagesPerLocation` | `integer` | no | 3 | Result pages per location. Pagination is offset-based (`offset += 10`), not page numbers. |
| `maxResults` | `integer` | no | 100 | Cap on rows this run, summed across all locations. |
| `minRent` | `integer` | no | — | Minimum rent filter, in `rentPeriod` units (GBP). |
| `maxRent` | `integer` | no | — | Maximum rent filter, in `rentPeriod` units (GBP). |
| `rentPeriod` | `string` | no | `pcm` | `pcm` (per month) or `pw` (per week) — the unit `minRent`/`maxRent` are expressed in. |
| `proxyConfiguration` | `object` | no | `BUYPROXIES94952` DATACENTER | The datacenter group is named explicitly; the exit country is not pinned (the pack is US-only). Page identity is verified from the listing data, not the exit IP. |

#### Example input

```json
{
  "locations": ["london", "manchester", "brighton-and-hove"],
  "maxPagesPerLocation": 2,
  "maxResults": 30,
  "rentPeriod": "pcm",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `listing_id` | `string` | SpareRoom's numeric listing id — stable, globally unique. |
| `url` | `string` | Canonical https://www.spareroom.co.uk/flatshare/... detail URL. |
| `title` | `string` | Listing headline as written by the advertiser. |
| `location` | `string` | The searched location slug, e.g. 'london'. |
| `neighbourhood` | `['string', 'null']` | Area/neighbourhood name, e.g. 'Canada Water'. |
| `postcode` | `['string', 'null']` | UK postcode district, e.g. 'SE16'. |
| `property_type` | `['string', 'null']` | 'flat', 'house', 'studio', etc. |
| `property_type_detail` | `['string', 'null']` | More specific type when stated, e.g. 'studio flat'. |
| `rooms_in_property` | `['integer', 'null']` | Total rooms in the shared property. |
| `advertiser_role` | `['string', 'null']` | 'agent', 'live in landlord', 'live out landlord', 'current flatmate', 'former flatmate'. |
| `rent_amount` | `['number', 'null']` | Headline rent, parsed to a bare number. |
| `rent_period_unit` | `['string', 'null']` | 'pcm' or 'pw'. |
| `rent_normalised_amount` | `['number', 'null']` | Per-room-equivalent rent for multi-room listings. |
| `rent_normalised_period_unit` | `['string', 'null']` | Period rent\_normalised\_amount is quoted in. |
| `status` | `['string', 'null']` | 'new', 'new today', 'boosted'. |
| `days_old` | `['integer', 'null']` | Days since the listing was posted. |
| `available_now` | `boolean` | True when the room is available immediately. |
| `ad_verified` | `boolean` | True when SpareRoom has ID-verified the advertiser. |
| `has_video` | `boolean` | True when the listing includes a video. |
| `photo_count` | `['integer', 'null']` | Number of photos on the listing. |
| `photo_url` | `['string', 'null']` | Listing's primary photo URL, when present. |
| `currency` | `string` | Always 'GBP'. |
| `scraped_at` | `string` | ISO 8601 UTC row-creation timestamp. |

#### Example output

```json
{
  "listing_id": "18363867",
  "url": "https://www.spareroom.co.uk/flatshare/london/canada_water/18363867",
  "title": "New Studio Style Rooms, En-Suites & Kitchenettes",
  "location": "london",
  "neighbourhood": "Canada Water",
  "postcode": "SE16",
  "property_type": "house",
  "property_type_detail": null,
  "rooms_in_property": 6,
  "advertiser_role": "live out landlord",
  "rent_amount": 1500.0,
  "rent_period_unit": "pcm",
  "rent_normalised_amount": 1500.0,
  "rent_normalised_period_unit": "pcm",
  "status": "new",
  "days_old": 0,
  "available_now": true,
  "ad_verified": false,
  "has_video": true,
  "photo_count": 9,
  "photo_url": "https://photos2.spareroom.co.uk/images/flatshare/listings/square/63/30/63302902.jpg",
  "currency": "GBP",
  "scraped_at": "2026-09-16T12:00:00+00:00"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.20 | One-off warm-up charge per run |
| `result-row` | $0.0012 | Per unique dataset item |

Example: 1 000 results at the rates above ≈ **$1.40**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

v1 is search-results only — no detail-page enrichment (full description, house rules, exact address, all photos). Pagination is offset-based and each page carries roughly 11 listings; a location with heavy inventory needs a higher `maxPagesPerLocation` to see deeper into it. `rent_normalised_amount` is SpareRoom's own per-room split for multi-bedroom listings and can differ from `rent_amount` — read both before assuming one is "the" price. Fields the card doesn't carry (e.g. `postcode` on some commercial/edge listings) come back `null` rather than guessed.

### ❓ FAQ

**Do I need a SpareRoom account or API key?**

No. This Actor scrapes SpareRoom.co.uk's own publicly listed room data — no login, no API key.

**Why a location slug instead of a city name I type freely?**

SpareRoom's own URL structure uses a fixed slug per location (`london`, `brighton-and-hove`). Search on spareroom.co.uk and copy the slug from the URL, or paste the full search URL — we extract the slug either way.

**Is this for-sale property data?**

No — SpareRoom is rooms and flatshares to rent, priced per month or per week. If you need for-sale UK property data, see our other UK real-estate Actors.

**Can I scrape multiple locations in one run?**

Yes — pass multiple location slugs and we fetch and dedupe across all of them.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

## `locations` (type: `array`):

SpareRoom location slugs — the /flatshare/<location> path segment, e.g. 'london', 'manchester', 'brighton-and-hove'. A full spareroom.co.uk/flatshare/... URL is also accepted. Up to 25.

## `maxPagesPerLocation` (type: `integer`):

Result pages to walk per location. Pagination is offset-based (offset += 10 each page, ~11 listings/page) — not page numbers.

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

Cap on rows this run, summed across all locations.

## `minRent` (type: `integer`):

Optional minimum rent filter, in rentPeriod units (GBP).

## `maxRent` (type: `integer`):

Optional maximum rent filter, in rentPeriod units (GBP).

## `rentPeriod` (type: `string`):

Period minRent/maxRent are expressed in.

## `proxyConfiguration` (type: `object`):

Apify DATACENTER proxy on our provisioned BUYPROXIES94952 group — the cheapest tier and the right one: SpareRoom serves this Actor a plain HTTP 200 with no anti-bot header. The exit country is deliberately NOT pinned; that pack is US-only, and requesting a GB exit makes the proxy refuse the connection outright. Page identity is verified from the listing data itself (GBP rents, UK postcodes), not from the exit IP.

## Actor input object example

```json
{
  "locations": [
    "london",
    "manchester",
    "brighton-and-hove"
  ],
  "maxPagesPerLocation": 2,
  "maxResults": 30,
  "rentPeriod": "pcm",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ]
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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 = {
    "locations": [
        "london",
        "manchester",
        "brighton-and-hove"
    ],
    "maxPagesPerLocation": 2,
    "maxResults": 30,
    "rentPeriod": "pcm",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "BUYPROXIES94952"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/spareroom-flatshare-listings-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 = {
    "locations": [
        "london",
        "manchester",
        "brighton-and-hove",
    ],
    "maxPagesPerLocation": 2,
    "maxResults": 30,
    "rentPeriod": "pcm",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["BUYPROXIES94952"],
    },
}

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

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

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

```

## CLI example

```bash
echo '{
  "locations": [
    "london",
    "manchester",
    "brighton-and-hove"
  ],
  "maxPagesPerLocation": 2,
  "maxResults": 30,
  "rentPeriod": "pcm",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ]
  }
}' |
apify call devilscrapes/spareroom-flatshare-listings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/spareroom-flatshare-listings-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/6qaLeajcdcJx7YwIx/builds/rWGw6FP813qrwH3Hx/openapi.json
