# SpareRoom Property Scraper 🏠 (`shahidirfan/spareroom-property-scraper`) Actor

Scrape SpareRoom property listings at scale. Extract prices, room details, locations & contact info. Perfect for market analysis, competitor tracking & rental trend monitoring. Clean data exports in seconds.

- **URL**: https://apify.com/shahidirfan/spareroom-property-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Real estate, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Property Scraper

Extract structured room and flatshare listings from SpareRoom in a clean, analysis-ready dataset. Collect listing identifiers, listing titles, summaries, geo coordinates, verification signals, media signals, and source links for each result. This is useful for market monitoring, listing intelligence, and rental trend analysis.

### Features

- **URL input** — Run with a SpareRoom search URL or single listing URL.
- **Pagination support** — Collect across multiple search result pages.
- **Detail enrichment** — Each listing is enriched with detail-page metadata.
- **Incremental output** — Search-page batches are pushed as they are processed.
- **Auto-healing extraction** — Fallback parsing keeps output flowing when page HTML shifts.
- **Clean output** — Null and empty values are removed from each dataset item.
- **Production-friendly defaults** — Fast QA-safe defaults with configurable page depth and result count.

### Use Cases

#### Rental Market Tracking

Track how listing volume, verified status, and listing variants change over time in specific areas.

#### Listing Intelligence

Build datasets for competitive monitoring, lead qualification, and listing quality scoring.

#### Geo-Aware Analysis

Use latitude and longitude values for map dashboards and neighborhood-level reporting.

#### Media and Quality Signals

Analyze photo count, verification, and other listing signals to benchmark listing quality.

---

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `url` | String | Yes | — | SpareRoom URL (search page or listing page). |
| `results_wanted` | Integer | No | `20` | Maximum number of listings to save. |
| `max_pages` | Integer | No | `5` | Maximum number of search result pages to scan. |
| `proxyConfiguration` | Object | No | Apify Proxy enabled | Proxy configuration for better reliability. |

### Input Priority

1. If `url` is provided, it is used as-is.
2. If `url` is missing, the run fails with a clear validation error.

---

### Output Data

Each dataset item may include:

| Field | Type | Description |
|---|---|---|
| `listing_id` | String | SpareRoom listing ID. |
| `title` | String | Listing title. |
| `summary` | String | Listing summary text. |
| `price` | String | Price hint when available. |
| `url` | String | Canonical listing URL. |
| `search_url` | String | Source search URL used to discover the listing. |
| `listing_type` | String | Listing type signal (for example offered/wanted). |
| `listing_variant` | String | Listing variant signal (for example live in landlord). |
| `property_type` | String | Property type text when available. |
| `is_verified` | String | Verification signal from listing metadata. |
| `photo_count` | String | Number of photos signal when available. |
| `has_video` | String | Video availability signal. |
| `housemates_count` | String | Housemate count signal when available. |
| `latitude` | String | Latitude value when available. |
| `longitude` | String | Longitude value when available. |
| `image_urls` | Array<String> | Listing image URLs (trimmed set). |
| `source` | String | Source identifier (`spareroom`). |

---

### Usage Examples

#### Search URL Input

