# Idealista Scraper - Spain Property Data (`benthepythondev/idealista-scraper`) Actor

Scrape Idealista (Spain's #1 property portal), for sale or to rent: price, rooms, area (m2), floor, location, agency/agent, image and listing URL. Search by location name or paste an Idealista URL.

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

## Pricing

from $2.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

## 🏠 Idealista Scraper — Spain Property Data

Scrape **Idealista**, Spain's #1 property portal, **for sale (venta) or to rent (alquiler)** — and get clean, structured listings: price, rooms, area in m², floor, location, **agency / agent name and profile link**, description, image and the listing URL. Search by Spanish location name or paste an Idealista search URL to keep all your filters.

Built for property research, **real-estate lead generation**, market analysis and price monitoring across Spain. Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

### 🔎 What is the Idealista Scraper?

Give it Spanish locations (e.g. "madrid", "barcelona", "valencia") or paste Idealista search URLs, choose for sale or to rent, and it returns matching listings as structured rows — paginated to your requested limit. Perfect for building a clean Spanish property dataset or a list of active listings and the agencies behind them.

#### What data does it extract?

- **Price** (numeric + raw text, e.g. "320.000 €")
- **Rooms** and **area** (m²)
- **Floor** (planta / bajo / exterior…)
- **Title** and **description**
- **Operation** (sale or rent) and **price period** for rentals
- **Agency / agent** name and **profile URL** (lead generation)
- **Listing tag** (e.g. new build, price drop)
- **Main image**
- **Listing URL** and **id**

### ⬇️ Input

| Field | Type | Description |
|-------|------|-------------|
| `location` | array | Spanish place names, e.g. `madrid`. Each becomes an Idealista search. |
| `searchUrls` | array | Idealista search-results URLs to scrape exactly (keeps your filters). |
| `operation` | string | `sale` (venta) or `rent` (alquiler). |
| `maxResults` | integer | Max listings per search. Default `50`. |

#### Example input

```json
{
  "location": ["madrid", "barcelona"],
  "operation": "sale",
  "maxResults": 100
}
````

### ⬆️ Output

One record per listing:

```json
{
  "id": "106543210",
  "url": "https://www.idealista.com/inmueble/106543210/",
  "title": "Piso en venta en calle de Alcalá",
  "operation": "sale",
  "price": 320000,
  "price_raw": "320.000 €",
  "currency": "EUR",
  "price_period": null,
  "rooms": 3,
  "area_sqm": 95,
  "floor": "Planta 4ª exterior",
  "property_type": "property",
  "description": "Luminoso piso reformado en el centro, con ascensor...",
  "tag": "Obra nueva",
  "agent": "Inmobiliaria Centro Madrid",
  "agent_url": "https://www.idealista.com/pro/inmobiliaria-centro-madrid/",
  "image": "https://img4.idealista.com/blur/.../property.jpg",
  "city": "madrid",
  "country": "ES",
  "query": "madrid"
}
```

### 💡 Use cases

- 🎯 **Real-estate lead generation** — build a list of agencies and their profile links.
- 🏠 **Market research** — analyze asking prices by city, area and property size.
- 📈 **Price monitoring** — schedule runs and track price drops over time.
- 🤖 **Automation** — push new listings to Slack/Sheets via Make/Zapier/n8n.

### ❓ FAQ

**Do I need an API key or login?** No — just provide locations or search URLs.

**Can I scrape rentals?** Yes — set `operation` to `rent`, or paste an alquiler URL.

**Can I scrape an exact filtered search?** Yes — paste the Idealista URL into `searchUrls` and all your filters (price, rooms, zone) are kept.

**Do I get the agency details?** Yes — agency / agent name and profile URL where the listing is professional.

**How many listings can I get?** Set `maxResults`. Idealista caps a single search around 1800 listings; split by city or filters to go wider.

**How does pricing work?** Pay per listing returned. No subscription.

**How fresh is the data?** It is fetched live on each run, straight from the results pages.

**Is it legal?** It collects publicly available listing data. Scrape responsibly, respect robots/ToS, and follow EU/Spanish GDPR for any personal data such as agent contacts.

### ⚙️ How it works

Idealista protects its data behind a bot challenge, so this actor uses a privacy-hardened stealth browser through Spanish residential IPs to load the site like a real visitor, then reads the listings Idealista renders into its results pages — returning clean, structured JSON instead of fragile HTML. It resolves your locations, paginates automatically and de-duplicates by listing id as it goes. The same input shape works for a quick check or a deep multi-area pull — only `maxResults` changes.

### 👥 Who uses Spanish property data?

Property data is valuable to investors, agencies, proptech teams and analysts. An investor compares asking prices across Madrid, Barcelona and the Costas; an agency monitors competitor stock and the agencies behind it; a proptech app enriches its map with fresh inventory; an analyst tracks supply and price reductions. Because every record is plain JSON with consistent fields, it drops straight into a spreadsheet, CRM, BI tool or LLM pipeline with no custom parsing.

### 📤 Export, schedule & integrate

Every run is saved to a dataset you can export to **JSON, CSV, Excel, XML or RSS**, or pull through the **Apify API**. Wire it into **Make, Zapier, n8n, Google Sheets, Slack** or your **own database**, run it on a **schedule** to catch new listings, and call it from AI agents through the **Apify MCP server**.

### 💡 Tips for best results

- Paste an Idealista search URL to capture your exact filters (price, rooms, zone, radius).
- Run sale and rent separately to keep two clean datasets.
- Schedule a daily run and diff by `id` for a new-listings alert.
- The agency name + profile URL make professional listings a warm lead.

### ❓ More FAQ

**How fresh is the data?** It is fetched live on each run.

**Can I run it automatically?** Yes — use Apify Schedules (cron).

**Are duplicates removed?** Listings are de-duplicated by id within each run.

**Which export formats?** JSON, CSV, Excel, XML and RSS, plus the Apify API.

**Can AI agents use it?** Yes — via the Apify API and MCP server.

### 🔗 You might also like

- [Immobiliare.it Scraper](https://apify.com/benthepythondev/immobiliare-scraper) — Italian property data.
- [Rightmove Scraper](https://apify.com/benthepythondev/rightmove-scraper) — UK property and agent data.
- [Real Estate Agent Lead Scraper](https://apify.com/benthepythondev/real-estate-agent-lead-scraper) — agent contact leads.

***

**Keywords:** idealista scraper, idealista api, spain property data, property scraper spain, idealista listings, real estate leads spain, spanish real estate, piso en venta, piso en alquiler, idealista data, house prices spain, property market spain, madrid property, barcelona property, inmobiliaria leads, venta viviendas, alquiler viviendas

# Actor input Schema

## `location` (type: `array`):

Spanish place names to search, e.g. 'madrid', 'barcelona', 'valencia'. Each is turned into an Idealista search. For an exact area or filtered search, use Search URLs instead.

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

Idealista search-results URLs to scrape exactly (paste from your browser to keep all filters: price, rooms, zone). Used in addition to any locations.

## `operation` (type: `string`):

Whether to scrape properties for sale (venta) or to rent (alquiler). Applies to location searches.

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

Maximum number of listings to return per location or search URL. Idealista caps a single search around 1800 listings.

## Actor input object example

```json
{
  "location": [
    "madrid"
  ],
  "searchUrls": [
    "https://www.idealista.com/venta-viviendas/madrid-madrid/"
  ],
  "operation": "sale",
  "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 = {
    "location": [
        "madrid"
    ],
    "searchUrls": [
        "https://www.idealista.com/venta-viviendas/madrid-madrid/"
    ],
    "operation": "sale",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/idealista-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": ["madrid"],
    "searchUrls": ["https://www.idealista.com/venta-viviendas/madrid-madrid/"],
    "operation": "sale",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/idealista-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 '{
  "location": [
    "madrid"
  ],
  "searchUrls": [
    "https://www.idealista.com/venta-viviendas/madrid-madrid/"
  ],
  "operation": "sale",
  "maxResults": 10
}' |
apify call benthepythondev/idealista-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Idealista Scraper - Spain Property Data",
        "description": "Scrape Idealista (Spain's #1 property portal), for sale or to rent: price, rooms, area (m2), floor, location, agency/agent, image and listing URL. Search by location name or paste an Idealista URL.",
        "version": "1.0",
        "x-build-id": "Yqo9kGZggi8dY5xu0"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~idealista-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-idealista-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~idealista-scraper/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-idealista-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~idealista-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-idealista-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": {
                    "location": {
                        "title": "Locations",
                        "type": "array",
                        "description": "Spanish place names to search, e.g. 'madrid', 'barcelona', 'valencia'. Each is turned into an Idealista search. For an exact area or filtered search, use Search URLs instead.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchUrls": {
                        "title": "Search URLs",
                        "type": "array",
                        "description": "Idealista search-results URLs to scrape exactly (paste from your browser to keep all filters: price, rooms, zone). Used in addition to any locations.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "operation": {
                        "title": "For sale or to rent",
                        "enum": [
                            "sale",
                            "rent"
                        ],
                        "type": "string",
                        "description": "Whether to scrape properties for sale (venta) or to rent (alquiler). Applies to location searches.",
                        "default": "sale"
                    },
                    "maxResults": {
                        "title": "Max results per search",
                        "minimum": 1,
                        "maximum": 1800,
                        "type": "integer",
                        "description": "Maximum number of listings to return per location or search URL. Idealista caps a single search around 1800 listings.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
