# Idealista MCP Scraper (`axlymxp/idealista-mcp-scraper`) Actor

MCP server + scraper for Idealista. Search properties, locations and agents live from Claude, ChatGPT, Cursor and other AI agents — or run it as a classic Idealista scraper (Spain, Italy, Portugal).

- **URL**: https://apify.com/axlymxp/idealista-mcp-scraper.md
- **Developed by:** [axly](https://apify.com/axlymxp) (community)
- **Categories:** AI, Agents, Lead generation
- **Stats:** 0 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 MCP Scraper

Query **Idealista** — Spain, Italy and Portugal's biggest real-estate marketplace — **live from your AI agent**. This Actor is a **Model Context Protocol (MCP) server**: connect Claude, ChatGPT, Cursor, n8n or any MCP client and search properties, resolve locations, pull full property details and find agents by phone in real time. It also runs as a **classic one-shot scraper** when you just want a dataset.

Built on Idealista's official Android mobile API with HMAC request signing — **no proxy required, no datacenter blocks**.

---

### Why use this Actor

- **MCP-native** — your AI agent calls Idealista directly, no glue code.
- **3 countries** — Spain (`es`), Italy (`it`), Portugal (`pt`).
- **Official mobile API** — reliable, fast, structured JSON (no fragile HTML parsing).
- **Powerful filters** — price, size, bedrooms, bathrooms, operation, property type, recency.
- **Agent lookup** — find every listing published by a phone number.
- **Dual mode** — live MCP server _or_ classic scraper to a dataset.

---

### MCP tools

| Tool                            | What it does                                                                    |
| ------------------------------- | ------------------------------------------------------------------------------- |
| `search_idealista_properties`   | Search listings by location name (auto-resolved) with full filters.             |
| `search_idealista_locations`    | Autocomplete locations → returns official `locationId` / `zoiId`.               |
| `get_idealista_property_detail` | Full detail for one property by `propertyCode` (description, photos, features). |
| `search_idealista_by_phone`     | Find all listings published by an agent's phone number.                         |

#### Example agent prompts

> "Find 20 flats for sale in Chamberí, Madrid under €600,000 with at least 2 bedrooms."

> "Resolve the location ID for 'primera línea de playa de Málaga'."

> "Get the full details for Idealista property 106534215."

> "List every property listed by agent phone 865440400."

---

### Connecting an MCP client

Start the Actor in **Standby mode**, then point your MCP client at the Streamable HTTP endpoint:

````

https://<your-actor-standby-url>/mcp

````

**Claude Desktop / Cursor** (`mcp.json`):

```json
{
    "mcpServers": {
        "idealista": {
            "url": "https://<your-actor-standby-url>/mcp",
            "headers": { "Authorization": "Bearer <YOUR_APIFY_TOKEN>" }
        }
    }
}
````

***

### Classic scraper mode

Prefer a plain dataset? Run the Actor normally with an input. Provide a `location` (or a `phone`) and the Actor paginates and pushes normalized rows to the dataset.

#### Example input

```json
{
    "country": "es",
    "location": "Madrid",
    "operation": "sale",
    "propertyType": "homes",
    "minPrice": 100000,
    "maxPrice": 500000,
    "minRooms": 2,
    "sortBy": "price",
    "limit": 60,
    "fetchFullDetails": false
}
```

#### Input parameters

| Field                   | Type    | Description                                                                                                     |
| ----------------------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| `country`               | string  | `es`, `it` or `pt`. Default `es`.                                                                               |
| `location`              | string  | City / area / neighborhood name (auto-resolved).                                                                |
| `phone`                 | string  | Optional — scrape all listings by an agent phone number.                                                        |
| `operation`             | string  | `sale` or `rent`.                                                                                               |
| `propertyType`          | string  | `homes`, `newDevelopments`, `offices`, `premises`, `garages`, `lands`, `storageRooms`, `buildings`, `bedrooms`. |
| `limit`                 | integer | Max properties to return. Default 60.                                                                           |
| `minPrice` / `maxPrice` | integer | Price range in euros.                                                                                           |
| `minSize` / `maxSize`   | integer | Size range in m².                                                                                               |
| `minRooms`              | integer | Minimum bedrooms.                                                                                               |
| `minBathrooms`          | integer | Minimum bathrooms.                                                                                              |
| `sortBy`                | string  | `weigh` (relevance), `price`, `publicationDate`, `size`.                                                        |
| `sinceDate`             | string  | `-1` (any), `T` (24h), `Y` (48h), `W` (week), `M` (month).                                                      |
| `fetchFullDetails`      | boolean | Also fetch full description, images and features per property.                                                  |

***

### Output fields

Each dataset row is a normalized property:

| Field                                   | Description                                  |
| --------------------------------------- | -------------------------------------------- |
| `propertyCode`                          | Idealista property ID.                       |
| `url`                                   | Listing URL.                                 |
| `price`                                 | Price in euros.                              |
| `size`                                  | Size in m².                                  |
| `rooms` / `bathrooms`                   | Bedroom / bathroom counts.                   |
| `address` / `municipality` / `province` | Location.                                    |
| `latitude` / `longitude`                | GPS coordinates.                             |
| `thumbnail`                             | Main image.                                  |
| `operation` / `propertyType`            | Listing classification.                      |
| `country`                               | Market (`es` / `it` / `pt`).                 |
| `description` / images / features       | Included when `fetchFullDetails` is enabled. |

***

### Pricing

This Actor uses **Pay Per Event**: a flat fee per MCP tool call (and per classic run that performs the same work). You only pay for what your agent actually queries.

***

### Use cases

- **Real-estate market research** — track prices and inventory by area.
- **Lead generation** — find listings and the agents behind them.
- **Price monitoring** — schedule runs and watch a neighborhood over time.
- **AI assistants** — give your agent live property search super-powers.

***

### Scheduling & integration

Run it on a schedule, trigger via the Apify API, or wire dataset webhooks into your CRM / data warehouse. In MCP mode, keep it in Standby and let your agents query on demand.

***

### FAQ

**Do I need a proxy?** No. The official mobile API works directly.

**Which countries are supported?** Spain, Italy and Portugal.

**Can I use it without an AI agent?** Yes — run it as a classic scraper with a `location` input.

**Is this affiliated with Idealista?** No. This is an independent tool that uses Idealista's public mobile API.

# Actor input Schema

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

Market to scrape: Spain (es), Italy (it) or Portugal (pt).

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

City, area or neighborhood to search, e.g. 'Madrid', 'Barcelona', 'Chamberí'. Resolved automatically via autocomplete. Required for classic location runs.

## `phone` (type: `string`):

Optional. Scrape all listings published by a specific agent using their phone number (instead of a location).

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

Listing type: sale (buy) or rent.

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

Main property category.

## `limit` (type: `integer`):

Maximum number of properties to retrieve in a classic run.

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

Minimum price in euros.

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

Maximum price in euros.

## `minSize` (type: `integer`):

Minimum size in square meters.

## `maxSize` (type: `integer`):

Maximum size in square meters.

## `minRooms` (type: `integer`):

Minimum number of bedrooms.

## `minBathrooms` (type: `integer`):

Minimum number of bathrooms.

## `sortBy` (type: `string`):

How to sort the results.

## `sinceDate` (type: `string`):

Filter by publication date.

## `fetchFullDetails` (type: `boolean`):

Also fetch the full description, all images and features for every property (slower, more API calls).

## Actor input object example

```json
{
  "country": "es",
  "location": "Madrid",
  "operation": "sale",
  "propertyType": "homes",
  "limit": 60,
  "sortBy": "weigh",
  "sinceDate": "-1",
  "fetchFullDetails": false
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("axlymxp/idealista-mcp-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("axlymxp/idealista-mcp-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 '{}' |
apify call axlymxp/idealista-mcp-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Idealista MCP Scraper",
        "description": "MCP server + scraper for Idealista. Search properties, locations and agents live from Claude, ChatGPT, Cursor and other AI agents — or run it as a classic Idealista scraper (Spain, Italy, Portugal).",
        "version": "1.0",
        "x-build-id": "iolVaEw6ZQZrDK6LI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/axlymxp~idealista-mcp-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-axlymxp-idealista-mcp-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/axlymxp~idealista-mcp-scraper/runs": {
            "post": {
                "operationId": "runs-sync-axlymxp-idealista-mcp-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/axlymxp~idealista-mcp-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-axlymxp-idealista-mcp-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",
                "properties": {
                    "country": {
                        "title": "Country",
                        "enum": [
                            "es",
                            "it",
                            "pt"
                        ],
                        "type": "string",
                        "description": "Market to scrape: Spain (es), Italy (it) or Portugal (pt).",
                        "default": "es"
                    },
                    "location": {
                        "title": "Location Name",
                        "type": "string",
                        "description": "City, area or neighborhood to search, e.g. 'Madrid', 'Barcelona', 'Chamberí'. Resolved automatically via autocomplete. Required for classic location runs."
                    },
                    "phone": {
                        "title": "Agent Phone Number",
                        "type": "string",
                        "description": "Optional. Scrape all listings published by a specific agent using their phone number (instead of a location)."
                    },
                    "operation": {
                        "title": "Operation",
                        "enum": [
                            "sale",
                            "rent"
                        ],
                        "type": "string",
                        "description": "Listing type: sale (buy) or rent.",
                        "default": "sale"
                    },
                    "propertyType": {
                        "title": "Property Type",
                        "enum": [
                            "homes",
                            "newDevelopments",
                            "offices",
                            "premises",
                            "garages",
                            "lands",
                            "storageRooms",
                            "buildings",
                            "bedrooms"
                        ],
                        "type": "string",
                        "description": "Main property category.",
                        "default": "homes"
                    },
                    "limit": {
                        "title": "Maximum Results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of properties to retrieve in a classic run.",
                        "default": 60
                    },
                    "minPrice": {
                        "title": "Minimum Price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum price in euros."
                    },
                    "maxPrice": {
                        "title": "Maximum Price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum price in euros."
                    },
                    "minSize": {
                        "title": "Minimum Size (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum size in square meters."
                    },
                    "maxSize": {
                        "title": "Maximum Size (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum size in square meters."
                    },
                    "minRooms": {
                        "title": "Minimum Bedrooms",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum number of bedrooms."
                    },
                    "minBathrooms": {
                        "title": "Minimum Bathrooms",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum number of bathrooms."
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "weigh",
                            "price",
                            "publicationDate",
                            "size"
                        ],
                        "type": "string",
                        "description": "How to sort the results.",
                        "default": "weigh"
                    },
                    "sinceDate": {
                        "title": "Published Since",
                        "enum": [
                            "-1",
                            "T",
                            "Y",
                            "W",
                            "M"
                        ],
                        "type": "string",
                        "description": "Filter by publication date.",
                        "default": "-1"
                    },
                    "fetchFullDetails": {
                        "title": "Fetch Full Details",
                        "type": "boolean",
                        "description": "Also fetch the full description, all images and features for every property (slower, more API calls).",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
