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

Scrape Idealista property listings (sale & rent) across Spain, Italy and Portugal: price, price per m², rooms, size, floor, location, advertiser type and description. Paste any Idealista search URL — the scraper paginates automatically. No login, no API key.

- **URL**: https://apify.com/haketa/idealista-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Real estate
- **Stats:** 1 total users, 0 monthly users, 100.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Idealista Scraper — Spain, Italy & Portugal Real Estate 🏠

Scrape **property listings from [Idealista](https://www.idealista.com)** — the #1 real-estate portal in **Spain, Italy and Portugal** — for both **sale and rent**. For every listing you get **price, price per m², rooms, size, floor, location, advertiser type and description**. Paste any Idealista search URL and the scraper paginates automatically.

No login, no API key, no browser extension. Export to **JSON, CSV, Excel, HTML or XML** or pull from the API.

> **Residential proxy required.** Idealista is protected by DataDome; this actor passes it using a residential proxy (defaults to Apify Residential, Spain).

***

### What you get

For every property listing:

- **Price** + currency + **price per m²** (computed)
- **Deal type** — sale or rent
- **Rooms**, **size (m²)**, **floor**
- **Title & location**, **description**
- **Advertiser type** — professional (agency) vs private
- **Listing URL** and **thumbnail**

### Use cases

- **Property price & yield analysis** — compare €/m² across cities and neighborhoods; track sale vs rent.
- **Real-estate market intelligence** — monitor supply, prices and sizes across Spain/Italy/Portugal.
- **Agency lead generation** — collect professional advertisers active in a market.
- **Investment & relocation research** — shortlist by price, size, rooms and location.
- **Market datasets** — build Iberian/Italian property datasets over time.

***

### Input

| Field | Type | Description |
|-------|------|-------------|
| `startUrls` | array | Idealista result URLs. Sale: `https://www.idealista.com/en/venta-viviendas/madrid-madrid/`. Rent: `/alquiler-viviendas/...`. Works with `.com/.es/.it/.pt`. Filter on Idealista and paste the URL. |
| `maxItems` | integer | Max listings per URL. |
| `proxyConfiguration` | object | **Residential required** (DataDome). Defaults to Apify Residential, Spain. Use IT/PT residential for `.it`/`.pt`. |

#### Example input

```json
{
  "startUrls": [
    { "url": "https://www.idealista.com/en/venta-viviendas/madrid-madrid/" }
  ],
  "maxItems": 500,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "ES" }
}
```

***

### Output

One row per listing.

#### Example record

```json
{
  "id": "106387165",
  "title": "Flat / apartment in Calle de Girona, La Dreta de l'Eixample, Barcelona",
  "url": "https://www.idealista.com/en/inmueble/106387165/",
  "dealType": "sale",
  "price": 1749000,
  "currency": "EUR",
  "priceText": "1,749,000€",
  "pricePerM2": 9109,
  "rooms": 3,
  "sizeM2": 192,
  "floor": "5th floor exterior with lift",
  "description": "Exclusive apartment in the heart of the Eixample…",
  "advertiserType": "professional",
  "thumbnail": "https://img4.idealista.com/…",
  "scrapedAt": "2026-10-14T13:00:00.000Z"
}
```

#### Fields

| Field | Description |
|-------|-------------|
| `id` / `title` / `url` | Listing id, title and link. |
| `dealType` | `sale` or `rent`. |
| `price` / `currency` / `priceText` | Price (number), currency and raw label. |
| `pricePerM2` | Price ÷ size — great for comparisons. |
| `rooms` / `sizeM2` / `floor` | Key attributes. |
| `description` | Listing description. |
| `advertiserType` | `professional` (agency) or `private`. |
| `thumbnail` | Main image. |
| `scrapedAt` | ISO timestamp. |

***

### How it works

Idealista serves plain server-rendered HTML; the actor fetches each search page over HTTP through a residential proxy (which passes DataDome), parses the listing cards, and pages through `.../pagina-N.htm` — de-duplicating as it goes.

***

### FAQ

**Why residential proxy?** Idealista uses DataDome bot protection; datacenter IPs are blocked. Residential IPs pass. The actor retries automatically if a request is challenged.

**Sale and rent?** Both — `dealType` marks each listing.

**Which countries?** Spain (`.com`/`.es`), Italy (`.it`), Portugal (`.pt`). Match the proxy country to the domain for best results.

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

***

### Legal & ethical use

This actor collects **publicly available** listing data from Idealista. Listings may contain personal data — use the output responsibly and in line with Idealista's Terms and applicable Spanish/EU law. You are responsible for how you use the data.

# Actor input Schema

## `startUrls` (type: `array`):

Idealista result URLs — e.g. <b>https://www.idealista.com/en/venta-viviendas/madrid-madrid/</b> (sale) or <b>/alquiler-viviendas/...</b> (rent). Works with .com/.es/.it/.pt. Filter on Idealista and paste the URL; the scraper paginates automatically.

## `maxItems` (type: `integer`):

Maximum listings to collect per URL.

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

<b>Residential proxy required</b> — Idealista uses DataDome, which blocks datacenter IPs. Defaults to Apify Residential (Spain). For .it/.pt use Italy/Portugal residential.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.idealista.com/en/venta-viviendas/madrid-madrid/"
    }
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

Scraped Idealista property listings.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.idealista.com/en/venta-viviendas/madrid-madrid/"
        }
    ],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/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 = {
    "startUrls": [{ "url": "https://www.idealista.com/en/venta-viviendas/madrid-madrid/" }],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/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 '{
  "startUrls": [
    {
      "url": "https://www.idealista.com/en/venta-viviendas/madrid-madrid/"
    }
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call haketa/idealista-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/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/2NdtvoibOXQwmSOZw/builds/kLYYn2DbgJNXpYVrt/openapi.json
