# Spotahome Rental Listings Scraper (`bovi/spotahome-scraper`) Actor

Scrape Spotahome furnished rental listings by city: monthly price, availability date, address and coordinates, bedrooms, bathrooms, area, deposit and booking flags, landlord score, photos. Filter by property type and price. Optional landlord and stay-rule details.

- **URL**: https://apify.com/bovi/spotahome-scraper.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Real estate, Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 spotahome rental listings scrapers

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

## Spotahome Rental Listings Scraper

This Actor scrapes public [Spotahome](https://www.spotahome.com) mid-term rentals by city into one JSON record per listing: price, availability, address, coordinates, and photos. No Spotahome login and no buyer API key are required.

- Screen furnished rooms in one city by monthly price and available-from date.
- Shortlist apartments, studios, or residences by street, postal code, and coordinates.
- Compare landlord score, closed bookings, and booking flags.
- Download the public photo URLs and listing text.
- With `includeDetails`, also get landlord, stay, cancellation, and house-rule fields.

### What you get

A missing source value is omitted. Empty lists stay, so `feature_codes`, `room_feature_codes`, `offers`, and `photo_urls` can be `[]`, and `photo_count` can be `0`. All families except Run context and Listing page come from the search card; Listing page fields need `includeDetails`.

| Family | Fields | Type | Notes |
| --- | --- | --- | --- |
| 🏠 Listing | `listing_id`, `ad_id`, `url`, `title`, `description`, `property_type` | string; `ad_id` integer | `property_type` is `room_shared`, `apartment`, `studio`, or `residence`, not a `propertyTypes` name. |
| 📍 Location | `city`, `city_slug`, `street`, `postal_code`, `latitude`, `longitude` | string; `latitude` and `longitude` number | Saved only when the card has a two-value coordinate pair. |
| 💶 Price and terms | `monthly_price`, `monthly_price_max`, `currency`, `bills_included`, `available_from`, `offers` | integers; strings; ISO 8601; `offers` array | `monthly_price` is the low end. `monthly_price_max` only when the price is a range. `bills_included` is `all`, `some`, or `none`. Each offer has `discount_type`, `discount_value`, `min_stay_days`, and `max_stay_days`. |
| 🛏️ Property | `bedrooms`, `bathrooms`, `area_m2`, `feature_codes`, `room_feature_codes` | integer; string arrays | Spotahome amenity ids as strings. `feature_codes` lists ids that are on, sorted as text. |
| ✅ Booking flags | `spotahome_checked`, `instant_booking`, `no_security_deposit`, `deposit_protection`, `best_choice`, `allows_permanent_contract` | boolean | |
| 👤 Landlord | `landlord_id`, `landlord_score`, `landlord_bookings_closed` | string; integers | |
| 📷 Media | `main_photo_url`, `photo_urls`, `photo_count` | string; string array; integer | At most 20 URLs; `photo_count` is the full id count. |
| 🔎 Run context | `search_page`, `search_url`, `scraped_at` | integer; string; ISO 8601 | Page, requested search URL, and record time. |
| 📋 Listing page | `landlord_name`, `landlord_type`, `landlord_listings_published`, `landlord_response_time`, `landlord_languages`, `response_rate`, `min_stay_days`, `max_stay_days`, `cancellation_policy`, `contract_type`, `is_bookable`, `pets_allowed`, `smoking_allowed`, `couples_allowed`, `verification_date`, `views`, `favorites` | string, integer, number (`response_rate`), boolean, or array (`landlord_languages`) | Only with `includeDetails`, and only for values the listing page returned. |

### Sample output

Shortened; values unchanged. Fields not shown include `landlord_bookings_closed` and `main_photo_url`.

```json
{
  "listing_id": "90446",
  "url": "https://www.spotahome.com/barcelona/for-rent:rooms/90446",
  "title": "Room for rent in 8-bedroom apartment in El Born, Barcelona",
  "property_type": "room_shared",
  "city": "Barcelona",
  "street": "Carrer de les Jonqueres",
  "postal_code": "08003",
  "latitude": 41.38823,
  "longitude": 2.17402,
  "monthly_price": 680,
  "currency": "EUR",
  "available_from": "2027-02-01T00:00:00+0000",
  "bedrooms": 8,
  "bathrooms": 2,
  "area_m2": 244,
  "spotahome_checked": true,
  "landlord_score": 400,
  "photo_count": 5
}
```

### Pricing

This Actor uses pay per event. The primary event is one saved listing.

> **Note:** You pay only for the events listed below. This Actor does not use the Pay per event + usage option, so the platform usage of your runs (compute, proxy traffic and storage) is not billed to you separately.

| Event | When it is charged | Price on Free |
| --- | --- | --- |
| `apify-actor-start` | When the Actor starts. One event per GB of memory, with a minimum of one event. | $0.00005 |
| `apify-default-dataset-item` | One saved listing, including a listing saved without listing-page fields. | $0.0007 |

Default memory is 512 MB, so a run charges one Actor Start event. Unsaved listings create no dataset-item event. `maxResults` caps saved listings (default 50).

On Free, 1,000 listings = 1,000 × $0.0007 + $0.00005 = $0.70005.

On Free, 10,000 listings = 10,000 × $0.0007 + $0.00005 = $7.00005.

On Free, 7142 results = $4.99945 (7142 × $0.0007 + $0.00005).

Apify Free plan includes $5 of monthly platform credit; the $5 credit covers 7142 results (7142 × $0.0007 + $0.00005 = $4.99945).

### How to use

1. Sign in to Apify and open Spotahome Rental Listings Scraper.
2. Set `location` to a city, a city and country, or a Spotahome slug.
3. Set `propertyTypes`, `minPrice`, `maxPrice`, and `maxResults` for the listings you want.
4. Leave `includeDetails` off for search-card fields, or on to open each listing page.
5. Start the run and open the dataset when it finishes.
6. Repeat the run through Apify Schedules. Start with a daily schedule for prices and availability.

```json
{
  "location": "Barcelona",
  "propertyTypes": ["rooms"],
  "maxPrice": 800,
  "maxResults": 50
}
```

Export the dataset as JSON or CSV, or read it through the Apify dataset API.

### Input parameters

| Parameter | What it does | Default |
| --- | --- | --- |
| `location` | Required. `Barcelona` → `barcelona`. `Lisbon, Portugal` → `lisbon--portugal` (first two comma-separated parts). A slug with `--` (for example `barcelona--spain`) is kept. An https://www.spotahome.com/s/... URL keeps its first path segment. | Prefill `Barcelona`. Empty or omitted searches `barcelona`. |
| `propertyTypes` | Array of `rooms`, `apartments`, `studios`, and `residences`. Each selected value is a separate search (`for-rent:rooms` and the matching paths). Unknown entries are ignored. | Empty: one search with no type path. |
| `minPrice` | Integer. Keep a listing when its displayed range overlaps this floor, or its single price is at or above it. | No minimum. |
| `maxPrice` | Integer. Keep a listing when its displayed range overlaps this ceiling, or its single price is at or below it. Displayed amount, usually EUR, no currency conversion. | No maximum. |
| `includeDetails` | When true, each listing that passes the filters and has a URL gets one listing-page request; returned detail fields are merged in. | `false` |
| `maxResults` | Stop after this many saved listings. Selected types share this cap. | `50` |
| `proxyConfiguration` | Used only when `useApifyProxy` or `proxyUrls` is set. Requests then use that proxy. | Apify Proxy, residential group. |

### Limits and edge cases

| Condition | What you see | What to do |
| --- | --- | --- |
| `location` is empty, omitted, or has no usable name | Empty or omitted: `barcelona`. No letters or digits (only spaces or commas): nothing saved, log `Input 'location' is empty.`, Succeeded, empty dataset. | Enter a city or slug with letters or digits. |
| `maxResults` is below 1 | The run ends with no listings saved and no log line. | Set `maxResults` to 1 or higher. |
| Price missing or unreadable, a price filter is set | The card is not saved. Any set `minPrice` or `maxPrice`, including 0, is a price filter. | Clear or widen the price fields. |
| Price missing or unreadable, no price filter | The card is saved without `monthly_price`. | Leave both price fields empty. |
| The displayed range does not overlap `minPrice` / `maxPrice` | That card is not saved. | Clear or widen the price fields. |
| The same `listing_id` was already seen | The card is skipped, including across selected types. | Expect one saved row per listing id. |
| Any request fails | Up to 5 tries, 40-second timeout, waits of 1, 2, 4 and 8 seconds. | Let the tries finish. |
| Search request fails after 5 tries | Warning `search page failed`. That type stops. Later types still run. The run ends Succeeded with a short dataset; saved listings remain. | Run again with residential Apify Proxy on. Off sends requests directly to Spotahome. |
| Listing page fails with `includeDetails` on | Warning `detail fetch failed`. The card is saved without listing-page fields. A page with no listing data adds nothing and logs nothing. | Use the search-card fields, or run that listing again. |
| City runs out of pages, or page 100 is reached | Per type, stops at the first of: no cards; page number other than requested (last page repeated); under 48 cards; all cards already seen (saved or skipped); page 100; `maxResults`. | Types run in order, each with its own pages, sharing `maxResults`. |
| A run fails, times out, or is aborted | Listings already in the dataset stay. Nothing after the stop is saved. | Read listings saved before the stop. |
| More than 20 photo ids | `photo_urls` has 20 URLs. `photo_count` keeps the full count. | Use `photo_count` for the total. |
| Detail value or any other value is null | That key is absent, not stored as null. | Do not expect every column on every row. |

### FAQ

#### How much does it cost to scrape Spotahome?

On Free, 50 results = $0.03505.

#### Why did my run save no listings?

See Limits for `location`, `maxResults` below 1, price filters, and a failed or empty search.

#### What if the run stops before maxResults?

Saved listings stay. See Limits for pagination and a failed page.

#### Is it legal to collect Spotahome listings?

The Actor reads public data from Spotahome search pages and, with `includeDetails`, listing pages. Whether a use is allowed depends on Spotahome's terms and the law that applies to your use case. This page does not decide that for you.

### Usage statistics

This Actor creates a small, content-free summary at the end of each run, used only to monitor reliability and improve this Actor. No input values, credentials or scraped data are sent.

A copy of the exact record for your run is saved as `USAGE_STATS` in your own Apify key-value store.

To opt out, set `disableUsageStats` to `true` in the input. Nothing is sent then.

[Full list of collected fields](https://api.apify.com/v2/key-value-stores/v9rgHjMKLDGtHf8tD/records/index.html)

# Actor input Schema

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

City to search, e.g. "Barcelona", "Madrid" or "Lisbon, Portugal". A Spotahome slug such as barcelona--spain also works.

## `propertyTypes` (type: `array`):

Limit results to these property types. Leave empty for all types.

## `minPrice` (type: `integer`):

Only save listings priced at or above this monthly amount (in the city's currency, usually EUR).

## `maxPrice` (type: `integer`):

Only save listings priced at or below this monthly amount.

## `includeDetails` (type: `boolean`):

Open every listing page to add landlord name and type, minimum and maximum stay, cancellation policy, pet/smoking/couple rules and view counts. Slower: one extra request per listing.

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

Maximum number of listings to save.

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

Optional. The site is usually reachable without a proxy; enable Apify Proxy if you get blocked.

## Actor input object example

```json
{
  "location": "Barcelona",
  "includeDetails": false,
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset with the scraped records.

# 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": "Barcelona",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/spotahome-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 = {
    "location": "Barcelona",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/spotahome-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 '{
  "location": "Barcelona",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/spotahome-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bovi/spotahome-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/UNhYomVsbndXhJNJ2/builds/3gOCM4gjdzVtafGhK/openapi.json