```json
{
    "url": "https://www.spareroom.co.uk/flatshare/?search_id=1434973371&mode=list",
    "results_wanted": 20,
    "max_pages": 5
}
````

#### Single Listing URL Input

```json
{
    "url": "https://www.spareroom.co.uk/flatshare/flatshare_detail.pl?flatshare_id=18218138",
    "results_wanted": 1
}
```

#### With Residential Proxies

```json
{
    "url": "https://www.spareroom.co.uk/flatshare/?search_id=1434973371&mode=list",
    "results_wanted": 50,
    "max_pages": 8,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
```

***

### Sample Output

```json
{
    "listing_id": "18218138",
    "title": "double room in London E4 (E4)",
    "summary": "Rooms for rent in London E4, E4: A bright and spacious double room...",
    "url": "https://www.spareroom.co.uk/flatshare/flatshare_detail.pl?flatshare_id=18218138",
    "search_url": "https://www.spareroom.co.uk/flatshare/?search_id=1434973371&mode=list",
    "listing_type": "offered",
    "listing_variant": "live in landlord",
    "property_type": "4 bed",
    "is_verified": "yes",
    "photo_count": "6",
    "has_video": "no",
    "housemates_count": "4",
    "latitude": "51.608197",
    "longitude": "-0.0134463",
    "source": "spareroom"
}
```

***

### Tips for Best Results

#### Start Small, Then Scale

Use `results_wanted: 20` for quick validation, then increase after checking output quality.

#### Use Stable Search URLs

For repeatable collection, use known working SpareRoom result URLs with `mode=list`.

#### Use Proxies for Reliability

For larger runs, enable Apify Proxy and use residential groups when needed.

#### Tune Pagination Intentionally

Increase `max_pages` only when you need wider coverage.

***

### Integrations

- **Google Sheets** — Export and review listing datasets.
- **Airtable** — Build searchable listing databases.
- **Make** — Trigger downstream automations.
- **Zapier** — Push data into CRMs and notifications.
- **Webhooks** — Send data to your own backend.

#### Export Formats

- **JSON**
- **CSV**
- **Excel**
- **XML**

***

### Frequently Asked Questions

#### Can I run it with any SpareRoom URL?

Yes. Search result URLs and single listing URLs are both supported.

#### Why do some fields differ between listings?

Listings can expose different metadata. The actor only saves available non-empty values.

#### Does the actor remove empty values?

Yes. Null, undefined, and empty-string values are removed before saving each item.

#### Is this suitable for scheduled monitoring?

Yes. It is designed for repeatable runs with stable inputs and configurable limits.

***

### Support

For issues and feature requests, use the Apify Console issue/support channels.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [Apify API](https://docs.apify.com/api/v2)
- [Scheduling Runs](https://docs.apify.com/platform/schedules)

***

### Legal Notice

Use this actor only for lawful and legitimate data collection. You are responsible for compliance with website terms, local laws, and any applicable data usage requirements.

# Actor input Schema

## `url` (type: `string`):

Any SpareRoom URL. Supports search result URLs and single listing URLs.

## `results_wanted` (type: `integer`):

Maximum number of listings to collect

## `max_pages` (type: `integer`):

Maximum number of result pages to scrape

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

Proxy settings.

## Actor input object example

```json
{
  "url": "https://www.spareroom.co.uk/flatshare/?search_id=1434973371&mode=list",
  "results_wanted": 20,
  "max_pages": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "url": "https://www.spareroom.co.uk/flatshare/?search_id=1434973371&mode=list",
    "results_wanted": 20,
    "max_pages": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/spareroom-property-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 = {
    "url": "https://www.spareroom.co.uk/flatshare/?search_id=1434973371&mode=list",
    "results_wanted": 20,
    "max_pages": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/spareroom-property-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 '{
  "url": "https://www.spareroom.co.uk/flatshare/?search_id=1434973371&mode=list",
  "results_wanted": 20,
  "max_pages": 5
}' |
apify call shahidirfan/spareroom-property-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SpareRoom Property Scraper 🏠",
        "description": "Scrape SpareRoom property listings at scale. Extract prices, room details, locations & contact info. Perfect for market analysis, competitor tracking & rental trend monitoring. Clean data exports in seconds.",
        "version": "0.0",
        "x-build-id": "Agwp7vYcCFO9977Mb"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~spareroom-property-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-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/shahidirfan~spareroom-property-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-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/shahidirfan~spareroom-property-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-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",
                "required": [
                    "url"
                ],
                "properties": {
                    "url": {
                        "title": "URL",
                        "type": "string",
                        "description": "Any SpareRoom URL. Supports search result URLs and single listing URLs."
                    },
                    "results_wanted": {
                        "title": "Results Wanted",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of listings to collect",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Maximum Pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of result pages to scrape",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings.",
                        "default": {
                            "useApifyProxy": 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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
