# Idealista Scraper - Spain, Italy & Portugal Listings, Prices (`scrapersdelight/idealista-scraper`) Actor

Scrape idealista.com, .it and .pt listings for sale or rent: price, price drops, €/m², m², rooms, floor, lift, GPS, photos and agency. Optional listing-page details: baths, features, energy certificate, address, update date. Search by place, URL or postal code, past the 1,800 cap, monitor mode.

- **URL**: https://apify.com/scrapersdelight/idealista-scraper.md
- **Developed by:** [Scrapers Delight](https://apify.com/scrapersdelight) (community)
- **Categories:** Real estate, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 95.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Idealista Scraper do?

**Idealista Scraper** exports property listings from **idealista.com (Spain), idealista.it (Italy) and idealista.pt (Portugal)** - homes, rooms, new developments, offices, premises, garages, land, storage rooms and buildings, for sale or for rent. One row per listing, with the price, the price drop, €/m², size, rooms, floor, lift, parking, the map position, photos and the advertiser - ready for a spreadsheet, a valuation model or a CRM.

Also known as: idealista scraper, idealista API, idealista property data, idealista crawler.

- 🏠 **Every listing on the results page, fully read** - 30 listings per page with coordinates, photo count and media flags already on the row (no extra request per listing).
- 🌍 **Three countries in one actor** - Spain, Italy and Portugal, by place name, by any search URL you copy from idealista, by postal code or by listing id.
- 🎯 **All of the site's own filters** - price, size, bedrooms, bathrooms, home type, condition, floor, publication date, amenities, energy band, occupation, rental type, furnished, and every sort order.
- ♾️ **Past the 1,800-listing window** - idealista shows at most 60 pages per search; bigger searches are split into price bands and each band is read to its end.
- ➕ **Listing-page details on demand** - bathrooms, every feature line, energy certificate, street / neighbourhood / district, last update date, reference, advertiser name and the full photo list.
- 🔁 **Monitor mode** - only listings that are new or changed price since your last run, marked `new`, `priceDrop` or `priceRise`.
- 🔐 **No login, no cookies, no API key.**

### What data can you get from idealista?

<table>
<tr><td>🆔 <code>propertyCode</code>, 🔗 <code>url</code></td><td>💶 <code>price</code>, <code>priceUnit</code> (total / month)</td><td>📉 <code>originalPrice</code>, <code>priceDropPercent</code>, <code>priceDropValue</code></td></tr>
<tr><td>📐 <code>priceByArea</code> (€/m²), <code>size</code> (m²)</td><td>🛏️ <code>rooms</code>, 🛁 <code>bathrooms</code>*</td><td>🏢 <code>floor</code>, <code>exterior</code>, <code>hasLift</code></td></tr>
<tr><td>🚗 <code>parkingSpace</code> (included / optional)</td><td>📍 <code>latitude</code>, <code>longitude</code>, <code>showAddress</code></td><td>🗺️ <code>address</code>, <code>street</code>*, <code>neighborhood</code>*, <code>district</code>*, <code>municipality</code>*, <code>province</code>*</td></tr>
<tr><td>🏷️ <code>detailedType</code> (Piso, Ático, Bilocale, T2…)</td><td>📝 <code>description</code>, <code>highlightPhrase</code>, <code>tags</code></td><td>🖼️ <code>thumbnail</code>, <code>images</code> (with room tags), <code>numPhotos</code></td></tr>
<tr><td>🎥 <code>hasVideo</code>, <code>has3DTour</code>, <code>has360</code>, <code>hasPlan</code>, <code>hasStaging</code></td><td>🏢 <code>contactInfo</code>: professional / private, agency name, agency page, logo</td><td>⚡ <code>energyCertificate</code>*: rating, consumption, emissions</td></tr>
<tr><td>🧾 <code>features</code>*, <code>condition</code>*, <code>yearBuilt</code>*, <code>heating</code>*, <code>orientation</code>*</td><td>📅 <code>updatedAt</code>*, <code>reference</code>*, <code>communityFees</code>*</td><td>🔢 <code>searchTotal</code> (the site's own count), <code>listedAgo</code></td></tr>
</table>

\* from the listing page - turn on **Listing-page details** (or give listing URLs / ids).

### How to scrape idealista with Idealista Scraper

1. [Create a free Apify account](https://console.apify.com/sign-up) - it comes with monthly free credit.
2. Open **Idealista Scraper** and pick the **country** (Spain, Italy, Portugal).
3. Type one or more **locations** (e.g. `Madrid`, `Milano`, `Lisboa`), or paste a **search URL** copied from idealista with your filters already set.
4. Choose **sale or rent**, the property type and any filters; set **Max listings**.
5. Click **Start**, then download the results as JSON, CSV, Excel or HTML, or read them through the API.

### Input

| Parameter | Type | Description |
|---|---|---|
| `country` | select | `es` idealista.com, `it` idealista.it, `pt` idealista.pt. Default `es`. |
| `locations` | list | Place names as typed on idealista; the site's own location search picks the best match (the run log shows it and the alternatives). A URL slug like `madrid-madrid` is used as is. |
| `operation` | select | `sale` or `rent`. Default `sale`. |
| `propertyType` | select | `homes`, `newDevelopments`, `rooms` (rent), `holidayRentals` (rent; ES, PT), `offices`, `premises`, `garages`, `lands`, `storageRooms`, `buildings`, `transfers`. |
| `startUrls` | URL list | idealista search URLs (filters and sort are kept) or listing URLs (`/inmueble/<id>/`, `/immobile/<id>/`, `/imovel/<id>/`). |
| `postalCodes` | list | Postal codes of the chosen country, e.g. `28045`. |
| `propertyCodes` | list | Listing ids of the chosen country. |
| `minPrice`, `maxPrice` | integer | Euros (monthly for rentals). |
| `minSize`, `maxSize` | integer | m². |
| `bedrooms` | multi-select | `0` (studio), `1`, `2`, `3`, `4+`; Italy counts rooms (*locali*) `1`-`4`, `5+`. |
| `bathrooms` | multi-select | `1`, `2`, `3+`. |
| `homeTypes` | multi-select | flat, apartment, penthouse, duplex, attic, loft, detached / semi-detached / terraced house, country house, villa, single-storey house, farmhouse, manor house (per country). |
| `condition`, `floorTypes` | multi-select | new / good / to renovate; top / middle / ground floor. |
| `features` | multi-select | A/C, wardrobes, lift, balcony, terrace, exterior, parking, garden, pool, storage room, accessible, luxury, sea views, floor plan, virtual tour, bank-owned, pets allowed, court auction. |
| `energyEfficiency`, `occupation` | multi-select | high / medium / low; vacant / with tenants / bare ownership / illegally occupied. |
| `rentalTypes`, `furnished` | select | long-term / seasonal; furnished / kitchen only (rent). |
| `publicationDate` | select | last 48 hours / week / month. |
| `sortBy` | select | relevance, cheapest, most expensive, newest, oldest, biggest price drop, €/m² (ES), biggest, smallest, floor, private/agencies first (IT). |
| `sellerType` | select | all / private only / professionals only. |
| `onlyPriceDrops`, `minPriceDropPercent` | boolean / integer | Keep only reduced listings. |
| `includeDetails` | boolean | Read each listing's own page (paid add-on). Default off. |
| `monitorMode`, `monitorKey` | boolean / text | Deliver only new or re-priced listings since the last run. |
| `maxItems` | integer | Total cap. Default 100. |
| `maxItemsPerSearch` | integer | Cap per location / URL / postal code. 0 = off. |
| `splitLargeSearches` | boolean | Go past the site's 1,800 per search with price bands. Default on. |
| `descriptionMaxLength`, `compact` | integer / boolean | Trim descriptions; core fields only. |
| `proxyConfiguration`, `useUnblockerFallback`, `maxConcurrency` | advanced | Residential exits by default; your own proxy URLs are accepted. |

#### Input JSON

```json
{
  "country": "es",
  "locations": ["Madrid", "Getafe"],
  "operation": "sale",
  "maxPrice": 450000,
  "bedrooms": ["2", "3"],
  "features": ["lift"],
  "publicationDate": "lastWeek",
  "maxItems": 300
}
```

#### Paste a search URL when you already built one on idealista

Set the filters on idealista.com/.it/.pt, copy the address bar and paste it into **Search or listing URLs**. Every filter and the sort in the URL are kept exactly; the form filters apply to locations, not to pasted URLs.

#### A filter that does not exist in a country stops the run

Each country has its own filter menu (Italy has court auctions, Spain has "exterior" and "illegally occupied"). A filter the chosen site does not have stops the run before anything is read or charged, with the list of what to remove. During the run every filter is also checked against the page's own URL: if the site did not apply one, that search delivers nothing instead of unfiltered listings.

#### Use "Published within" for daily feeds

idealista refuses "newest first" result pages on residential exits, so that sort is read through Apify's Unblocker (about a minute per page). For a daily feed of new listings, `publicationDate: "last48h"` with a daily schedule (and Monitor mode) is faster and cheaper.

### Output

One item per listing. A real row from a Barcelona search (2026-10-14, trimmed):

```json
{
  "propertyCode": "110536145",
  "url": "https://www.idealista.com/inmueble/110536145/",
  "operation": "sale",
  "detailedType": "Piso",
  "address": "Calle de les Tres Torres, Les Tres Torres, Barcelona",
  "price": 2100000,
  "originalPrice": 2300000,
  "priceDropPercent": 9,
  "priceByArea": 6306,
  "size": 333,
  "rooms": 6,
  "floor": "3",
  "exterior": true,
  "hasLift": true,
  "parkingSpace": { "hasParkingSpace": true, "isParkingSpaceIncludedInPrice": true },
  "latitude": 41.3936951,
  "longitude": 2.1321176,
  "showAddress": false,
  "numPhotos": 39,
  "contactInfo": { "userType": "professional", "commercialName": "Dils Lucas Fox", "micrositeUrl": "https://www.idealista.com/pro/lucas-fox/" },
  "searchTotal": 13082
}
```

With **Listing-page details** the same row also carries (a real Madrid listing):

```json
{
  "bathrooms": 2,
  "constructedArea": 114,
  "condition": "Segunda mano/buen estado",
  "street": "Calle de Fernán González",
  "neighborhood": "Goya",
  "district": "Barrio de Salamanca",
  "municipality": "Madrid",
  "energyCertificate": { "rating": "B", "consumption": "16,3 kWh/m² año", "emissions": "16,3 kg CO2/m² año" },
  "features": ["114 m² construidos", "3 habitaciones", "2 baños", "Balcón", "Segunda mano/buen estado"],
  "updatedAt": "2026-10-09",
  "reference": "AG 224661",
  "virtualTourUrl": "https://my.matterport.com/show/?m=TYeirYnnKTi&play=1&lang=es"
}
```

#### Fields and how often they are filled

Measured on 400 list rows (Madrid and Barcelona for sale, 2026-10-14) and on listing pages from all three countries.

| Field | Fill | Notes |
|---|---|---|
| `propertyCode`, `url`, `price`, `size`, `rooms`, `priceByArea` | 100% | `rooms` = bedrooms (ES), *locali* (IT), T-number (PT) |
| `latitude`, `longitude`, `showAddress` | 100% | `showAddress: false` = the site shows an approximate area |
| `thumbnail`, `images`, `numPhotos`, media flags | 100% | first 3 photos on list rows, every photo with details |
| `floor` / `hasLift` / `exterior` | 92% / 95% / 95% | `exterior` is shown in Spain only |
| `originalPrice`, `priceDropPercent` | 21% | only listings with a reduced price |
| `parkingSpace` | 30% | listings that mention parking on the card |
| `contactInfo.commercialName` | 100% (big-city sale pages) | private sellers carry no name |
| `bathrooms`, `features`, `updatedAt`, `reference` | 100% of listing pages | details add-on |
| `street` / `neighborhood` / `district` | 71% / 71% / 64% of listing pages | hidden when the advertiser hides the address |
| `yearBuilt`, `communityFees`, `orientation` | 36% of listing pages | only when the advertiser states it |

### Use cases

- 📈 **Valuation and comparables** - €/m², size, floor and coordinates for every active listing in a city.
- 🏦 **Investment screening** - rank neighbourhoods by price per m² and shortlist listings that already cut their price.
- 🔔 **New-listing alerts** - Monitor mode on a daily schedule delivers only new and re-priced listings.
- 🏢 **Agency market share** - count listings per agency (`contactInfo.commercialName`, `micrositeUrl`) per area.
- 🗺️ **Map dashboards** - every row carries latitude/longitude, ready for a GIS layer.
- 🧑‍💼 **Proptech products** - feed a search or comparables widget with live inventory in three countries.

### How much does it cost to scrape idealista?

Pay per result: **$0.0003 per listing** (`listing` event), plus **$0.00108 per listing delivered with listing-page details** (`listing-details` add-on, only when you turn it on or look up listing ids/URLs). No start fee, no monthly rent.

| Listings | Listings only | With listing-page details |
|---|---|---|
| 100 | $0.03 | $0.138 |
| 1,000 | $0.30 | $1.38 |
| 10,000 | $3.00 | $13.80 |

Listings skipped by your filters, by Monitor mode or as duplicates are not delivered and not charged. Set a maximum cost per run in the run options to cap any run.

### Integrations, API, scheduling & MCP

- **Schedules** - run the same search daily or weekly from the Console; with Monitor mode each run delivers only what changed.
- **Integrations** - send results to Google Sheets, Slack, Make, Zapier, n8n or any webhook when a run finishes.
- **API** - start runs and read datasets from code with [the Apify API](https://docs.apify.com/api/v2) or the `apify-client` for [Python](https://docs.apify.com/api/client/python) and [JavaScript](https://docs.apify.com/api/client/js).
- **MCP** - use Idealista Scraper as a tool in Claude, Cursor or any MCP client through the Apify MCP server.

### More property scrapers

- 🇪🇸 [Kyero Property Scraper](https://apify.com/scrapersdelight/kyero-property-scraper) - Spanish homes listed for international buyers, with estate-agent contacts.
- 🇬🇧 [Rightmove Scraper](https://apify.com/scrapersdelight/rightmove-scraper) - UK homes for sale and rent.
- 🇺🇸 [Realtor.com Listings Scraper](https://apify.com/topapi/realtor-listings-scraper) - US homes for sale, rent and sold.
- More actors: [apify.com/scrapersdelight](https://apify.com/scrapersdelight).

### Limits & empty runs

- **1,800 listings per search** on idealista itself (60 pages of 30). With "Go past 1,800" on, larger searches are split into price bands; listings with no published price ("a consultar") cannot fall into a price band and are only read within the first 1,800.
- **Phone numbers are not delivered**: on the web, idealista shows them only behind a "see phone" button that answers with a CAPTCHA.
- **Speed**: 30 listings per page; a 100-listing run took 15 s and a 300-listing run 18 s in testing (listing-page details add about a second each, 4 in parallel). A page idealista's bot check refuses on two fresh exits is read through Apify's Unblocker (60-80 s a page).
- **Empty run**: when idealista lists nothing for the search, the run says so ("its own count is 0") and charges nothing. A location that matches nothing is listed in the run summary with the site's suggestions.
- **Run summary**: the `RUN_SUMMARY` record lists every search with the site's own count, pages read, delivered, duplicates, filtered and price bands.

### FAQ

#### How much does Idealista Scraper cost?

$0.0003 per listing and $0.00108 more per listing delivered with listing-page details. A 100-listing run is $0.03; there is no start fee.

#### How many listings can Idealista Scraper return?

As many as idealista lists for your searches. One search shows up to 1,800 on the site; Idealista Scraper splits bigger searches into price bands to go past that.

#### Can I scrape idealista.it and idealista.pt with Idealista Scraper?

Yes - pick Italy or Portugal in **Country**, or paste a .it / .pt URL. The same row comes back from all three sites; a few fields (`exterior`) and filters exist only in some countries (shown in the form).

#### Can I monitor new idealista listings with Idealista Scraper?

Yes. Turn on Monitor mode and schedule the run daily: each run delivers only listings that are new or changed price since the last run, with `changeType` and `previousPrice`.

#### Does Idealista Scraper need an idealista account, cookies or an API key?

No. It reads the public pages any visitor sees. Nothing to log in to.

#### Why does Idealista Scraper return fewer listings than I asked for?

The search has fewer listings than your cap (see `searchTotal`), your refine filters or Monitor mode skipped some, or the maximum cost per run was reached. The run summary shows which.

#### Why are some rows without bathrooms or a street?

Bathrooms, street, district and the other listing-page fields come from each listing's own page - turn on **Listing-page details**. Advertisers can hide the exact address; then `showAddress` is false and the street is empty.

#### Can I use Idealista Scraper through the Apify API or MCP?

Yes - every run can be started and read through the Apify API, the Python / JavaScript clients, integrations, and the Apify MCP server.

#### Is it legal to scrape idealista?

Listings are public, but personal data is protected by GDPR in the European Union. Do not scrape personal data unless you have a legitimate reason to; if unsure, consult a lawyer.

#### Your feedback

Found a bug or need a field? Open an issue on the actor's **Issues** tab - we read every one.

# Actor input Schema

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

Which idealista site to search: Spain (idealista.com), Italy (idealista.it) or Portugal (idealista.pt). Search URLs you paste below pick their own site.

## `locations` (type: `array`):

Place names as you would type them on idealista, e.g. "Madrid", "Getafe", "Milano", "Lisboa". The site's own location search picks the best match (logged). A URL slug such as "madrid-madrid" is used as is.

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

Buy (sale) or rent.

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

The site's own property menu. Rooms and holiday rentals exist for rent only (holiday rentals: Spain and Portugal).

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

Paste any idealista.com/.it/.pt search URL (all its filters and sort are kept) or listing URL (e.g. https://www.idealista.com/inmueble/111955729/). Listing URLs return the full listing page.

## `postalCodes` (type: `array`):

Postal codes of the chosen country, e.g. "28045". Read as the site's postal-code search shows them (the form filters below apply to locations).

## `propertyCodes` (type: `array`):

Listing ids of the chosen country (the number in /inmueble/<id>/). Each returns the full listing page and is charged as a listing with details.

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

Lowest price in euros (monthly rent for rentals).

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

Highest price in euros (monthly rent for rentals).

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

Smallest built area in square metres.

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

Largest built area in square metres.

## `bedrooms` (type: `array`):

Any of these. Spain/Portugal: 0 = studio. Italy counts rooms (locali): 1 = monolocale ... 5+ = 5 or more.

## `bathrooms` (type: `array`):

Any of these.

## `homeTypes` (type: `array`):

Any of these (homes only). Not every type exists in every country; an unknown one stops the run before anything is charged.

## `condition` (type: `array`):

Any of these.

## `floorTypes` (type: `array`):

Any of these.

## `features` (type: `array`):

All of these. Exterior and bank-owned are Spain/Portugal; auction is Italy; pets allowed is rent only.

## `energyEfficiency` (type: `array`):

Any of these energy-certificate bands.

## `occupation` (type: `array`):

Any of these (sale). Bare ownership: ES, IT. Illegally occupied: ES.

## `rentalTypes` (type: `array`):

Rent only: long-term or seasonal.

## `furnished` (type: `string`):

Rent only.

## `publicationDate` (type: `string`):

Only listings published in this window. Pairs well with a daily or weekly schedule.

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

The site's own sort orders. "Newest first" pages are refused by idealista's bot check on residential exits and are read through the Unblocker (slower).

## `sellerType` (type: `string`):

Keep only private sellers or only professionals (agencies, developers, banks).

## `onlyPriceDrops` (type: `boolean`):

Keep only listings showing a reduced price (original price + drop %).

## `minPriceDropPercent` (type: `integer`):

Keep only listings whose price dropped at least this much, e.g. 5.

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

Also read each listing's own page: bathrooms, every feature, energy certificate, street / neighbourhood / district, last update date, reference, advertiser name and the full photo list. One page per listing, charged as the listing-details add-on.

## `monitorMode` (type: `boolean`):

Deliver only listings that are new or changed price since the previous run with the same inputs (marked changeType new / priceDrop / priceRise; with listing details on, a listing delivered earlier without them comes back once as details). Pairs with a daily schedule.

## `monitorKey` (type: `string`):

Optional name for this monitor's memory, so two schedules with the same inputs stay apart. Empty = derived from the inputs.

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

Stop after this many listings in total. idealista shows at most 1,800 listings per search (60 pages); bigger searches are split into price bands when "Go past 1,800" is on.

## `maxItemsPerSearch` (type: `integer`):

Cap for each location / URL / postal code. 0 = only the total cap applies.

## `splitLargeSearches` (type: `boolean`):

When a search lists more than the 1,800 the site shows, split it into price bands and read each one to its end.

## `descriptionMaxLength` (type: `integer`):

Cut descriptions to this many characters. 0 = keep the full text.

## `compact` (type: `boolean`):

Core fields only (id, url, price, drop, m², rooms, baths, floor, coordinates, agency, thumbnail) - lighter for AI/MCP pipelines.

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

idealista serves residential exits only: each page goes out on a fresh residential exit in the searched site's own country (Spain, Italy or Portugal, whatever country is set here). You may give your own proxy URLs instead.

## `useUnblockerFallback` (type: `boolean`):

When two fresh exits are refused, read the page through Apify's Unblocker (slower, 60-80 s a page). Capped per run.

## `maxConcurrency` (type: `integer`):

Pages read at the same time.

## Actor input object example

```json
{
  "country": "es",
  "locations": [
    "Madrid"
  ],
  "operation": "rent",
  "propertyType": "homes",
  "furnished": "",
  "publicationDate": "",
  "sortBy": "relevance",
  "sellerType": "all",
  "onlyPriceDrops": false,
  "includeDetails": false,
  "monitorMode": false,
  "maxItems": 30,
  "maxItemsPerSearch": 0,
  "splitLargeSearches": true,
  "descriptionMaxLength": 0,
  "compact": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  },
  "useUnblockerFallback": true,
  "maxConcurrency": 4
}
```

# Actor output Schema

## `listings` (type: `string`):

The dataset of idealista listings (one item per listing).

## `summary` (type: `string`):

Per-search counts (the site's own total, pages read, delivered, duplicates, filtered, price bands, window cap), lookups not found or unreachable, details delivered and charged, transport and spend per route.

# 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 = {
    "country": "es",
    "locations": [
        "Madrid"
    ],
    "operation": "rent",
    "maxItems": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapersdelight/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 = {
    "country": "es",
    "locations": ["Madrid"],
    "operation": "rent",
    "maxItems": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapersdelight/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 '{
  "country": "es",
  "locations": [
    "Madrid"
  ],
  "operation": "rent",
  "maxItems": 30
}' |
apify call scrapersdelight/idealista-scraper --silent --output-dataset

```

## MCP server setup

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