# Spareroom Listings Extractor (`kawsar/spareroom-listings-extractor`) Actor

SpareRoom room and flatshare scraper that pulls prices, locations, room types, availability, and photos from search results, so you can research the rental market and export clean data in one run.

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

## Pricing

from $2.99 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Listings Extractor

Extract room and flatshare listings from SpareRoom search results and turn them into clean, structured data. Give the actor a location or a SpareRoom search URL and it collects every room ad across the results, including price, location, room type, availability, property details, and images. Export the data to JSON, CSV, or Excel for rental market research, price tracking, or lead generation.

### What it does

- Pulls listings straight from SpareRoom flatshare search results
- Follows pagination automatically so you can collect hundreds of rooms per run
- Returns one clean record per listing with prices, locations, and images
- Removes duplicates across pages so every room appears once
- Exports to JSON, CSV, Excel, or the Apify API

### Input

You can start a search in two ways. Use either one, or both together.

| Field | Type | Description |
|-------|------|-------------|
| `location` | string | Town, city, or area to search, for example `London` or `Manchester`. |
| `searchUrls` | array | One or more full SpareRoom flatshare search URLs. Handy when you already have a saved search with filters applied. |
| `maxItems` | integer | Maximum number of listings to collect per run. Default 100, up to 1000. |
| `requestTimeoutSecs` | integer | Per-request timeout in seconds. Default 30. |

#### Example input

```json
{
    "location": "London",
    "searchUrls": [
        "https://www.spareroom.co.uk/flatshare/?search_id=1482037460"
    ],
    "maxItems": 100
}
```

### Output

Each listing becomes one record in the dataset.

```json
{
    "listingId": "7814110",
    "listingTitle": "Single En-Suite Rooms in Woodlands",
    "listingUrl": "https://www.spareroom.co.uk/flatshare/flatshare_detail.pl?flatshare_id=7814110",
    "price": "£110",
    "pricePeriod": "pw",
    "billsIncluded": true,
    "location": "Doncaster (DN6)",
    "neighbourhood": "Doncaster",
    "postcode": "DN6",
    "propertyType": "house",
    "roomsInProperty": 5,
    "roomType": "2 singles",
    "availability": "Available now",
    "advertiserRole": "agent",
    "daysListed": 2,
    "status": "new",
    "listingType": "offered",
    "shortDescription": "Company tenancies available, near local amenities and transport links.",
    "photoCount": 9,
    "mainImage": "https://photos2.spareroom.co.uk/images/flatshare/listings/unmodified/30/89/30894640.jpg",
    "profilePhoto": "https://photos2.spareroom.co.uk/images/flatshare/listings/square/10/00/100050221.jpg",
    "sourceUrl": "https://www.spareroom.co.uk/flatshare/?search_id=1482037460",
    "scrapedAt": "2026-08-19T12:00:00+00:00"
}
```

#### Output fields

| Field | Description |
|-------|-------------|
| `listingId` | SpareRoom listing identifier |
| `listingTitle` | Advert headline |
| `listingUrl` | Link to the full listing page |
| `price` / `pricePeriod` | Advertised rent and its period, such as pw or pcm |
| `normalisedRate` / `normalisedRatePeriod` | Rent normalised by SpareRoom for comparison |
| `billsIncluded` | Whether bills are included in the rent |
| `location` / `neighbourhood` / `postcode` | Where the room is |
| `propertyType` / `roomsInProperty` | Property type and total rooms |
| `roomType` | Room offered, such as single, double, or en-suite |
| `availability` / `availableNow` | When the room is free |
| `advertiserRole` | Agent or private advertiser |
| `daysListed` / `status` / `brand` | How long it has been live and its listing status |
| `listingType` | Offered or wanted |
| `shortDescription` | Snippet from the advert |
| `photoCount` / `mainImage` / `profilePhoto` | Image count and photo links |
| `sourceUrl` / `scrapedAt` | Search URL and collection timestamp |

### Common uses

- Track room prices and availability across a city over time
- Build a rental market dataset for a neighbourhood or postcode
- Find new listings from agents or private landlords for outreach
- Feed live room data into a dashboard, spreadsheet, or app

### Tips

- Paste a SpareRoom search URL to reuse filters like price, room type, and availability
- Raise `maxItems` to pull deeper into the results
- Run on a schedule to catch new rooms as they are posted

# Actor input Schema

## `location` (type: `string`):

Town, city, or area to search for rooms on SpareRoom. Leave blank if you are using search URLs below.

## `searchUrls` (type: `array`):

Full SpareRoom flatshare search URLs. Use this to reuse a saved search with filters already applied. Each URL is paginated automatically.

## `maxItems` (type: `integer`):

Maximum number of listings to extract per run.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## Actor input object example

```json
{
  "location": "London",
  "searchUrls": [
    "https://www.spareroom.co.uk/flatshare/?search_id=1482037460"
  ],
  "maxItems": 100,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `properties` (type: `string`):

Extract room and flatshare listings from SpareRoom search results including price, location, room type, availability, property details, and images.

# 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 = {
    "location": "London",
    "searchUrls": [
        "https://www.spareroom.co.uk/flatshare/?search_id=1482037460"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/spareroom-listings-extractor").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 = {
    "location": "London",
    "searchUrls": ["https://www.spareroom.co.uk/flatshare/?search_id=1482037460"],
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/spareroom-listings-extractor").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 '{
  "location": "London",
  "searchUrls": [
    "https://www.spareroom.co.uk/flatshare/?search_id=1482037460"
  ]
}' |
apify call kawsar/spareroom-listings-extractor --silent --output-dataset

```

## MCP server setup

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

```

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/C9rdRXgPqTmk384i8/builds/8AaGMASBsXuLhZ9tv/openapi.json
