# Idealista API Scraper (`rl1987/idealista-api-scraper`) Actor

Scrape Idealista real-estate listings (ES/IT/PT/FR) directly from the Idealista mobile API — price, size, rooms, location, coordinates, property type, URL and the seller/agency CONTACT (commercial name + phone number).

- **URL**: https://apify.com/rl1987/idealista-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

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/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

## Idealista Property Scraper – Homes for Sale & Rent 🏠

Scrape **real-estate listings from Idealista** — the leading property portal in **Spain, Italy and
Portugal** — as clean, structured data. For any city, area or neighbourhood this **Idealista
scraper** returns every listing with its **price, size, rooms, address, geolocation, photos and
listing URL**, plus price-drop history and advertiser info. It talks directly to Idealista's private
mobile API (reversed from the Idealista Android app) and **authenticates itself**, so there's **no
Idealista account, no login, and no API key** — just enter a location and run.

Perfect for building property-market datasets, price-analytics tools, real-estate lead lists,
investment research and comparables — get **Idealista listing data** in seconds instead of
maintaining a fragile browser scraper.

### What you can scrape

- 🏠 **Property listings** — every home for sale or rent in an area: price, €/m², size, rooms,
  bathrooms, floor, lift, address, district, municipality, province, latitude/longitude.
- 📉 **Price history** — former price and price-drop percentage where a listing has been reduced.
- 🖼️ **Photos & media** — thumbnail plus the full photo gallery URLs and photo count.
- 🏢 **Advertiser** — agency / private-seller name and contact phone where published.
- 📝 **Full detail (optional)** — the complete description, features and extended data per listing.
- 🗺️ **Location codes (FREE)** — look up Idealista's hierarchical location codes for any place name
  (Provincia → Municipio → Distrito → Barrio), each with its listing count, so you can target a
  search precisely via `locationIds`. This mode is **free** — no per-row charge.

### Key features

| Feature | Details |
|--------|---------|
| **Data source** | Idealista mobile API — the same feed the Idealista app uses |
| **Markets** | 🇪🇸 Spain, 🇮🇹 Italy, 🇵🇹 Portugal |
| **Auth** | **None** — self-authenticating, no account, no cookies, no API key |
| **Search by** | Place name (auto-resolved), coordinates + radius, or raw location IDs |
| **Filters** | Sale/rent, property type, price, size, bedrooms, free text |
| **Export** | JSON, CSV, Excel, HTML, or via the Apify API |

### Popular use cases

- **Real-estate market analytics** — build datasets of asking prices, €/m² and inventory by area over time.
- **Investment & comparables research** — pull all listings in a district to value a property against the market.
- **Lead generation** — collect for-sale-by-agency and private listings with contact details.
- **Price-drop monitoring** — track reductions across an area to spot motivated sellers.
- **Property-portal & aggregator feeds** — power a search widget or a "new listings" alert.

### Input

Set `mode` to `search` (default, scrapes listings) or `locations` (free — look up location codes).

**Location codes (free)** — get the code tree/list for a place name, then reuse the `location_id`
values in a search:

```json
{ "mode": "locations", "country": "es", "location": "Madrid" }
```

