# 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:** 1 total users, 1 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 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 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 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

Download the OpenAPI definition: https://api.apify.com/v2/acts/WxiejkTFega18VYng/builds/T7nV4R4xD2HLRZgR5/openapi.json
