# Donpiso Scraper – Spain Real Estate Listings (`sn41lz/donpiso-scraper`) Actor

Scrape property listings from Donpiso, the Spanish real estate agency network: price, price cuts, €/m², area, rooms, bathrooms, floor, address, district, coordinates, energy rating, features, community fees, description, photos and office for any Spanish city.

- **URL**: https://apify.com/sn41lz/donpiso-scraper.md
- **Developed by:** [Sergi Espí Zamora](https://apify.com/sn41lz) (community)
- **Categories:** Real estate, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 properties

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

## Donpiso Scraper – Spain Real Estate Listings

Get property listings from **[Donpiso](https://www.donpiso.com)**, the Spanish real estate agency network with offices across Catalonia, Madrid, Valencia and more, as clean data: **price, price cuts, €/m², area, bedrooms, bathrooms, floor, address, neighbourhood, district, city, province, GPS coordinates, energy rating (consumption and emissions), condition, age, lift, terrace, parking, A/C, heating, orientation, community fees, full description, all photos and the Donpiso office** handling each property.

Type a city (**Barcelona, Madrid, Sabadell, L'Hospitalet de Llobregat, Valencia, Badalona…**), pick buy or rent and a property type, and click Start.

### Why this scraper?

- **The whole Donpiso network:** flats, penthouses, ground-floor flats, houses, shops, offices, garages and land, for sale or rent.
- **Price cuts included:** `previousPrice` shows the old price when the office has lowered it.
- **Rich details:** energy rating with kWh/m² and CO₂, condition, age, orientation, A/C, heating, terrace, balcony, parking, storage room, community fees and every feature and room the office listed.
- **Geocoded:** latitude/longitude for every listing, plus neighbourhood, district, city and province.
- **Every page, no duplicates:** all results of a search, so you never pay twice for the same property.

### Who is it for?

- **Investors** comparing €/m² and price cuts across Barcelona, Madrid and other Spanish markets.
- **Agents and analysts** tracking new supply and the stock of a large agency network.
- **Proptech and data teams** building valuation models, maps and lead lists of agency offices.

### What data do you get?

| Field | Example |
|---|---|
| `title`, `propertyType`, `dealType` | Piso en venta en Madrid / Barrio de la Concepción… · Piso · sale |
| `price`, `previousPrice`, `pricePerM2` | 314900, 324900, 5248 |
| `areaM2`, `rooms`, `bathrooms`, `toilets`, `floor` | 86, 3, 2, 1, 1 |
| `address`, `neighbourhood`, `district`, `city`, `province` | …, San Pascual, Ciudad Lineal, Madrid, Madrid |
| `latitude`, `longitude` | 40.4370233, -3.6506721 |
| `energyRating`, `energyConsumptionKwhM2`, `emissionsRating`, `emissionsKgCo2M2`, `energyCertificate` | E, 100, E, 20 (or "Certificado en trámite" when the rating is pending) |
| `condition`, `ageYears`, `orientation` | Reformado, 5, Este |
| `elevator`, `terrace`, `balcony`, `parking`, `storageRoom` | true, true, true, true, true |
| `airConditioning`, `heating`, `communityFeesMonthly` | Aire acondicionado frío/calor, Calefacción eléctrica, 62 |
| `labels` | Urge Vender, Oportunidad |
| `features`, `layout` | every feature and room listed by the office |
| `description` | full text (phone numbers masked) |
| `image`, `images` | photo URLs |
| `officeName`, `officeAddress` | Oficina donpiso Madrid central · Calle Castelló, 55, 28001 Madrid (MADRID) |
| `url` | link to the listing |

### How to use it

1. Add one or more **Locations**: a city, "Provincia de Barcelona" for a whole province, "Eixample, Barcelona" for a district, or "España" (or nothing) for all of Spain.
2. Pick **Buy or rent**, a **Property type** and optionally price, bedrooms and size filters.
3. Set **Max results** to control cost, and click **Start**.
4. Download as Excel, CSV or JSON, or send the data to Google Sheets.

You can also paste any Donpiso result page in **Result page URLs**.

**Tip:** turn off **Include full details** for a faster run with just the result-card fields (price, price cut, area, rooms, floor, district, photos).

### How much does it cost?

**$2 per 1,000 properties** ($0.002 each), with or without full details. Properties dropped by the bedrooms or flats/houses filters are not charged. Use **Max results** to set a hard cap.

### Notes

- Locations are matched to the places Donpiso has listings in; the log shows which place each one matched.
- Exact street addresses are not published by Donpiso; `address` is the headline and area the office shows, and coordinates may be approximate.
- Phone numbers and e-mails in descriptions are replaced with `[phone]` / `[email]`, and the network's standard pitch to sellers is removed; staff names and contacts are not collected.
- The Actor reads public pages at a gentle pace and respects the site's robots.txt.

***

### En español

Extrae los inmuebles de **Donpiso** de toda España: pisos, áticos, plantas bajas, casas, locales, oficinas, garajes y solares en venta o alquiler, con precio, bajadas de precio, €/m², superficie, habitaciones, baños, planta, barrio, distrito, coordenadas, certificado energético, estado, antigüedad, ascensor, terraza, parking, gastos de comunidad, descripción, fotos y oficina. Escribe la ciudad (Barcelona, Madrid, Sabadell…), «Provincia de …» o «Eixample, Barcelona». 2 $ por cada 1.000 inmuebles.

# Actor input Schema

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

Spanish cities or towns, e.g. 'Barcelona', 'Madrid', 'Sabadell', 'Valencia', 'L'Hospitalet de Llobregat'. Write 'Provincia de Barcelona' for a whole province, 'Eixample, Barcelona' for a district, or 'España' for the whole country. Leave empty to search all of Spain.

## `wholeProvince` (type: `boolean`):

Search the province around each city instead of just the city.

## `dealType` (type: `string`):

For sale (venta) or for rent (alquiler).

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

What kind of property to search for. 'Flats' and 'Houses' split the homes by the type the office gave each listing.

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

Only properties at or above this price (monthly rent for rentals).

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

Only properties at or below this price (monthly rent for rentals).

## `minBedrooms` (type: `integer`):

Only homes with at least this many bedrooms (habitaciones).

## `minAreaM2` (type: `integer`):

Only properties of at least this size.

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

Open each listing for bathrooms, coordinates, province, energy rating, condition, age, all features (terrace, parking, A/C, heating, orientation…), community fees, full description, all photos and the office. Turn off for a faster run with just the result-card fields.

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

Or paste Donpiso result pages, e.g. https://www.donpiso.com/venta-casas-y-pisos/barcelona-barcelona/listado?pvph=300000

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

Stop after this many properties in total. 0 = no limit.

## Actor input object example

```json
{
  "locations": [
    "Barcelona"
  ],
  "wholeProvince": false,
  "dealType": "buy",
  "propertyType": "homes",
  "includeDetails": true,
  "maxItems": 20
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `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 = {
    "locations": [
        "Barcelona"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("sn41lz/donpiso-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 = {
    "locations": ["Barcelona"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("sn41lz/donpiso-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 '{
  "locations": [
    "Barcelona"
  ],
  "maxItems": 20
}' |
apify call sn41lz/donpiso-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sn41lz/donpiso-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/iGSmS2evUIEEAaoa0/builds/8BcRdcRm0UoqHChGK/openapi.json