**Search** by a plain place name (resolved via Idealista's own location search):

```json
{
  "country": "es",
  "operation": "sale",
  "location": "Madrid",
  "propertyType": "homes",
  "priceMax": 500000,
  "maxItems": 100,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

| Field | Notes |
|-------|-------|
| `country` | Market: `es` (Spain), `it` (Italy), `pt` (Portugal) |
| `operation` | `sale` or `rent` |
| `location` | A place name — city, area or neighbourhood (e.g. `Madrid`, `Malasaña`) |
| `locationIds` | Advanced: Idealista `locationId`s to search directly |
| `center` | Radius search around a coordinate, e.g. `40.4168,-3.7038` |
| `propertyType` | `homes`, `flats`, `houses`, `premises`, `offices`, `garages`, `lands`, … |
| `priceMin` / `priceMax` / `sizeMin` / `sizeMax` / `bedrooms` | Optional filters |
| `includeDetails` | Fetch each listing's full detail page (billed separately) |
| `maxItems` | Cap rows (`0` = all pages) |
| `proxyConfiguration` | Apify Proxy (default) — recommended |

### Output

One clean row per listing — export as JSON, CSV or Excel:

```json
{
  "id": "106542145",
  "url": "https://www.idealista.com/inmueble/106542145/",
  "operation": "sale",
  "property_type": "flat",
  "price": 1850000,
  "currency": "€",
  "price_by_area": 14800,
  "former_price": 1950000,
  "price_drop_pct": 5,
  "size_m2": 125,
  "rooms": 2,
  "bathrooms": 2,
  "floor": "5",
  "has_lift": true,
  "address": "Calle de Velázquez",
  "neighborhood": "Recoletos",
  "district": "Barrio de Salamanca",
  "municipality": "Madrid",
  "province": "Madrid",
  "latitude": 40.4256,
  "longitude": -3.6844,
  "num_photos": 30,
  "photos": ["https://img.idealista.com/…"],
  "advertiser": "Example Real Estate",
  "phone": "+34..."
}
```

### Why this Idealista scraper

- **No account, no cookies, no API key** — it authenticates itself against the mobile API.
- **Search the way a human does** — type a place name and it resolves the location for you.
- **Rich, structured rows** — price, €/m², price drops, geo, photos and advertiser, ready for analysis.
- **All three markets** — Spain, Italy and Portugal from one actor.

### Pricing

Pay-per-event, so you only pay for the data you pull:

- **$0.001 per listing**
- $0.001 per listing when full **detail** enrichment is enabled (`includeDetails`)
- **Location codes (`mode: locations`) are free** — no per-row charge

### FAQ

**Do I need an Idealista account or API key?**
No. The actor authenticates itself against Idealista's mobile API — there's nothing to sign up for.

**Which countries are covered?**
Spain, Italy and Portugal — set `country` to `es`, `it` or `pt`.

**Can I search by neighbourhood, not just city?**
Yes — any place name Idealista recognises is resolved automatically, or search around a coordinate
with `center`.

**Can I export to CSV or Excel?**
Yes — JSON, CSV, Excel, HTML, or straight from the Apify API and dataset.

### Disclaimer

This is an unofficial tool and is **not affiliated with, endorsed by, or sponsored by Idealista**.
It returns read-only public listing data (no accounts, no messaging). All trademarks belong to their
respective owners; use the scraped data responsibly and in line with applicable terms and laws.

# Actor input Schema

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

'Search listings' scrapes properties (billed). 'Location codes (free)' looks up Idealista location codes for a place name — a free tree/list you can feed back into 'Location IDs'.

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

Idealista market to search.

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

Buy or rent.

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

A city, area or neighbourhood name (resolved via Idealista's own location search), e.g. "Madrid", "Barcelona", "Malasaña".

## `locationIds` (type: `array`):

Idealista locationId(s) to search directly (alternative to a place name).

## `center` (type: `string`):

Search around a coordinate, e.g. "40.4168,-3.7038".

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

Type of property.

## `priceMin` (type: `integer`):

Minimum price.

## `priceMax` (type: `integer`):

Maximum price.

## `sizeMin` (type: `integer`):

Minimum floor area in m².

## `sizeMax` (type: `integer`):

Maximum floor area in m².

## `bedrooms` (type: `integer`):

Minimum number of bedrooms.

## `freeText` (type: `string`):

Free-text keyword filter.

## `includeDetails` (type: `boolean`):

Fetch each listing's detail endpoint (one extra request each) for the full description, features and price history. Billed separately.

## `detailConcurrency` (type: `integer`):

How many listing-detail requests to run in parallel when 'Include full detail' is on (1–16). Higher is faster but heavier on the target and proxy.

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

Cap the number of listings returned (0 = all pages).

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

Route requests through a proxy (recommended). Defaults to Apify Proxy.

## Actor input object example

```json
{
  "mode": "search",
  "country": "es",
  "operation": "sale",
  "location": "Madrid",
  "locationIds": [],
  "propertyType": "homes",
  "includeDetails": false,
  "detailConcurrency": 8,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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": "Madrid",
    "center": "",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/idealista-api-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": "Madrid",
    "center": "",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/idealista-api-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": "Madrid",
  "center": "",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call rl1987/idealista-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/idealista-api-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/2FYdtW28XSNFduRct/builds/palOi33gLBviBTFzX/openapi.json
