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

Scrape Idealista property listings (buy & rent) in Spain, Italy and Portugal: price, €/m², surface, bedrooms, floor, type, city, agency, tags and description. Passes DataDome with a stealth browser on a residential IP. Filter by location, transaction and price.

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

## Pricing

$8.00 / 1,000 listing scrapeds

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

⭐ **Bookmark this Idealista Scraper** on Apify to keep it at the top of your dashboard.

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

Scrape **Idealista** property listings for **sale or rent** across **Spain (idealista.com), Italy (idealista.it) and Portugal (idealista.pt)** — with the fields you actually need for analysis and lead-gen:

- **Price**, **€/m²**, **surface (m²)**
- **Bedrooms**, **floor**
- **Property type**, **title**, **city / neighborhood**
- **Agency**, **listing tags** (e.g. Luxury), **description**
- Direct **listing URL** and stable ID

Idealista is one of the hardest real-estate portals to scrape because it is protected by **DataDome**. This actor passes it with a **stealth browser on a residential IP** and paginates natively, so you get clean, structured data without fighting captchas yourself.

### Input

| Field | What |
|---|---|
| `searchUrls` | One or more idealista search URLs you built on the site (any filters). **Recommended** — most precise. Paste e.g. `https://www.idealista.com/venta-viviendas/madrid-madrid/`. |
| `country` | `es` / `it` / `pt` — used with `location` when you don't paste full URLs. |
| `location` | Idealista location slug, e.g. `madrid-madrid`, `barcelona-barcelona`. |
| `transaction` | `buy` or `rent`. |
| `maxResults` | Max listings to return (default 100). |
| `proxyConfiguration` | Residential proxy in the target country (defaults to Apify Residential ES). Required — DataDome needs a local IP. |

**Easiest workflow:** open Idealista in your browser, set your filters (location, price, rooms, type…), copy the URL from the address bar, and paste it into `searchUrls`. The actor handles pagination automatically.

### Output (one record per listing)

```json
{
  "source": "idealista",
  "source_id": "106387165",
  "url": "https://www.idealista.com/en/inmueble/106387165/",
  "transaction": "buy",
  "property_type": "duplex",
  "title": "Duplex in Calle de Alcalá, 145, Goya, Madrid",
  "price": 3390000.0,
  "price_per_m2": 12890.0,
  "surface": 263.0,
  "bedrooms": 4,
  "city": "Madrid",
  "contact_name": "Walter Haus Madrid",
  "description": "…",
  "raw_extra": {"floor_text": "5th floor exterior with lift", "tags": ["Luxury"]}
}
```

### Use cases

- **Real-estate market analysis** — price and €/m² distribution by city / neighborhood.
- **Investment sourcing** — filter for underpriced listings, compute yields.
- **Lead generation** — agency names attached to every listing.
- **Price monitoring** — schedule daily runs, track changes over time.

### Pricing

Pay-per-result: you are charged **per listing** returned. No listings, no charge.

### Notes

- Needs a **residential IP in the target country** (handled by the default Apify Residential proxy). Datacenter IPs are blocked by DataDome.
- For very large pulls, run several narrower `searchUrls` (Idealista caps deep pagination per search).
- Also want France? See **SeLoger Scraper** and **Pige Immo FR**. Belgium? **Immoweb Scraper**.

# Actor input Schema

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

One or more idealista search URLs you built on the site (any filters, any location). Recommended: open idealista.com / .it / .pt, set your filters, copy the URL. Example: https://www.idealista.com/venta-viviendas/madrid-madrid/ . If set, this overrides the country/location fields below.

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

Which Idealista portal to search when you use 'location' instead of full search URLs.

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

Idealista location slug used to build the search when 'searchUrls' is empty. Example for Madrid: madrid-madrid . For Barcelona: barcelona-barcelona . Find it in the URL bar on idealista after selecting a place.

## `transaction` (type: `string`):

Buy (sale) or rent listings.

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

Maximum number of listings to return across all search URLs.

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

Idealista is DataDome-protected and needs a residential IP in the target country (ES/IT/PT). Defaults to Apify Residential in the selected country. Paying users get the built-in dedicated pool automatically.

## `customProxyUrl` (type: `string`):

Optional. Route through your own residential proxy instead, e.g. http://user:pass@host:port . Must be a residential IP in the target country or DataDome will block it.

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.idealista.com/venta-viviendas/madrid-madrid/"
  ],
  "country": "es",
  "transaction": "buy",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# Actor output Schema

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

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

// Run the Actor and wait for it to finish
const run = await client.actor("dltik/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/venta-viviendas/madrid-madrid/"] }

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

```

## MCP server setup

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