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

Scrape Idealista property listings (Spain, Italy, Portugal). Get price, location, size, rooms, description, photos. HTTP only, fast, pay per result.

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

## Pricing

from $1.00 / 1,000 property listings

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 Real Estate Scraper

> ⭐ **Useful?** [Leave a review](https://apify.com/makework36/idealista-scraper/reviews) — takes 10 seconds and helps a lot!

Scrape property listings from Idealista.com. Works with Spanish, Italian, and Portuguese markets. Extracts prices, locations, details, and images from search result pages.

### What data does it extract?

| Field | Description |
|-------|-------------|
| title | Listing title (e.g., "Flat in calle de Alcalá") |
| price | Listed price (e.g., "€285,000") |
| details | Size, rooms, floor info (e.g., "3 bed, 2 bath, 95 m²") |
| location | Neighborhood or area |
| url | Direct link to the listing |
| image | Main listing photo URL |
| searchUrl | The search URL this listing came from |
| scrapedAt | ISO timestamp |

### Use cases

- **Property market research** — Track asking prices across neighborhoods or cities
- **Investment analysis** — Monitor listings in target areas to spot deals
- **Price comparison** — Compare prices per square meter across different zones
- **Real estate data feeds** — Build datasets for property analytics dashboards
- **Relocation research** — Quickly gather and compare available properties in a new city

### How to use

#### Search for apartments in Madrid
```json
{
    "searchUrls": [
        "https://www.idealista.com/en/venta-viviendas/madrid/"
    ],
    "maxListings": 50
}
````

#### Multiple searches

```json
{
    "searchUrls": [
        "https://www.idealista.com/en/venta-viviendas/barcelona/eixample/",
        "https://www.idealista.com/en/alquiler-viviendas/madrid/centro/",
        "https://www.idealista.com/en/venta-viviendas/valencia/"
    ],
    "maxListings": 100
}
```

#### Rental listings in Lisbon

```json
{
    "searchUrls": [
        "https://www.idealista.pt/arrendar-casas/lisboa/"
    ],
    "maxListings": 30
}
```

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| searchUrls | string\[] | — | Idealista search result page URLs (required) |
| maxListings | integer | 50 | Maximum listings to extract (1-500) |

### Output example

```json
{
    "title": "Flat in calle de Serrano, Salamanca, Madrid",
    "price": "€485,000",
    "details": "3 bed · 2 bath · 110 m² · 4th floor with lift",
    "location": "Salamanca, Madrid",
    "url": "https://www.idealista.com/inmueble/12345678/",
    "image": "https://img3.idealista.com/blur/WEB_LISTING/0/id.pro.es/12345678_xxl.jpg",
    "searchUrl": "https://www.idealista.com/en/venta-viviendas/madrid/barrio-de-salamanca/",
    "scrapedAt": "2025-03-22T18:06:12.000Z"
}
```

### Performance & cost

- Uses residential proxies geolocated in Spain to avoid blocks
- Handles Idealista's cookie consent popup automatically
- Falls back to JSON-LD structured data if DOM selectors fail
- Retries up to 5 times per URL with different proxy sessions

### FAQ

**How do I get the search URLs?**
Go to idealista.com (or idealista.pt / idealista.it), set your filters (location, price range, bedrooms, etc.), and copy the URL from your browser. The scraper works with whatever filters you apply on the site.

**Does it scrape individual listing detail pages?**
No — it extracts data from search result pages only. Each listing includes a direct URL you can use to visit the full detail page.

**Why does Idealista block requests?**
Idealista has aggressive anti-scraping measures. The actor uses stealth browser settings and residential proxies to work around this, but some requests may still fail. Running with a lower `maxListings` value and from Spanish IPs gives the best results.

**Does it work with Idealista Italy and Portugal?**
Yes. Use the appropriate domain: idealista.it for Italy, idealista.pt for Portugal. The scraper extracts the same fields regardless of the country.

### ❓ Extended FAQ

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

Pay-per-result on Apify (no monthly subscription). At $1.00 per 1,000 listings, scraping 100 properties costs ~$0.10. Apify Free plan includes $5 credit (~5,000 listings to start).

#### Is Idealista scraping legal in Spain?

Idealista listings are public data. Scraping for personal market research, lead generation, or analytics is generally legal under EU GDPR when the data is non-personal. Always respect Idealista's Terms of Service and don't republish copyrighted content.

#### Can I get historical Idealista price data?

The scraper returns current listings only. To track price history, schedule the scraper to run daily or weekly (Apify supports cron schedules) and store results.

#### Which Idealista markets are supported?

Idealista España (.com), Italia (.it), and Portugal (.pt) — all three countries Idealista operates in. Pass URLs from any domain.

#### Can I filter by price range, rooms, or property type?

Yes — apply the filters directly on idealista.com / .it / .pt before copying the URL. The scraper respects all filter parameters in the URL.

#### What's the difference vs other Idealista scrapers?

HTTP + light browser fallback (no full Puppeteer overhead). 5-10× cheaper compute than browser-only competitors. Built-in residential proxy + retries to handle Idealista's anti-bot measures.

### 🔗 Other scrapers by makework36

- [VRBO Scraper](https://apify.com/makework36/vrbo-scraper) — vacation rentals + Expedia hotels
- [Trustpilot Scraper API](https://apify.com/makework36/trustpilot-reviews-scraper) — reviews & business search
- [Fast Airbnb Price Scraper](https://apify.com/makework36/fast-airbnb-price-scraper) — Airbnb listings + prices
- [Flight Price Scraper 2026](https://apify.com/makework36/flight-price-scraper) — compare flights across 7 sources

# Actor input Schema

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

Idealista search result URLs

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

Maximum listings to scrape

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.idealista.com/en/venta-viviendas/madrid/"
  ],
  "maxListings": 50
}
```

# 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 = {
    "searchUrls": [
        "https://www.idealista.com/en/venta-viviendas/madrid/"
    ]
};

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

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Idealista Scraper API - Spain, Italy & Portugal Real Estate",
        "description": "Scrape Idealista property listings (Spain, Italy, Portugal). Get price, location, size, rooms, description, photos. HTTP only, fast, pay per result.",
        "version": "0.1",
        "x-build-id": "i1g5aFdbzWeb1ImCx"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/makework36~idealista-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-makework36-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/makework36~idealista-scraper/runs": {
            "post": {
                "operationId": "runs-sync-makework36-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/makework36~idealista-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-makework36-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",
                "required": [
                    "searchUrls"
                ],
                "properties": {
                    "searchUrls": {
                        "title": "Idealista search URLs",
                        "type": "array",
                        "description": "Idealista search result URLs",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxListings": {
                        "title": "Max listings",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum listings to scrape",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
