# Idealista Scraper — Spain, Portugal & Italy Listings (`scrape.badger/idealista-scraper`) Actor

Scrape Idealista property listings in Spain, Portugal and Italy: search for sale or rent with price, size and room filters, break the 1,800-result cap with tiled search, and pull full property detail and engagement stats.

- **URL**: https://apify.com/scrape.badger/idealista-scraper.md
- **Developed by:** [ScrapeBadger](https://apify.com/scrape.badger) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 basic calls

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?

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

### What does Idealista Scraper do?

**Idealista Scraper** extracts structured data from [Idealista](https://www.idealista.com) and delivers it as clean JSON — no proxies, browsers or anti-bot handling on your side. It is a practical **Idealista API** alternative for teams who need Idealista data on a schedule rather than a one-off export.

It covers 6 different Idealista surfaces behind a single **Mode** dropdown, so one Actor replaces a rack of single-purpose scrapers.

### Why scrape Idealista?

- **Every surface in one place** — pick a mode, fill two fields, run.
- **Anti-bot handled upstream** — residential proxy rotation, TLS and browser fingerprinting, and CAPTCHA solving happen inside the ScrapeBadger API.
- **Pay per call, not per row** — a page of results costs the same as one lookup, so bulk work stays cheap.
- **Runs on the Apify platform** — scheduling, monitoring, webhooks, the [API](https://docs.apify.com/api/v2), and integrations with Make, Zapier, Google Sheets, Slack and Airtable all work out of the box.
- **Partial results are kept** — a transient upstream failure ends the run cleanly instead of discarding what you already paid for.

### What data can Idealista Scraper extract?

Every record is pushed to the dataset as its own row. The most useful fields are below; the full record carries considerably more.

| Field | Type | Description |
| --- | --- | --- |
| `propertyCode` | string | Propertycode |
| `address` | string | Street address of the record |
| `price` | number | Price as a number |
| `size` | number | Size |
| `rooms` | number | Rooms |
| `url` | string (URL) | Canonical URL of the record |

### Idealista scraping modes

Pick one **Mode**; the input form marks the fields it needs.

| Mode | What it returns | Charged as |
| --- | --- | --- |
| **Search Listings** | Listings for a location, paginated with sort and filters. | `standard-call` |
| **Search All** | Map-tiled search that gets past Idealista's own result cap. | `standard-call` |
| **Get Property Detail** | Full property with description, features, photos and agency. | `heavy-call` |
| **Get Engagement Stats** | Views, contact emails, favourites — how hot a listing is. | `basic-call` |
| **Resolve Locations** | Turn a place name into the location ID search expects. | `basic-call` |
| **List Markets** | Supported Idealista markets (es, pt, it). | `basic-call` |

### How to scrape Idealista

1. Click **Try for free** and sign in to Apify.
2. Open **Settings → Environment variables** and add `SCRAPEBADGER_API_KEY` with your key from [scrapebadger.com](https://scrapebadger.com), ticking **Secret**.
3. Choose a **Mode** from the dropdown.
4. Fill in the fields that mode needs — the description on each field says which modes use it.
5. Set **Max items** to cap the run.
6. Press **Start** and watch the dataset fill up.
7. Export as JSON, CSV, Excel or XML, or pull it from the **API** tab.

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

This Actor is **pay per event**: one event per API call, whatever that call returns. Fetching a page of 100 records costs the same as fetching one record, so larger pages are cheaper per row.

| Event | Price per event | What triggers it |
| --- | --- | --- |
| `basic-call` | $0.0010 | A cheap call — autocomplete, reference data, single lookups. |
| `standard-call` | $0.0020 | A standard call — one search page, profile, or detail record. |
| `heavy-call` | $0.0040 | A heavy call — comments, followers, transcripts, full detail pages. |

Apify also charges its standard **$0.001 actor start fee** per run. ScrapeBadger credits are consumed on your own account on top of this.

### Input

See the **Input** tab for every option with inline documentation. A minimal run looks like this:

```json
{
  "mode": "Search Listings",
  "location": "0-EU-ES-28-07-001-079",
  "operation": "sale",
  "market": "es",
  "property_code": "111671859",
  "query": "madrid",
  "max_items": 100
}
```

**Max items** caps the run; the Actor pages until it reaches that number or Idealista runs out of results.

### Output

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel, or read it straight from the Apify API. Each record is one row:

```json
{
  "propertyCode": "<propertyCode>",
  "address": "<address>",
  "price": 1234,
  "size": 1234,
  "rooms": 1234,
  "url": "https://example.com/record/1"
}
```

### What can you do with Idealista data?

A few things teams actually build with this Actor.

#### Analyse Spanish, Portuguese and Italian property markets

Idealista is the dominant portal in all three countries. Price per square metre by neighbourhood, sampled over time, is the market index that local professionals actually use.

#### Get past the result cap with tiled search

Idealista caps a single search well below the real inventory. The Search All mode tiles the map automatically, which is the only way to see a whole city's supply in one dataset.

#### Judge how hot a listing is

Engagement stats return views, contact emails and favourites for a specific listing — an honest read on competition before you make an offer.

#### Track holiday-let investment markets

Combining sale listings with rental listings in the same area gives you gross yield by neighbourhood, which is where investment decisions are actually made.

### Tips for faster, cheaper runs

- Raise the page-size field (`count`, `limit`, `per_page` — whichever the mode exposes) before raising **Max items**. Fewer, bigger calls cost less.
- Use the cheap reference and autocomplete modes to resolve IDs before spending on the expensive detail modes.
- Schedule incremental runs with a low **Max items** rather than one huge sweep; you get fresher data and a smaller bill.
- Chain Actors with webhooks to push new rows straight into your warehouse.

### Requirements

This Actor calls the ScrapeBadger API on your behalf, so it needs your key:

1. Get one at [scrapebadger.com](https://scrapebadger.com) — there is a free tier.
2. In **Settings → Environment variables**, add `SCRAPEBADGER_API_KEY` with your `sb_live_…` key and tick **Secret**.

Credits are consumed on your ScrapeBadger account in addition to the Apify event price.

### Frequently asked questions

#### Is it legal to scrape Idealista?

Scraping publicly available data from Idealista is generally legal, and this Actor only ever reads pages a logged-out visitor could see. What you then do with the data is what matters — read the disclaimer below before collecting anything that could be personal data.

#### Do I need my own proxies?

No. Proxy rotation, browser fingerprinting and anti-bot handling all happen upstream in the ScrapeBadger API, so there is nothing to configure here.

#### Do I need a ScrapeBadger account?

Yes. The Actor calls the ScrapeBadger API on your behalf, so it needs your API key in the `SCRAPEBADGER_API_KEY` environment variable. There is a free tier at [scrapebadger.com](https://scrapebadger.com) — see Requirements below.

#### How many results can I get in one run?

Set **Max items** to whatever you need. The Actor keeps paging until it hits that number or Idealista runs out of results, and stops cleanly either way.

#### How much does one run cost?

Events start at $0.0010 and are charged once per API call, not per row — so a page of 100 results costs the same as a single lookup. Apify adds its standard $0.001 actor start fee per run.

#### What happens if the run fails halfway through?

Whatever was already scraped stays in the dataset. The run ends with a status message explaining where it stopped instead of throwing your results away.

#### Can I run this on a schedule or from my own code?

Yes. Use the **Schedules** tab for recurring runs, or the **API** tab to start runs and read the dataset from your own application.

#### Why does a plain city name not work as the location?

Idealista addresses areas by an internal location ID like `0-EU-ES-28-07-001-079`, not by name. Run the **Resolve Locations** mode first — it is a cheap call — and feed the ID it returns into search.

### Is scraping Idealista reliable?

Anti-bot interstitials are a fact of life on Idealista. A blocked call is retried four times with exponential backoff against fresh exits, and if a run dies partway it keeps everything already scraped rather than throwing the dataset away. Upstream availability is monitored continuously.

### Your feedback and support

Found a bug, missing a field, or need a mode that is not here? Open a ticket on the **Issues** tab, or email <support@scrapebadger.com>. The **API** tab has everything you need to run this Actor programmatically.

### Disclaimer

Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

# Actor input Schema

## `mode` (type: `string`):

Which Idealista call to run. Each mode uses a different subset of the fields below — the run tells you if a required one is missing.

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

`location` — see the ScrapeBadger API docs. <b>Required for:</b> Search Listings, Search All.

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

`operation` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings, Search All, Resolve Locations.

## `property_type` (type: `string`):

`property_type` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings, Search All, Resolve Locations.

## `market` (type: `string`):

`market` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings, Search All, Get Property Detail, Get Engagement Stats, Resolve Locations.

## `page` (type: `integer`):

`page` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings.

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

Stop after this many records. The actor keeps paging until it hits this number or the site runs out of results. Each page is one charged event.

## `sort_by` (type: `string`):

`sort_by` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings.

## `sort_order` (type: `string`):

`sort_order` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings.

## `min_price` (type: `string`):

`min_price` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings, Search All.

## `max_price` (type: `string`):

`max_price` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings, Search All.

## `min_size` (type: `string`):

`min_size` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings, Search All.

## `max_size` (type: `string`):

`max_size` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings, Search All.

## `min_rooms` (type: `string`):

`min_rooms` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings, Search All.

## `max_rooms` (type: `string`):

`max_rooms` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings, Search All.

## `locale` (type: `string`):

`locale` — see the ScrapeBadger API docs. <b>Used by:</b> Search Listings, Search All, Get Property Detail, Get Engagement Stats, Resolve Locations.

## `max_results` (type: `integer`):

`max_results` — see the ScrapeBadger API docs. <b>Used by:</b> Search All.

## `property_code` (type: `string`):

`property_code` — see the ScrapeBadger API docs. <b>Required for:</b> Get Property Detail, Get Engagement Stats.

## `query` (type: `string`):

`query` — see the ScrapeBadger API docs. <b>Required for:</b> Resolve Locations.

## Actor input object example

```json
{
  "mode": "Search Listings",
  "location": "0-EU-ES-28-07-001-079",
  "operation": "sale",
  "property_type": "homes",
  "market": "es",
  "page": 1,
  "max_items": 100,
  "sort_order": "desc",
  "max_results": 500,
  "property_code": "111671859",
  "query": "madrid"
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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": "0-EU-ES-28-07-001-079",
    "operation": "sale",
    "market": "es",
    "property_code": "111671859",
    "query": "madrid"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrape.badger/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": "0-EU-ES-28-07-001-079",
    "operation": "sale",
    "market": "es",
    "property_code": "111671859",
    "query": "madrid",
}

# Run the Actor and wait for it to finish
run = client.actor("scrape.badger/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": "0-EU-ES-28-07-001-079",
  "operation": "sale",
  "market": "es",
  "property_code": "111671859",
  "query": "madrid"
}' |
apify call scrape.badger/idealista-scraper --silent --output-dataset

```

## MCP server setup

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