# 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
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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/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

## 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(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 '{
  "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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,studio-amba/pisos-com-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/pKpu4OfWXmSvElnRZ/builds/qUEjROQ6jo8udacyu/openapi.json
