# Pisos.com Scraper - Spanish Real Estate Listings (`studio-amba/pisos-com-scraper`) Actor

Scrape property listings from Pisos.com, one of Spain's largest real estate portals. Get sale and rental prices, surface, rooms, bathrooms, geo coordinates, photos and agency contacts for any Spanish city or province. No login or cookies required.

- **URL**: https://apify.com/studio-amba/pisos-com-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 result scrapeds

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

## Pisos.com Scraper - Spanish Real Estate Listings

Scrape property listings from [Pisos.com](https://www.pisos.com), one of Spain's largest real estate portals. Get sale and rental prices, surface, rooms, bathrooms, geo coordinates, photos and agency contacts for any Spanish province, city or district. No login, no cookies, no browser needed.

### What data does the Pisos.com scraper extract?

Every listing includes:

| Field | Description |
|-------|-------------|
| `title` | Listing title, usually property type and street |
| `price` | Asking price (sale) or monthly rent (rental) in EUR |
| `operation` / `listingType` | `venta`/`sale` or `alquiler`/`rent` |
| `propertyType` | pisos, casas, aticos, duplexs, estudios, lofts, fincas_rusticas |
| `location` | Full location line, e.g. "Gaztambide (Distrito Chamberí. Madrid Capital)" |
| `district`, `city`, `province` | Parsed location parts |
| `latitude`, `longitude` | Geo coordinates of the listing |
| `rooms`, `bathrooms`, `surface` | Bedrooms, bathrooms, built surface in m² |
| `floor` | Floor descriptor when present, e.g. "4ª planta", "Bajo" |
| `photos`, `photoCount` | Up to 5 photo URLs plus the total photo count |
| `url`, `scrapedAt` | Direct listing link and scrape timestamp |

With **Fetch Full Details** enabled, each listing also gets:

| Field | Description |
|-------|-------------|
| `description` | Full listing description text |
| `agencyName`, `agencyUrl`, `agencyAddress` | Advertiser details |
| `phone` | Displayed contact number (usually a tracked virtual number that routes to the advertiser) |
| `sellerType` | `profesional` (agency) or `particular` (private seller) |
| `publishedDate`, `updatedDate` | First publication and last update dates |
| `features` | Feature list: ascensor, balcón, terraza, garaje, piscina, orientación, ... |

### How to scrape Pisos.com data

1. Choose the **operation**: `venta` (for sale) or `alquiler` (for rent).
2. Pick a **property type**: apartments (pisos), houses (casas), penthouses (áticos), duplexes, studios, lofts or rural properties.
3. Set the **location**: a province (`madrid`), a city (`madrid_capital`, `barcelona`), or a smaller town (`alcala_de_henares`). Plain names with spaces and accents work too — "Alcalá de Henares" is converted automatically.
4. Optionally set **minPrice** / **maxPrice** in EUR.
5. Set **maxResults** and run. The default input already returns apartments for sale in Madrid, so you can press Start without configuring anything.

Enable **fetchDetails** only when you need descriptions, agency contacts or publication dates. It visits every listing's detail page, which makes the run roughly 30 times slower per result.

### Example input

```json
{
    "operation": "venta",
    "propertyType": "pisos",
    "location": "barcelona",
    "minPrice": 100000,
    "maxPrice": 300000,
    "maxResults": 100,
    "proxyConfiguration": { "useApifyProxy": true }
}
````

### Example output

```json
{
    "id": "65098413759.100500",
    "title": "Piso en calle de la Princesa, 76",
    "price": 1600000,
    "currency": "EUR",
    "operation": "venta",
    "listingType": "sale",
    "propertyType": "pisos",
    "location": "Gaztambide (Distrito Chamberí. Madrid Capital)",
    "district": "Gaztambide",
    "city": "Madrid Capital",
    "province": "Madrid",
    "latitude": 40.4325,
    "longitude": -3.71735,
    "rooms": 3,
    "bathrooms": 3,
    "surface": 155,
    "floor": "4ª planta",
    "photos": [
        "https://fotos.imghs.net/mm-wp/1005/101/1005_2935432214101_1_202606051854533172743.jpg",
        "https://fotos.imghs.net/mm-wp/1005/101/1005_2935432214101_2_202606051854533172928.jpg"
    ],
    "photoCount": 34,
    "url": "https://www.pisos.com/comprar/piso-gaztambide-65098413759_100500/",
    "scrapedAt": "2026-07-11T18:55:47.715Z"
}
```

### Large runs and the 3,000-listing limit

Pisos.com caps every search at 100 result pages (3,000 listings). When you ask for more than 3,000 results, the scraper automatically splits the search into price bands and combines them, deduplicating by listing ID. Madrid province alone has over 14,000 apartments for sale — a full pull works out of the box.

Two things to know:

- Listings priced "A consultar" (price on request) have `price: null` and can be missed by price-band splitting, since the site cannot place them in a band.
- The site's own price filter has soft edges on rentals: a `hasta-1500` search can include a few listings at 1,600 EUR. That is how Pisos.com filters, not a scraper bug.

### Location slugs

Pisos.com uses lowercase slugs with underscores: `madrid` (whole province), `madrid_capital` (the city), `madrid_norte`, `barcelona`, `valencia`, `sevilla`, `alcala_de_henares`. The scraper slugifies free-text input for you. If a run fails with "No listings scraped", double-check the location: province and city names come from the Pisos.com URL, e.g. `https://www.pisos.com/venta/pisos-XXX/`.

### Why scrape Pisos.com?

- **Market research** — track asking prices per district, price per m², supply volume over time.
- **Lead generation** — with `fetchDetails`, find private sellers (`sellerType: "particular"`) and their contact numbers.
- **Investment analysis** — geo coordinates on every listing make it easy to map yield hotspots.
- **Portfolio monitoring** — agencies can track competitor listings and price changes with scheduled runs.

### Usage costs

The scraper charges per result. In listing mode it reads 30 listings per page request, so runs are fast and cheap. Detail mode adds one request per listing — use it only when you need description, agency, phone or publication dates.

### Is it legal to scrape Pisos.com?

The scraper only extracts publicly available listing data, the same information any visitor sees in a browser. It does not access anything behind a login. Personal data such as advertiser phone numbers may be subject to GDPR — make sure you have a legitimate purpose before storing or processing it.

### Related scrapers

Part of a European real estate collection:

- [Habitaclia Scraper](https://apify.com/studio-amba/habitaclia-scraper) — Spain (Catalonia)
- [Fotocasa Scraper](https://apify.com/studio-amba/fotocasa-scraper) — Spain
- [Idealista Scraper](https://apify.com/studio-amba/idealista-scraper) — Spain
- [Otodom Scraper](https://apify.com/studio-amba/otodom-scraper) — Poland
- [Zimmo Scraper](https://apify.com/studio-amba/zimmo-scraper) — Belgium

### Support

Found an issue or missing a field? Open an issue on the actor's page and it gets fixed quickly.

# Actor input Schema

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

Whether to scrape properties for sale (venta) or for rent (alquiler).

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

Type of property to search for.

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

Spanish province, city or district, e.g. 'madrid' (province), 'madrid\_capital' (city), 'barcelona', 'valencia', 'alcala\_de\_henares'. Names with spaces or accents are converted automatically ('Alcalá de Henares' works). Default: madrid.

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

Only listings priced at or above this amount (EUR). For rentals this is the monthly rent.

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

Only listings priced at or below this amount (EUR). For rentals this is the monthly rent.

## `fetchDetails` (type: `boolean`):

Visit each listing's detail page to add description, agency name and address, phone number, seller type (professional/private), publication date and feature list. One extra request per listing — slower and more expensive, only enable when you need those fields.

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

Maximum number of listings to scrape. One search query is capped at 3,000 by the site; above that the scraper automatically splits the search into price bands.

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

Proxy settings. The default Apify automatic proxy works fine — the site has no anti-bot protection.

## Actor input object example

```json
{
  "operation": "venta",
  "propertyType": "pisos",
  "location": "madrid",
  "fetchDetails": false,
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "operation": "venta",
    "propertyType": "pisos",
    "location": "madrid",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/pisos-com-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 = {
    "operation": "venta",
    "propertyType": "pisos",
    "location": "madrid",
    "maxResults": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/pisos-com-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 '{
  "operation": "venta",
  "propertyType": "pisos",
  "location": "madrid",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call studio-amba/pisos-com-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Pisos.com Scraper - Spanish Real Estate Listings",
        "description": "Scrape property listings from Pisos.com, one of Spain's largest real estate portals. Get sale and rental prices, surface, rooms, bathrooms, geo coordinates, photos and agency contacts for any Spanish city or province. No login or cookies required.",
        "version": "0.1",
        "x-build-id": "ZfN1QBdAwUDgxyFxB"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/studio-amba~pisos-com-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-studio-amba-pisos-com-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/studio-amba~pisos-com-scraper/runs": {
            "post": {
                "operationId": "runs-sync-studio-amba-pisos-com-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/studio-amba~pisos-com-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-studio-amba-pisos-com-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",
                "properties": {
                    "operation": {
                        "title": "Operation",
                        "enum": [
                            "venta",
                            "alquiler"
                        ],
                        "type": "string",
                        "description": "Whether to scrape properties for sale (venta) or for rent (alquiler).",
                        "default": "venta"
                    },
                    "propertyType": {
                        "title": "Property Type",
                        "enum": [
                            "pisos",
                            "casas",
                            "aticos",
                            "duplexs",
                            "estudios",
                            "lofts",
                            "fincas_rusticas"
                        ],
                        "type": "string",
                        "description": "Type of property to search for.",
                        "default": "pisos"
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Spanish province, city or district, e.g. 'madrid' (province), 'madrid_capital' (city), 'barcelona', 'valencia', 'alcala_de_henares'. Names with spaces or accents are converted automatically ('Alcalá de Henares' works). Default: madrid.",
                        "default": "madrid"
                    },
                    "minPrice": {
                        "title": "Minimum Price (EUR)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only listings priced at or above this amount (EUR). For rentals this is the monthly rent."
                    },
                    "maxPrice": {
                        "title": "Maximum Price (EUR)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only listings priced at or below this amount (EUR). For rentals this is the monthly rent."
                    },
                    "fetchDetails": {
                        "title": "Fetch Full Details",
                        "type": "boolean",
                        "description": "Visit each listing's detail page to add description, agency name and address, phone number, seller type (professional/private), publication date and feature list. One extra request per listing — slower and more expensive, only enable when you need those fields.",
                        "default": false
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of listings to scrape. One search query is capped at 3,000 by the site; above that the scraper automatically splits the search into price bands.",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. The default Apify automatic proxy works fine — the site has no anti-bot protection.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
