# Idealista Scraper — Spain Listings & Agency Leads (`crawloop/idealista-scraper`) Actor

Idealista scraper for Spain: extract property listings and inmobiliaria leads — price, €/m², rooms, energy labels, photos, GPS, and agency phones. Paste search, /inmueble/, or /pro/ URLs; auto price-chunking past Idealista's pagination cap.

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

## Pricing

from $2.49 / 1,000 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 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

## Idealista Scraper — Spain Listings & Agency Leads

> **Disclaimer:** This is an unofficial integration developed independently. It is not affiliated with, sponsored by, or endorsed by Idealista or any of its subsidiaries.
>
> **Idealista** and related names are trademarks of their respective owners. Data is read from publicly accessible Idealista Spain pages. No Idealista account login is required.
>
> This Actor is provided **for informational, research, lead-generation, and market monitoring purposes**. You are solely responsible for complying with applicable laws (including GDPR), Idealista's terms of use, and your organization's policies when processing personal data such as agency phone numbers.

Scrape **Idealista Spain** (`idealista.com`) into clean JSON: sale and rent listings with price, €/m², rooms, size, floor, energy labels, photos, GPS, and optional **inmobiliaria / agency** enrichment (office address, active ads, website, revealed phones). Use it as an **Idealista API alternative** from **Python**, **Node.js**, **cURL**, or **Apify MCP** / AI assistants — paste any search, `/inmueble/`, or `/pro/` URL.

**Best for:** Spain market comps, PropTech pipelines, agency lead lists, rent/sale monitoring, and dataset export (JSON / CSV) via Apify.

