# 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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

Download the OpenAPI definition: https://api.apify.com/v2/acts/NGkpErFWz531TRIBC/builds/pDOxJkn57kj7godp6/openapi.json
