# Idealista Real Estate Scraper (Spain, Italy & Portugal) (`ulitron34/idealista-scraper`) Actor

Fast and reliable Idealista real estate scraper. Extract property listings, prices, square meters, bedrooms, location, contact, and agency details across Spain, Italy, and Portugal.

- **URL**: https://apify.com/ulitron34/idealista-scraper.md
- **Developed by:** [ulises salgado diaz](https://apify.com/ulitron34) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 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/actors/running/actors-in-store.md#pay-per-usage

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

## 🏠 Idealista Real Estate Scraper (Spain, Italy & Portugal)

Extract comprehensive real estate property listings from **Idealista** across Spain (`idealista.com`), Italy (`idealista.it`), and Portugal (`idealista.pt`). Collect prices, square meters, bedroom and bathroom counts, floor/lift availability, amenities (parking, terrace), precise location, and agency contact details.

Engineered with advanced anti-detect browser emulation to seamlessly navigate DataDome protections and deliver reliable, structured data feeds.

***

### 🌟 Key Features

- **Multi-Country Coverage:** Full support for **Spain** (`es`), **Italy** (`it`), and **Portugal** (`pt`).
- **Flexible Transaction Types:** Scrape **Rent** (*alquiler / affitto / arrendar*), **Sale** (*venta / vendita / comprar*), or **Shared Rooms** (*habitaciones / stanze / quartos*).
- **Comprehensive Property Metadata:**
  - Accurate numerical price and currency (€ EUR).
  - Surface area in square meters ($m^2$).
  - Bedroom & bathroom counts.
  - Floor level and elevator/lift availability (`has_lift`).
  - Parking / garage and terrace / balcony flags.
  - Property classification (Flat, Chalet, Penthouse, Duplex, Studio, Room).
- **Agency vs. Private Seller Detection:** Easily distinguish between real estate agencies and direct private owners (*Particulares*).
- **DataDome Anti-Bot Resilient:** Built with Camoufox anti-detect browser engine and Apify Proxy integration to bypass anti-scraping challenges.
- **Smart Automated Pagination:** Traverses search results pages automatically until reaching your requested property quota.

***

### 💡 Real Estate Use Cases

1. **Investment & Rental Yield Analysis:** Calculate gross and net rental yields by comparing sale and rent prices across specific neighborhoods.
2. **Proptech & Automated Valuation Models (AVM):** Train price prediction algorithms and power real estate valuation tools with live market comparables.
3. **Deal Sourcing & Below-Market Alerts:** Monitor hot areas for newly listed apartments and price drops before competitors.
4. **Competitor & Agency Intelligence:** Track market share, active inventory, and fee models of regional real estate agencies.
5. **Private Seller Lead Generation:** Filter listings by `is_agency: false` to connect directly with property owners.

***

### 📥 Input Parameters

| Parameter | Type | Required | Default | Description |
| :--- | :---: | :---: | :---: | :--- |
| `location` | String | No | `"madrid-madrid"` | City or province slug on Idealista (e.g., `'madrid-madrid'`, `'barcelona-barcelona'`, `'valencia-valencia'`, `'sevilla-sevilla'`, `'malaga-costa-del-sol'`, `'milano'`, `'lisboa'`). |
| `operation` | String | No | `"rent"` | Type of transaction: `'rent'`, `'sale'`, or `'room'`. |
| `country` | String | No | `"es"` | Country portal: `'es'` (Spain), `'it'` (Italy), or `'pt'` (Portugal). |
| `start_urls` | Array | No | `[]` | Direct search or filtered URLs on Idealista (overrides location if supplied). |
| `max_items` | Integer | No | `40` | Maximum number of listings to collect (1 - 1,000). |
| `min_price` | Number | No | `null` | Optional minimum price filter in EUR (€). |
| `max_price` | Number | No | `null` | Optional maximum price filter in EUR (€). |
| `min_rooms` | Integer | No | `null` | Minimum number of bedrooms required. |
| `proxy_configuration` | Object | No | `{"useApifyProxy": true}` | Apify Proxy configuration for IP rotation and DataDome clearance. |

#### Example Input (Rentals in Madrid)

```json
{
    "location": "madrid-madrid",
    "operation": "rent",
    "country": "es",
    "max_items": 50,
    "min_price": 900,
    "max_price": 2200,
    "min_rooms": 2,
    "proxy_configuration": {
        "useApifyProxy": true
    }
}
```

#### Example Input (Properties for Sale in Barcelona)

```json
{
    "location": "barcelona-barcelona",
    "operation": "sale",
    "country": "es",
    "max_items": 100,
    "min_price": 250000,
    "max_price": 600000,
    "proxy_configuration": {
        "useApifyProxy": true
    }
}
```

***

### 📤 Output Data Format

Results are saved to the default dataset and can be exported as **JSON, CSV, Excel (XLSX), XML, or HTML**.

#### Sample Output Record

```json
{
    "id": "104859632",
    "title": "Piso en calle de Alcalá, Goya, Madrid",
    "price": 1500.0,
    "currency": "EUR",
    "price_formatted": "1.500 €/mes",
    "operation": "rent",
    "property_type": "flat",
    "rooms": 2,
    "bathrooms": 1,
    "size_m2": 85.0,
    "floor": "Planta 3ª exterior con ascensor",
    "has_lift": true,
    "has_parking": true,
    "has_terrace": true,
    "location": "Goya, Madrid",
    "description": "Magnífico piso exterior reformado con terraza y ascensor en pleno barrio de Goya.",
    "agency": "Inmobiliaria Premium Madrid",
    "is_agency": true,
    "url": "https://www.idealista.com/inmueble/104859632/",
    "image_url": "https://img3.idealista.com/blur/WEB_LISTING/0/id/104859632/img1.jpg",
    "scraped_at": "2026-09-24T18:02:00.000Z"
}
```

***

### ⚙️ Performance & Configuration

- **Recommended Memory:** **512 MB – 1024 MB** (ideal for headless browser runs).
- **Concurrency & Speed:** ~30–60 seconds per 40 listings with anti-bot evasion delays.
- **Export Formats:** JSON, CSV, Excel, XML.

***

### 🔒 Legal & Ethical Notice

This Actor extracts public real estate listings for statistical analysis, market research, and personal productivity. Please adhere to local regulations regarding web data collection and consult Idealista's Terms of Service.

# Actor input Schema

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

City or province slug on Idealista (e.g. 'madrid-madrid', 'barcelona-barcelona', 'valencia-valencia', 'sevilla-sevilla', 'lisboa', 'milano').

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

Type of transaction: Rent (alquiler), Sale (venta), or Room sharing (habitaciones).

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

Country website to search: Spain (.com), Italy (.it), or Portugal (.pt).

## `start_urls` (type: `array`):

Optional list of direct search URLs on Idealista. Takes priority over location parameters.

## `max_items` (type: `integer`):

Maximum number of property listings to scrape.

## `min_price` (type: `number`):

Optional minimum price in EUR.

## `max_price` (type: `number`):

Optional maximum price in EUR.

## `min_rooms` (type: `integer`):

Minimum number of bedrooms (e.g. 1, 2, 3).

## `proxy_configuration` (type: `object`):

Select Apify Proxy to bypass DataDome anti-bot challenges.

## Actor input object example

```json
{
  "location": "madrid-madrid",
  "operation": "rent",
  "country": "es",
  "start_urls": [],
  "max_items": 40,
  "proxy_configuration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Scraped Idealista properties with prices, square meters, bedrooms, and location.

# 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-madrid",
    "start_urls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("ulitron34/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-madrid",
    "start_urls": [],
}

# Run the Actor and wait for it to finish
run = client.actor("ulitron34/idealista-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": "madrid-madrid",
  "start_urls": []
}' |
apify call ulitron34/idealista-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ulitron34/idealista-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/4DL46Bb2KdbtbDuBb/builds/YL4hhybiUREn2Kdyk/openapi.json