| Actor | Role |
| :--- | :--- |
| Idealista Scraper ◄── you are here | Spain Idealista listings + agency leads |
| [Kleinanzeigen Scraper](https://apify.com/crawloop/kleinanzeigen-scraper) | German classifieds + monitor alerts |
| [Marktplaats Scraper](https://apify.com/crawloop/marktplaats-scraper) | Dutch marketplace listings |
| [mobile.de Scraper](https://apify.com/crawloop/mobile-de-scraper) | German vehicle listings |

### When to use this Actor

- **Idealista scraper for Spain search pages** — Copy a filtered browser URL (city, district, price, typology) into Start URLs.
- **Agency / inmobiliaria lead generation** — Enable agency enrichment to pull office address and contact phones from `/pro/` profiles.
- **Full Idealista listing details** — Switch to details mode for description, feature blocks, energy certificate letters, and photo gallery URLs.
- **Coverage past the SERP pagination cap** — Keep auto price-chunking on for cities with thousands of ads (Madrid, Barcelona, Valencia…).
- **Scheduled Idealista monitoring** — Re-run the same search on Apify schedules and export deltas into your CRM or warehouse.

### When not to use this Actor

- **Italy / Portugal Idealista TLDs** — This Actor targets **idealista.com (Spain)** first; IT/PT paths are not the primary path.
- **Authenticated Idealista actions** — No login, messaging, or private alerts inbox.
- **Datacenter-only proxies** — Idealista uses **DataDome**; Apify **Residential ES** is required for stable runs.

### Key features

- **Camoufox + Residential ES** — Anti-detect browser session tuned for DataDome.
- **Listings or full details** — Fast SERP cards, or full `/inmueble/` enrichment.
- **Agency intelligence** — Optional `/pro/` profile parse + phone reveal.
- **Smart price chunking** — Splits oversized searches into EUR bands and subdivides when a band still exceeds the soft cap.
- **Flexible inputs** — Start URLs, or form fields (`locationSlug` + operation + property type).
- **Apify-native export** — Dataset items ready for JSON/CSV and downstream Actors.

### Input

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `startUrls` | Array | Madrid search | Idealista search, `/inmueble/`, or `/pro/` URLs |
| `operation` | String | `sale` | Form search: `sale` / `rent` |
| `propertyType` | String | `homes` | Form search typology |
| `locationSlug` | String | `madrid-madrid` | Form search location path |
| `runMode` | String | `listings` | `listings` or `details` |
| `enrichAgency` | Boolean | `false` | Visit agency profile + reveal phones |
| `maxItems` | Integer | `5` | Max listings to return |
| `maxPagesPerUrl` | Integer | `1` | SERP pages per chunk |
| `autoChunk` | Boolean | `true` | Split large searches by price |
| `minPrice` / `maxPrice` | Integer | — | Optional EUR bounds |
| `concurrency` | Integer | `1` | Keep low under DataDome |
| `proxyConfiguration` | Object | Residential ES | **Required** — country `ES` |

#### Input example

```json
{
  "startUrls": [
    { "url": "https://www.idealista.com/venta-viviendas/madrid-madrid/" }
  ],
  "runMode": "details",
  "enrichAgency": true,
  "maxItems": 50,
  "maxPagesPerUrl": 3,
  "autoChunk": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "ES"
  }
}
```

### Output

Each dataset item is one Idealista listing (or a direct agency row).

| Field | Description |
| :--- | :--- |
| `id` / `url` / `title` | Property code, canonical URL, title |
| `operation` / `propertyType` | `sale`/`rent` and typology |
| `price` / `priceByArea` / `currency` | Asking price and €/m² when shown |
| `sizeM2` / `rooms` / `bathrooms` / `floor` | Size and layout |
| `hasLift` / `hasParking` / `hasTerrace` / `hasPool` | Amenity flags when detectable |
| `status` / `energyEfficiency` | Condition + energy letter scales |
| `location` | Country/city/district/neighborhood/address/coords |
| `description` / `photos` / `features` | Detail-mode rich fields |
| `agency.*` | Name, slug, URL, phone(s), office address, website, active count |

#### Output example

```json
{
  "id": "107189198",
  "url": "https://www.idealista.com/inmueble/107189198/",
  "title": "Piso en venta en Calle de María de Molina, Lista, Madrid",
  "operation": "sale",
  "propertyType": "homes",
  "price": 2415000,
  "currency": "EUR",
  "priceByArea": 7944,
  "sizeM2": 304,
  "rooms": 5,
  "bathrooms": 3,
  "floor": "2ª planta exterior",
  "hasLift": true,
  "hasParking": true,
  "location": {
    "country": "ES",
    "city": "Madrid",
    "neighborhood": "Lista",
    "address": "Calle de María de Molina"
  },
  "agency": {
    "agencyName": "Gilmar Barrio de Salamanca",
    "agencySlug": "gilmarsalamanca",
    "agencyUrl": "https://www.idealista.com/pro/gilmarsalamanca/",
    "address": "Diego de León 15, Madrid, 28006",
    "activeListingsCount": 48,
    "phone": "+3491..."
  }
}
```

### Use cases

- Build Spain sale/rent comps for a district with full photo sets and €/m².
- Generate inmobiliaria outreach lists (office address + phone) for CRM import.
- Monitor new Idealista listings under a price ceiling with scheduled Apify runs.
- Feed PropTech valuation or yield models from structured Idealista fields.
- Compare Idealista Spain inventory with other EU marketplaces (see siblings below).

### Integration examples

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('crawloop/idealista-scraper').call({
  startUrls: [{ url: 'https://www.idealista.com/venta-viviendas/barcelona-barcelona/' }],
  runMode: 'listings',
  maxItems: 100,
  proxyConfiguration: {
    useApifyProxy: true,
    apifyProxyGroups: ['RESIDENTIAL'],
    apifyProxyCountry: 'ES',
  },
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.slice(0, 5));
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient()
run = client.actor("crawloop/idealista-scraper").call(
    run_input={
        "startUrls": [
            {"url": "https://www.idealista.com/venta-viviendas/valencia-valencia/"}
        ],
        "runMode": "details",
        "enrichAgency": True,
        "maxItems": 25,
        "proxyConfiguration": {
            "useApifyProxy": True,
            "apifyProxyGroups": ["RESIDENTIAL"],
            "apifyProxyCountry": "ES",
        },
    }
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("id"), item.get("price"), (item.get("agency") or {}).get("agencyName"))
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/crawloop~idealista-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [{"url": "https://www.idealista.com/venta-viviendas/madrid-madrid/"}],
    "runMode": "listings",
    "maxItems": 20,
    "proxyConfiguration": {
      "useApifyProxy": true,
      "apifyProxyGroups": ["RESIDENTIAL"],
      "apifyProxyCountry": "ES"
    }
  }'
```

### MCP and AI assistants

Use this Actor from AI tools via [Apify MCP](https://docs.apify.com/platform/integrations/mcp).
Connect your Apify account, then call this Actor by its Store ID / name (`crawloop/idealista-scraper`).

Example prompts:

- "Run Idealista Scraper for venta viviendas in Madrid and return the top 20 rows as JSON with price, m², and neighborhood"
- "Scrape Idealista Barcelona rentals under €1,500 with agency enrichment and summarize phone coverage"
- "Pull Idealista listing details for these /inmueble/ URLs, then suggest how to compare with Kleinanzeigen Scraper for DE inventory"

### Suite next step

After Idealista Spain comps, expand EU classifieds coverage with [Kleinanzeigen Scraper](https://apify.com/crawloop/kleinanzeigen-scraper) (DE monitor + alerts) or [Marktplaats Scraper](https://apify.com/crawloop/marktplaats-scraper) for NL marketplace data.

### FAQ

**Is this an Idealista API?**\
No. It is an unofficial Idealista scraper / API alternative that reads public Spain pages and returns structured dataset items. It is not affiliated with Idealista.

**Why do I need residential proxies?**\
Idealista protects pages with DataDome. Datacenter IPs are usually challenged; Apify Residential with `apifyProxyCountry: "ES"` is the supported setup.

**What is auto price-chunking?**\
When a search reports more results than Idealista will paginate, the Actor splits the query into EUR bands (and subdivides oversized bands) so you can collect beyond a single SERP window.

**Does enrichAgency collect private seller phones?**\
Enrichment targets agency `/pro/` profiles. Private advertisers typically have no agency URL; those rows stay without `agency.phone`.

**Can I scrape Idealista with Python or Node.js?**\
Yes — use the Apify client examples above, or call the Actor from MCP / AI assistants.

### Related Actors

| Actor | Notes |
| :--- | :--- |
| Idealista Scraper ◄── you are here | Spain listings + agency leads |
| [Kleinanzeigen Scraper](https://apify.com/crawloop/kleinanzeigen-scraper) | German classifieds monitor |
| [Marktplaats Scraper](https://apify.com/crawloop/marktplaats-scraper) | Dutch marketplace listings |
| [mobile.de Scraper](https://apify.com/crawloop/mobile-de-scraper) | German vehicle listings |
| [eBay Sold Listings Scraper](https://apify.com/crawloop/ebay-sold-listings-scraper) | Sold comps across eBay sites |

# Actor input Schema

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

Idealista Spain search, listing (/inmueble/), or agency (/pro/, /inmobiliaria/) URLs. Example: https://www.idealista.com/venta-viviendas/madrid-madrid/ or https://www.idealista.com/inmueble/107189198/

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

Used when Start URLs are empty together with locationSlug. Sale or rent.

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

Idealista typology path segment when building a search URL from locationSlug.

## `locationSlug` (type: `string`):

Idealista location path, e.g. madrid-madrid, barcelona-barcelona, valencia-valencia. Ignored when Start URLs are set.

## `runMode` (type: `string`):

listings = fast card-level rows from search pages. details = visit each /inmueble/ page for full description, features, energy, gallery. Default listings for Store QA (5-minute limit).

## `enrichAgency` (type: `boolean`):

Visit each listing's /pro/ or /inmobiliaria/ page for office address, active listing count, description, website, and revealed phone numbers. Uses PPE event scraped-listing-with-agent.

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

Maximum listings to return. Keep low for Store QA; raise for production.

## `maxPagesPerUrl` (type: `integer`):

Pagination depth per search chunk before stopping. Idealista caps ~30–60 pages (~900–1,800 ads). 0 = until cap / auto-chunk.

## `autoChunk` (type: `boolean`):

When a search reports more results than Idealista pagination can return, split by price bands (and recurse) so coverage is not truncated at the page cap.

## `minPrice` (type: `integer`):

Optional lower price bound applied to form-built or chunked search URLs.

## `maxPrice` (type: `integer`):

Optional upper price bound applied to form-built or chunked search URLs.

## `concurrency` (type: `integer`):

Parallel detail/agency fetches. Keep low (1–3) — Idealista uses DataDome / Camoufox.

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

Residential proxies required (DataDome). Prefer country ES.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.idealista.com/venta-viviendas/madrid-madrid/"
    }
  ],
  "operation": "sale",
  "propertyType": "homes",
  "locationSlug": "madrid-madrid",
  "runMode": "listings",
  "enrichAgency": false,
  "maxItems": 5,
  "maxPagesPerUrl": 1,
  "autoChunk": true,
  "concurrency": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# Actor output Schema

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

Default dataset items — Idealista listings with price, location, features, and optional agency contacts.

# 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/venta-viviendas/madrid-madrid/"
        }
    ],
    "locationSlug": "madrid-madrid"
};

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

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

```

## MCP server setup

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