# Pisos.com Scraper (`unfenced-group/pisos-scraper`) Actor

Real estate listings scraper for pisos

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

## Pricing

from $1.20 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

![pisos-scraper](https://api.apify.com/v2/key-value-stores/lJlifu6C8YQfZMPKE/records/pisos-scraper)

Scrape real estate listings from [Pisos.com](https://www.pisos.com) — Spain's second-largest dedicated real estate portal. Filter by transaction, location, property type, and sort order. No API key required.

---

### Why this scraper?

#### ⚡ Fast & cost-efficient extraction

No browser required — JSON-LD + structured data-attribute extraction for reliable, selector-stable data retrieval.

#### 🏠 Market coverage

300,000+ Spanish property listings on the dedicated real estate portal.

#### 💰 Structured price & property data

Price in EUR, area, bedrooms, bathrooms, floor, energy certificate and agent phone per listing.

#### 🔍 Flexible filters

Filter by location slug, property type, sort order and price range.

#### 📍 Location & coverage details

Covers Madrid, Barcelona, Seville and all 52 Spanish provinces.

#### 🔗 Direct URL support

`startUrls` support: pass any Pisos.com search URL directly.

---

### Input parameters

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| `transaction` | string | Transaction: `sale`, `rent` | `sale` |
| `propertyType` | string | Type: `apartment`, `house`, `land`, `garage`, `office`, `attic`, `duplex`, `studio` | `apartment` |
| `location` | string | City or province slug, e.g. `madrid`, `barcelona`, `sevilla`, `valencia` | `madrid` |
| `sortBy` | string | Sort: `relevance`, `newest`, `cheapest`, `mostexp`, `mostrooms`, `largest` | `relevance` |
| `maxItems` | integer | Maximum number of listings to scrape | `100` |
| `startUrls` | array | Direct pisos.com search URLs | — |

---

### Output schema

```json
{
  "id":               "64230283973.528715",
  "url":              "https://www.pisos.com/comprar/piso-universidad_malasana28004-64230283973_528715/",

  "transaction":      "sale",
  "title":            "Piso en calle de Jesús del Valle, 25",
  "description":      "Se vende este piso exterior, recién reformado...",

  "priceText":        "828.000 €",
  "priceAmount":      828000,
  "priceCurrency":    "EUR",

  "phone":            "919374312",

  "areaM2":           107,
  "rooms":            3,
  "bathrooms":        1,
  "floor":            2,

  "images":           ["https://fotos.imghs.net/mm-wp/..."],

  "isNewDevelopment": false,
  "isProfessional":   true,

  "provinceCode":     "P28",
  "municipalityCode": "M28079",
  "agencySlug":       "hernan_inmobiliaria",

  "city":             "Madrid Capital",
  "region":           "Madrid",
  "postalCode":       null,
  "country":          "ES",
  "latitude":         40.424862,
  "longitude":        -3.703745,

  "source":           "pisos.com",
  "scrapedAt":        "2026-05-06T11:00:00.000Z",
  "contentHash":      "07f0a4ebbca8d114"
}
````

#### Field fill rates (battery-25, Madrid sale listings)

| Field | Fill rate | Notes |
|-------|-----------|-------|
| `id`, `url`, `transaction` | 100% | Always present |
| `title`, `description` | 100% | Full title + snippet |
| `priceText`, `priceAmount`, `priceCurrency` | 100% | Exact integer from `data-ad-price` |
| `phone` | 100% | Agent phone from `data-number` |
| `areaM2`, `rooms`, `bathrooms` | 100% | From structured `.ad-preview__char` |
| `floor` | ~68% | Ground-floor & studios omit floor number |
| `images` | 100% | Carousel photos (logos excluded) |
| `isNewDevelopment`, `isProfessional` | 100% | Boolean flags from data attributes |
| `provinceCode`, `municipalityCode` | 100% | e.g. `P28`, `M28079` |
| `agencySlug` | 100% | Agency identifier from URL |
| `city`, `region`, `country` | 100% | From JSON-LD |
| `latitude`, `longitude` | 100% | From JSON-LD GeoCoordinates |
| `postalCode` | 0% | Not exposed on list pages |
| `descriptionMarkdown` | string | Full description converted to Markdown. |

***

### Examples

**Properties for sale in Madrid:**

```json
{ "transaction": "sale", "location": "madrid", "maxItems": 100 }
```

**Newest rentals in Barcelona:**

```json
{ "transaction": "rent", "location": "barcelona", "sortBy": "newest", "maxItems": 200 }
```

**Cheapest houses in Seville:**

```json
{ "transaction": "sale", "propertyType": "house", "location": "sevilla", "sortBy": "cheapest", "maxItems": 500 }
```

**Direct URL:**

```json
{ "startUrls": [{ "url": "https://www.pisos.com/alquiler/pisos-valencia/" }], "maxItems": 150 }
```

***

**Daily feed of new listings (run on a schedule):**

```json
{
  "daysOld": 1,
  "maxItems": 500
}
```

Schedule this input to run once a day in the Apify Scheduler — each run returns only listings added in the last 24 hours, ideal as a daily new-listings alert.

### 💰 Pricing

**$1.50 per 1,000 results** — you only pay for successfully retrieved listings.
Failed retries are never charged.

| Results | Cost |
|---------|------|
| 100 | ~$0.15 |
| 1,000 | ~$1.50 |
| 10,000 | ~$15.00 |
| 100,000 | ~$150.00 |

> Flat-rate real estate data providers typically charge $99–$299/month regardless of usage.
> At 10,000 results/month, this scraper costs significantly less with no subscription.

Use the **Max results** cap in the input to control your spend exactly.

***

### Performance

| Run size | Estimated time |
|----------|----------------|
| 100 listings | ~2–4 min |
| 500 listings | ~10–15 min |
| 1,000 listings | ~20–30 min |

***

### Known limitations

- **postalCode:** Not exposed on listing pages — always `null`.
- **floor:** Ground-floor and studio listings typically omit floor number.
- **agencySlug:** Agency slug only (full name not on list pages).
- **Energy cert:** Not available on list pages.

***

### Technical details

- **Source:** Pisos.com — Spain's second-largest dedicated real estate portal
- **Memory:** 256 MB
- **Retry:** Automatic retry on transient errors with exponential backoff
- **Deduplication:** Cross-run content hash prevents duplicate listings in repeated runs
- **Output fields:** 28 fields

***

### Additional services

Need a custom actor, additional filters, scheduled runs, or integration support?.nl]\(mailto:info@unfencedgroup.nl) — we build on request.

***

***

### Need a custom scraper?

**[Unfenced Group](https://www.unfencedgroup.nl)** builds Apify actors for any website — for free.

If the site you need isn't in our portfolio yet, just ask. We scope, build, and publish it at no cost to you. You only pay for results — we absorb the compute and proxy costs ourselves. Same pay-per-result pricing, same quality, same standards as every actor in this portfolio.

**Get in touch:** [www.unfencedgroup.nl](https://www.unfencedgroup.nl)

# Actor input Schema

## `transaction` (type: `string`):

Transaction

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

Property type

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

Spanish city or province slug as in pisos.com URLs, e.g. 'madrid', 'barcelona', 'sevilla', 'valencia'.

## `sortBy` (type: `string`):

Sort by

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

Minimum listing price (local currency). Leave empty for no minimum.

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

Maximum listing price (local currency). Leave empty for no maximum.

## `daysOld` (type: `integer`):

Only return listings published within the last N days. Leave empty for no recency filter.

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

If true, opens each listing detail page to extract additional fields (description, floor plan, agent contact). Increases run time and cost.

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

Max items

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

Start URLs

## Actor input object example

```json
{
  "transaction": "sale",
  "propertyType": "apartment",
  "location": "madrid",
  "sortBy": "relevance",
  "fetchDetails": false,
  "maxItems": 100
}
```

# Actor output Schema

## `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 = {
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("unfenced-group/pisos-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 = { "maxItems": 100 }

# Run the Actor and wait for it to finish
run = client.actor("unfenced-group/pisos-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 '{
  "maxItems": 100
}' |
apify call unfenced-group/pisos-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Pisos.com Scraper",
        "description": "Real estate listings scraper for pisos",
        "version": "0.0",
        "x-build-id": "pDOxJkn57kj7godp6"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/unfenced-group~pisos-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-unfenced-group-pisos-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/unfenced-group~pisos-scraper/runs": {
            "post": {
                "operationId": "runs-sync-unfenced-group-pisos-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/unfenced-group~pisos-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-unfenced-group-pisos-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": {
                    "transaction": {
                        "title": "Transaction",
                        "enum": [
                            "sale",
                            "rent"
                        ],
                        "type": "string",
                        "description": "Transaction",
                        "default": "sale"
                    },
                    "propertyType": {
                        "title": "Property type",
                        "enum": [
                            "apartment",
                            "house",
                            "land",
                            "garage",
                            "office",
                            "attic",
                            "duplex",
                            "studio"
                        ],
                        "type": "string",
                        "description": "Property type",
                        "default": "apartment"
                    },
                    "location": {
                        "title": "Location slug",
                        "type": "string",
                        "description": "Spanish city or province slug as in pisos.com URLs, e.g. 'madrid', 'barcelona', 'sevilla', 'valencia'.",
                        "default": "madrid"
                    },
                    "sortBy": {
                        "title": "Sort by",
                        "enum": [
                            "relevance",
                            "newest",
                            "cheapest",
                            "mostexp",
                            "mostrooms",
                            "largest"
                        ],
                        "type": "string",
                        "description": "Sort by",
                        "default": "relevance"
                    },
                    "minPrice": {
                        "title": "Min price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum listing price (local currency). Leave empty for no minimum."
                    },
                    "maxPrice": {
                        "title": "Max price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum listing price (local currency). Leave empty for no maximum."
                    },
                    "daysOld": {
                        "title": "Max listing age (days)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return listings published within the last N days. Leave empty for no recency filter."
                    },
                    "fetchDetails": {
                        "title": "Fetch listing details",
                        "type": "boolean",
                        "description": "If true, opens each listing detail page to extract additional fields (description, floor plan, agent contact). Increases run time and cost.",
                        "default": false
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Max items",
                        "default": 100
                    },
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Start URLs",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
