# Idealista Portugal Scraper (`farolumina/idealista-portugal-scraper`) Actor

Scrape Portugal real estate listings from idealista.pt: price, price per m², typology, area, floor, agency and more. Fails loudly instead of returning an empty dataset.

- **URL**: https://apify.com/farolumina/idealista-portugal-scraper.md
- **Developed by:** [João Caldeira](https://apify.com/farolumina) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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?

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

Get property listings from **idealista.pt** search results as clean, typed data: price, price per m², typology, area, floor, lift, agency, description and more. For sale and for rent, any location, any filters.

### What you can count on

- **Loud failures.** If a run can't get your data, it ends as *Failed* and says why. It never finishes green with an empty dataset.
- **No silent gaps.** idealista only serves the first 60 pages (1,800 listings) of a search. If your search is bigger, the run tells you how many listings you got and how to split the search to get the rest.
- **Stable output.** Field names don't change between versions. New fields may be added; existing ones are never renamed or removed.

### How to use it

1. Go to [idealista.pt](https://www.idealista.pt) and set up your search: location, sale or rent, price range, typology, sort order.
2. Copy the URL from your browser.
3. Paste it into **Search URLs**. You can add several.
4. Set **Max listings** and run.

Works with any idealista.pt search results page, for example:

- `https://www.idealista.pt/comprar-casas/lisboa/`
- `https://www.idealista.pt/arrendar-casas/porto/`
- `https://www.idealista.pt/comprar-casas/lisboa/com-preco-max_400000,t2/?ordem=atualizado-desc`
- `https://www.idealista.pt/comprar-terrenos/setubal-distrito/`

#### Searches with more than 1,800 listings

idealista won't show more than 60 pages for a single search. If your search is bigger, the run will finish with a note saying how many listings you got out of the total. Split the search into narrower ones, for example by price range (`com-preco-max_300000`, then `com-preco-min_300000,preco-max_500000`), and add each as a separate URL. Listings that appear in more than one search are only returned once.

### Output

One record per listing:

```json
{
  "id": "35043634",
  "url": "https://www.idealista.pt/imovel/35043634/",
  "title": "Apartamento T2 na Rua de Campo de Ourique s/n, Amoreiras, Campo de Ourique",
  "propertyType": "Apartamento",
  "address": "Rua de Campo de Ourique s/n, Amoreiras, Campo de Ourique",
  "operation": "sale",
  "category": "casas",
  "price": 469000,
  "priceUnit": "total",
  "currency": "EUR",
  "pricePerM2": 7817,
  "typology": "T2",
  "rooms": 2,
  "areaM2": 60,
  "floor": "1º andar sem elevador",
  "hasLift": false,
  "otherDetails": [],
  "publishedAgo": null,
  "highlight": "T2 com Terraço a Estrear em Campo de Ourique",
  "description": "Se procura um apartamento com carácter, conforto e uma localização privilegiada…",
  "tags": ["Renovado"],
  "isNewDevelopment": false,
  "ribbon": null,
  "isProfessional": true,
  "agency": "Century 21 Le Quartier",
  "imageCount": 30,
  "imageUrl": "https://img4.idealista.pt/blur/591_420_mq/0/id.pro.pt.image.master/f1/d9/d2/320089049.jpg",
  "media": ["HOME_STAGING", "MAP", "PLAN", "VIDEO", "VIRTUAL_TOUR_360", "VIRTUAL_TOUR_3D"],
  "country": "PT",
  "searchUrl": "https://www.idealista.pt/comprar-casas/lisboa/",
  "page": 1,
  "scrapedAt": "2026-09-14T21:40:00+00:00"
}
```

| Field | Notes |
|---|---|
| `price` | Number in EUR. For rentals it's the monthly rent and `priceUnit` is `"month"`. |
| `pricePerM2` | As shown by idealista. Usually present for sales, not for rentals. |
| `typology`, `rooms` | `"T2"` and `2`. |
| `areaM2` | Gross area as shown on the results page. |
| `floor`, `hasLift` | Raw floor text, plus `true`/`false` when idealista says whether there's a lift. |
| `publishedAgo` | Freshness marker idealista shows on recent listings, e.g. `"1 hora"`. |
| `isProfessional`, `agency` | Whether it's an agency listing, and the agency name when shown. |

A run summary is saved to the key-value store under `OUTPUT`: listing count, duplicates skipped, listings per search, and any problems or notes.

### Proxies

idealista blocks most datacenter IPs. Use Apify **residential** proxies with country **Portugal** (the default).

### Data and privacy

This Actor collects what idealista shows publicly on search results pages. It does not collect phone numbers or the names of private sellers. If you process the data, you're responsible for complying with GDPR and idealista's terms.

### Coming next

Spain and Italy, and optional detail pages (full description, coordinates, energy certificate). Open an issue if you need one of these, and it moves up the list.

# Actor input Schema

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

idealista.pt search result URLs. Set up your filters (location, price, typology, sort) on idealista.pt and paste the URL here.

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

Stop after this many listings across all search URLs.

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

Residential proxies in Portugal are recommended; idealista blocks most datacenter IPs.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.idealista.pt/comprar-casas/lisboa/"
    }
  ],
  "maxItems": 300,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "PT"
  }
}
```

# Actor output Schema

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

One record per property listing.

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

Listing count, duplicates skipped, listings per search, and any problems or notes (e.g. a search cut short by idealista's 60-page limit).

# 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 = {
    "startUrls": [
        {
            "url": "https://www.idealista.pt/comprar-casas/lisboa/"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "PT"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("farolumina/idealista-portugal-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 = {
    "startUrls": [{ "url": "https://www.idealista.pt/comprar-casas/lisboa/" }],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "PT",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("farolumina/idealista-portugal-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 '{
  "startUrls": [
    {
      "url": "https://www.idealista.pt/comprar-casas/lisboa/"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "PT"
  }
}' |
apify call farolumina/idealista-portugal-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,farolumina/idealista-portugal-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/dw00Pcx3SjOYMqP1g/builds/JoZcgpdbRgykc6kTo/openapi.json
