# Idealista Agency Scraper (`maximedupre/idealista-agency-scraper`) Actor

Find real estate agencies from Idealista listing result pages. Export agency names, profile URLs, logos, source listings, result ranks, and scrape timestamps.

- **URL**: https://apify.com/maximedupre/idealista-agency-scraper.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Real estate
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 scraped agencies

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/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 agency scraper for real estate leads

Idealista Agency Scraper collects real estate agencies from public [Idealista](https://www.idealista.com/) listing result pages and saves them as clean dataset rows. Paste one or more Idealista sale or rental result URLs, then export agency names, Idealista profile URLs, short names, logos, source listing links, result ranks, page numbers, and scrape timestamps.

Use this Idealista agency scraper when you want to find agencies active in a city or search area without opening every property listing by hand. It is useful for real estate lead research, brokerage mapping, local market checks, CRM enrichment, partner discovery, and repeatable exports from Idealista search pages.

For a quick first run, keep the prefilled Madrid sale results URL and set **Agency limit** to `25`. Once the row shape fits your workflow, add more Idealista result pages, raise the limits, schedule the Actor, or call it through the Apify API.

### ✅ What this Actor does

- Scrapes public Idealista listing result pages.
- Accepts Idealista sale and rental result URLs such as `/venta-viviendas/madrid-madrid/`.
- Finds agency links shown on property listing cards.
- Deduplicates agencies across all submitted pages in the same run.
- Saves one dataset row per accepted agency.
- Includes the listing that first exposed the agency, so you can trace where it came from.
- Works with Apify dataset exports, API access, schedules, webhooks, and integrations.
- Charges only for saved agency rows.

The Actor focuses on agencies visible on listing result pages. It does not submit contact forms, log in, scrape private dashboards, enrich agencies from third-party databases, or guarantee phone numbers. Phone reveal on Idealista can be protected by extra anti-bot checks, so phone numbers are not part of the current output contract.

### 📦 What data you get

Each dataset item is one unique agency discovered from the submitted Idealista result pages. Fields can be empty when Idealista does not show that value on the listing card.

| Field | Description |
| --- | --- |
| `agencyId` | Stable agency key from the Idealista profile URL. |
| `agencyName` | Agency name shown on Idealista. |
| `profileUrl` | Idealista agency profile URL. |
| `shortName` | Idealista agency short name from the `/pro/` URL. |
| `logoUrl` | Agency logo URL when shown on the listing card. |
| `phoneNumber` | Always `null` in the current version. |
| `sourceListingId` | Idealista property listing ID that exposed the agency. |
| `sourceListingUrl` | Property listing URL where the agency was found. |
| `sourceListingTitle` | Listing title shown in the result card. |
| `sourceUrl` | Result page URL that produced the agency. |
| `pageNumber` | Result page number where the agency was found. |
| `searchRank` | Listing-card rank within the crawled result pages for that input. |
| `scrapedAt` | UTC timestamp when the row was saved. |

### 🎯 Common use cases

- Build a list of agencies active in a Spanish city or neighborhood.
- Find agencies attached to luxury, rental, sale, or filtered Idealista searches.
- Map which agencies appear in a local Idealista result set.
- Add Idealista agency profile URLs to a CRM or spreadsheet.
- Track agency visibility in selected searches with scheduled runs.
- Prepare real estate outreach lists with traceable source listings.
- Export agency data as JSON, CSV, Excel, XML, RSS, or HTML.

### ▶️ How to run it

1. Open the Actor in Apify Console.
2. Paste one or more Idealista listing result URLs into **Result page URLs**.
3. Set **Agency limit** to cap the number of unique agencies saved.
4. Set **Pages per URL** if you want to crawl beyond the first result page.
5. Start the run and open the dataset.

You can export the finished dataset from Apify, consume it through the API, schedule repeat checks, or send results to another tool with webhooks and integrations.

### ⚙️ Input

```json
{
	"startUrls": [
		{
			"url": "https://www.idealista.com/venta-viviendas/madrid-madrid/"
		}
	],
	"maxResults": 25,
	"maxPagesPerStartUrl": 1
}
````

#### Result page URLs

Paste Idealista listing result pages, one per row. Good examples include city, area, sale, rental, or filtered result pages from Idealista.

Supported:

- `https://www.idealista.com/venta-viviendas/madrid-madrid/`
- `https://www.idealista.com/alquiler-viviendas/barcelona-barcelona/`

Not supported:

- Agency profile URLs such as `/pro/...`
- Property detail URLs such as `/inmueble/...`
- Idealista homepages or non-result pages

#### Agency limit

Use **Agency limit** to control how many unique agencies are saved across the whole run. For a fast first run, use `25`. For a broader market scan, raise the limit and add more result pages.

#### Pages per URL

Use **Pages per URL** to crawl more paginated result pages from each submitted URL. Some searches show the same large agencies across many pages, so increasing pages may not always increase unique agency count.

### 📊 Output example

```json
{
	"agencyId": "walterhauschamberi",
	"agencyName": "Walter Haus Madrid",
	"profileUrl": "https://www.idealista.com/pro/walterhauschamberi/",
	"shortName": "walterhauschamberi",
	"logoUrl": "https://st3.idealista.com/ff/20/20/walterhauschamberi.gif",
	"phoneNumber": null,
	"sourceListingId": "111410181",
	"sourceListingUrl": "https://www.idealista.com/inmueble/111410181/",
	"sourceListingTitle": "Piso en Avenida de Menéndez Pelayo, Ibiza, Madrid",
	"sourceUrl": "https://www.idealista.com/venta-viviendas/madrid-madrid/",
	"pageNumber": 1,
	"searchRank": 39,
	"scrapedAt": "2026-06-04T18:21:43.658Z"
}
```

### 💳 Pricing

This Actor uses pay-per-event pricing. You are charged only for each agency saved to the dataset.

The pricing event is **Scraped agency**. Runs that find no agencies do not create agency charge events.

### ⚠️ Limits and caveats

- Only Idealista listing result pages are supported.
- Agency profile URLs and property detail URLs are skipped.
- The Actor returns agencies visible from listing cards, not every agency in Idealista.
- `phoneNumber` is currently `null`; phone reveal is not part of the public contract.
- Some pages may have many duplicate agencies, so the number of unique agencies can be lower than the number of property listings checked.
- Source availability can vary by page, country, and Idealista's public website behavior.

### ❓ FAQ

#### Can I scrape Idealista agencies by city?

Yes. Open Idealista, build the city or area search you want, copy the result page URL, and paste it into **Result page URLs**.

#### Does this scrape property listings too?

No. The Actor uses property result cards to discover agencies, but the saved dataset rows are agency rows. The output includes the source listing URL and title for traceability.

#### Does it return phone numbers?

No. The current output keeps `phoneNumber` as `null`. Idealista phone reveal can require additional protected requests, so this Actor does not claim phone extraction.

#### Can I run it on a schedule?

Yes. You can schedule the Actor on Apify, export datasets, call it through the Apify API, or connect it to webhooks and integrations.

### 📝 Changelog

- 0.0: Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~idealista-agency-scraper/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Other actors

- [Realtor Scraper ↗](https://apify.com/maximedupre/realtor-scraper) - Scrape Realtor.com listings with property, price, agent, office, and location data.
- [Yellow Pages Scraper ↗](https://apify.com/maximedupre/yellowpages-scraper) - Build local business lead lists with names, phones, websites, addresses, and ratings.
- [Google Maps Shared List Scraper ↗](https://apify.com/maximedupre/google-maps-shared-list-scraper) - Export public Google Maps shared lists with places, contacts, ratings, reviews, and hours.
- [Business Address Scraper ↗](https://apify.com/maximedupre/business-address-scraper) - Find public business addresses from company websites and source-page evidence.
- [LinkedIn Company Scraper ↗](https://apify.com/maximedupre/linkedin-company-scraper) - Extract public LinkedIn company profile facts for lead lists and CRM updates.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

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

Paste Idealista sale or rental result pages, for example `https://www.idealista.com/venta-viviendas/madrid-madrid/`. Agency profile URLs and property detail URLs are skipped.

## `maxResults` (type: `integer`):

Maximum unique agencies to save across all submitted result pages. Keep this small for a quick first run.

## `maxPagesPerStartUrl` (type: `integer`):

How many paginated Idealista result pages to crawl from each submitted URL.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.idealista.com/venta-viviendas/madrid-madrid/"
    }
  ],
  "maxResults": 10,
  "maxPagesPerStartUrl": 1
}
```

# Actor output Schema

## `results` (type: `string`):

Open the dataset of Idealista agency rows with profile URLs, logos, source listings, ranks, and timestamps.

# 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.com/venta-viviendas/madrid-madrid/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/idealista-agency-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.com/venta-viviendas/madrid-madrid/" }] }

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/idealista-agency-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 '{
  "startUrls": [
    {
      "url": "https://www.idealista.com/venta-viviendas/madrid-madrid/"
    }
  ]
}' |
apify call maximedupre/idealista-agency-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Idealista Agency Scraper",
        "description": "Find real estate agencies from Idealista listing result pages. Export agency names, profile URLs, logos, source listings, result ranks, and scrape timestamps.",
        "version": "0.0",
        "x-build-id": "XVThU958zz6GIoPA0"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maximedupre~idealista-agency-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maximedupre-idealista-agency-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/maximedupre~idealista-agency-scraper/runs": {
            "post": {
                "operationId": "runs-sync-maximedupre-idealista-agency-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/maximedupre~idealista-agency-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-maximedupre-idealista-agency-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",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Result page URLs",
                        "minItems": 1,
                        "type": "array",
                        "description": "Paste Idealista sale or rental result pages, for example `https://www.idealista.com/venta-viviendas/madrid-madrid/`. Agency profile URLs and property detail URLs are skipped.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxResults": {
                        "title": "Agency limit",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum unique agencies to save across all submitted result pages. Keep this small for a quick first run.",
                        "default": 10
                    },
                    "maxPagesPerStartUrl": {
                        "title": "Pages per URL",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "How many paginated Idealista result pages to crawl from each submitted URL.",
                        "default": 1
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
