# Idealista Real Estate Scraper (`viralanalyzer/idealista-es-pt`) Actor

Scrape real estate listings from Idealista Spain, Portugal and Italy.

- **URL**: https://apify.com/viralanalyzer/idealista-es-pt.md
- **Developed by:** [viralanalyzer](https://apify.com/viralanalyzer) (community)
- **Categories:** Real estate
- **Stats:** 4 total users, 3 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

## Idealista Spain, Portugal & Italy Real Estate Scraper 🏠 Sale, Rent & Rooms

[English](#english) | [Português](#portugues)

---

### English

Extract comprehensive real estate listings from **Idealista.com** (Spain), **Idealista.pt** (Portugal), and **Idealista.it** (Italy) with ease. Whether you need houses, apartments, commercial locals, land plots, or shared rooms, this scraper collects everything you need!

This Actor uses **Pay-Per-Event (PPE)** pricing, meaning you only pay for the real data you actually extract — **no monthly subscriptions or upfront fees required**.

#### Features

- 🌐 **Multi-Country Support**: Scrapes Idealista Spain, Portugal, and Italy.
- 🏢 **All Property Types**: Supports Apartments, Houses, Shared Rooms, Land, and Commercial offices.
- 🔑 **Transaction Modes**: Supports buying (Sale), renting, and roommate sharing (Rooms).
- 💰 **Pay-Per-Event Billing**: Only €0.001 per extracted listing. Immediate billing, zero free-trial delays.
- 🛡️ **Anti-Bot Evasion**: Integrated stealth mechanisms and optimized crawling speeds to maximize bypass success against Cloudflare/Datadome.
- ⚡ **Rich Structured Data**: Extracts ID, title, price, area, bedroom/bathroom count, floor, lift/elevator status, energy certificate, advertiser/agency, and full image lists.

#### Input Parameters

| Field | Type | Description | Default |
|---|---|---|---|
| `url` | String | Direct Idealista search URL. Overrides other filters. | `""` |
| `country` | String | Country site to scrape (`es`, `pt`, `it`). | `"es"` |
| `transactionType` | String | `sale` (Buy), `rent` (Rent), or `share` (Shared rooms). | `"sale"` |
| `propertyType` | String | `all`, `apartments`, `houses`, `rooms`, `commercial`, `land`. | `"all"` |
| `location` | String | City or region slug (e.g. `madrid`, `lisboa`, `porto`). | `"madrid"` |
| `priceMin` | Integer | Minimum price in Euros. | *None* |
| `priceMax` | Integer | Maximum price in Euros. | *None* |
| `maxListings` | Integer | Maximum number of listings to extract. | `100` |
| `proxyConfiguration` | Object | Proxy configuration. Residential proxy highly recommended. | `{"useApifyProxy": true}` |

#### Output Example

```json
{
  "id": "104859384",
  "title": "Piso en venta en calle de Alcalá, Goya, Madrid",
  "price": 450000,
  "priceFormatted": "450.000 €",
  "transactionType": "sale",
  "propertyType": "apartments",
  "area": 85,
  "bedrooms": 2,
  "bathrooms": 1,
  "floor": "3º",
  "hasLift": true,
  "energyCertificate": "E",
  "advertiser": "Altea Real Estate",
  "location": "Goya, Madrid",
  "images": [
    "https://img3.idealista.com/blur/web_gallery-m-d/0/id.pro.es.image.bundle.webp"
  ],
  "imageCount": 12,
  "url": "https://www.idealista.com/inmueble/104859384/",
  "pricePerSqm": 5294.12,
  "source": "Idealista",
  "country": "ES",
  "scrapedAt": "2026-05-23T06:20:00.000Z"
}
````

#### Use Cases

- 📊 **Market Valuation**: Track real estate price trends across European cities in real-time.
- 🎯 **Lead Generation**: Discover fresh listings and contact property advertisers/agencies instantly.
- 💼 **Investment Analysis**: Calculate yield/ROI ratios for long-term rentals vs. vacation models.

#### FAQ

**Q: Do I need a proxy to run this scraper?**\
A: Yes. Idealista uses heavy anti-bot protections. It is highly recommended to use **Apify Residential Proxies** or the Web Unlocker in the proxy configuration settings.

**Q: How does the Pay-Per-Event model work?**\
A: You are only charged per listing successfully scraped and saved to your dataset. If a run fails or returns 0 results due to a block, you pay absolutely nothing.

***

### Português

Extraia anúncios imobiliários completos do **Idealista.com** (Espanha), **Idealista.pt** (Portugal) e **Idealista.it** (Itália) de forma simples. Seja para casas, apartamentos, escritórios comerciais, terrenos ou quartos partilhados, este scraper recolhe tudo o que precisa!

Este Actor utiliza a cobrança **Pay-Per-Event (PPE)** via API, o que significa que paga apenas pelos dados reais que extrair — **sem subscrições mensais ou taxas iniciais**.

#### Funcionalidades

- 🌐 **Suporte Multi-País**: Extração nos portais de Espanha, Portugal e Itália.
- 🏢 **Todos os Tipos de Propriedade**: Apartamentos, Casas, Quartos Partilhados, Terrenos e Escritórios/Lojas.
- 🔑 **Modos de Transação**: Compra (Venda), Arrendamento e Quartos (Partilhar).
- 💰 **Cobrança Pay-Per-Event**: Apenas €0.001 por anúncio extraído. Cobrança imediata e sem períodos de teste gratuitos.
- 🛡️ **Evasão Avançada de Bots**: Mecanismos de camuflagem integrados contra detecção de webdrivers e bloqueios de Cloudflare/Datadome.
- ⚡ **Dados Ricos e Estruturados**: Retorna ID, título, preço, área, quartos/casas de banho, andar, elevador, certificado energético, anunciante e lista completa de imagens.

#### Parâmetros de Entrada

| Campo | Tipo | Descrição | Padrão |
|---|---|---|---|
| `url` | String | URL direta de pesquisa do Idealista. Ignora outros filtros. | `""` |
| `country` | String | Portal de país a extrair (`es`, `pt`, `it`). | `"es"` |
| `transactionType` | String | `sale` (Venda), `rent` (Arrendamento) ou `share` (Quartos). | `"sale"` |
| `propertyType` | String | `all`, `apartments`, `houses`, `rooms`, `commercial`, `land`. | `"all"` |
| `location` | String | Termo ou slug da localidade (ex: `lisboa`, `porto`, `madrid`). | `"madrid"` |
| `priceMin` | Integer | Preço mínimo em Euros. | *Nenhum* |
| `priceMax` | Integer | Preço máximo em Euros. | *Nenhum* |
| `maxListings` | Integer | Número máximo de anúncios a extrair. | `100` |
| `proxyConfiguration` | Object | Configurações de proxy. Proxy residencial recomendado. | `{"useApifyProxy": true}` |

#### Casos de Uso

- 📊 **Avaliação de Mercado**: Monitorize a evolução de preços de venda ou arrendamento na Europa em tempo real.
- 🎯 **Geração de Leads**: Descubra anúncios recém-publicados e entre em contacto com agências imobiliárias ou proprietários particulares.
- 💼 **Análise de Investimento**: Calcule taxas de retorno (Yield) comparando o arrendamento residencial tradicional de longa duração com quartos.

#### FAQ

**P: Preciso de proxy para rodar este scraper?**\
R: Sim. O Idealista implementa bloqueios rígidos. Recomendamos fortemente a utilização dos **Proxies Residenciais da Apify** para garantir o sucesso das extrações.

***

#### Related Actors / Atores Relacionados

- [Brazil Real Estate Scraper](https://apify.com/viralanalyzer/brazil-real-estate-scraper)
- [Mercado Livre Multi-Country Scraper](https://apify.com/viralanalyzer/mercadolibre-multi-country)
- [Airbnb Listing Scraper](https://apify.com/viralanalyzer/airbnb-scraper)

#### Changelog

- **v1.0.0 (2026-05-23)**: Lançamento oficial do Idealista Multi-Country Scraper com cobrança PPE direta e suporte a Espanha, Portugal e Itália.

# Actor input Schema

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

Direct search URL from Idealista.com, Idealista.pt, or Idealista.it. If provided, other filters below will be ignored. Example: https://www.idealista.com/alquiler-viviendas/madrid-madrid/

## `country` (type: `string`):

Idealista site to scrape from.

## `transactionType` (type: `string`):

Type of transaction to search for.

## `propertyType` (type: `string`):

Type of property to search for.

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

Slug of the location. Examples: madrid, barcelona, lisboa, porto, milano, roma. If empty, defaults to 'madrid'.

## `priceMin` (type: `integer`):

Minimum price filter in Euros. Example: 100000 for €100,000

## `priceMax` (type: `integer`):

Maximum price filter in Euros. Example: 300000 for €300,000

## `maxListings` (type: `integer`):

Maximum number of listings to extract. Each page has ~30 listings.

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

Proxy configuration. Using Apify RESIDENTIAL proxy is highly recommended to bypass Cloudflare/Datadome protections.

## Actor input object example

```json
{
  "country": "es",
  "transactionType": "sale",
  "propertyType": "all",
  "location": "madrid",
  "maxListings": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset containing all scraped real estate listings. Each item follows the dataset schema.

# 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": "",
    "location": "madrid",
    "maxListings": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("viralanalyzer/idealista-es-pt").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": "",
    "location": "madrid",
    "maxListings": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("viralanalyzer/idealista-es-pt").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": "",
  "location": "madrid",
  "maxListings": 50
}' |
apify call viralanalyzer/idealista-es-pt --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Idealista Real Estate Scraper",
        "description": "Scrape real estate listings from Idealista Spain, Portugal and Italy.",
        "version": "1.0",
        "x-build-id": "H9ScpkiecIPinCn83"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/viralanalyzer~idealista-es-pt/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-viralanalyzer-idealista-es-pt",
                "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/viralanalyzer~idealista-es-pt/runs": {
            "post": {
                "operationId": "runs-sync-viralanalyzer-idealista-es-pt",
                "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/viralanalyzer~idealista-es-pt/run-sync": {
            "post": {
                "operationId": "run-sync-viralanalyzer-idealista-es-pt",
                "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": {
                    "url": {
                        "title": "Direct Idealista URL",
                        "type": "string",
                        "description": "Direct search URL from Idealista.com, Idealista.pt, or Idealista.it. If provided, other filters below will be ignored. Example: https://www.idealista.com/alquiler-viviendas/madrid-madrid/"
                    },
                    "country": {
                        "title": "Country",
                        "enum": [
                            "es",
                            "pt",
                            "it"
                        ],
                        "type": "string",
                        "description": "Idealista site to scrape from.",
                        "default": "es"
                    },
                    "transactionType": {
                        "title": "Transaction Type",
                        "enum": [
                            "sale",
                            "rent",
                            "share"
                        ],
                        "type": "string",
                        "description": "Type of transaction to search for.",
                        "default": "sale"
                    },
                    "propertyType": {
                        "title": "Property Type",
                        "enum": [
                            "all",
                            "apartments",
                            "houses",
                            "rooms",
                            "commercial",
                            "land"
                        ],
                        "type": "string",
                        "description": "Type of property to search for.",
                        "default": "all"
                    },
                    "location": {
                        "title": "Location (City/Region)",
                        "type": "string",
                        "description": "Slug of the location. Examples: madrid, barcelona, lisboa, porto, milano, roma. If empty, defaults to 'madrid'.",
                        "default": "madrid"
                    },
                    "priceMin": {
                        "title": "Minimum Price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum price filter in Euros. Example: 100000 for €100,000"
                    },
                    "priceMax": {
                        "title": "Maximum Price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum price filter in Euros. Example: 300000 for €300,000"
                    },
                    "maxListings": {
                        "title": "Max Listings",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of listings to extract. Each page has ~30 listings.",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy configuration. Using Apify RESIDENTIAL proxy is highly recommended to bypass Cloudflare/Datadome protections.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
