# Pisos Listings Extractor (`kawsar/pisos-listings-extractor`) Actor

Pisos Listings Extractor pulls property listings from pisos.com search pages, so you can track prices, build databases, and find leads without copying anything by hand.

- **URL**: https://apify.com/kawsar/pisos-listings-extractor.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Categories:** Real estate, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 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/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 Listings Extractor

Pisos Listings Extractor collects property listings from pisos.com, one of Spain's largest real estate portals, and turns them into structured data you can actually work with. Paste one or more pisos.com search URLs and the actor returns every listing on those pages: price, bedrooms, bathrooms, floor area, location, photos, advertiser type, and a direct link to each property. It handles both rentals and sales, follows pagination on its own, and stops at the limit you set.

No coding needed. Set your search, press Start, download the results.

### Why use it

Checking pisos.com by hand means opening listing after listing and copying details into a spreadsheet. This actor does that work in one run. A search that would take an afternoon to copy manually finishes in a couple of minutes, and the output is consistent: the same fields for every listing, ready for Excel, Google Sheets, or your own code.

Typical uses:

- **Price monitoring.** Track asking prices for rentals or sales in a district over time. Schedule the actor daily or weekly on Apify and build a price history.
- **Market research.** Compare price per square meter across neighborhoods, spot price drops, and see how many listings are new.
- **Lead generation.** Real estate professionals can pull fresh listings in their area, including which ones come from private advertisers.
- **Portfolio and investment analysis.** Feed listing data into your own models to find under-priced properties.
- **App and website feeds.** Use the Apify API to pull listing data straight into your product.

### How to use it

1. Open [pisos.com](https://www.pisos.com) and search the way you normally would: pick a city or district, rent or sale, and any filters you want (price range, rooms, size).
2. Copy the URL from your browser address bar.
3. Paste it into the actor's **Search page URLs** field. You can add several URLs to cover more than one area in a single run.
4. Set **Max listings** if you want more or fewer than the default 30.
5. Run the actor and export the dataset as JSON, CSV, Excel, or HTML, or read it through the API.

The actor returns exactly what your search returns, so anything you can filter on pisos.com carries over automatically.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `startUrls` | array | required | One or more pisos.com search result URLs |
| `maxItems` | integer | 30 | Maximum listings to collect across all URLs (up to 1000) |
| `requestTimeoutSecs` | integer | 30 | Per-request timeout in seconds |

#### Example input

```json
{
    "startUrls": [
        "https://www.pisos.com/alquiler/pisos-ciutat_vella/",
        "https://www.pisos.com/venta/pisos-madrid_centro/"
    ],
    "maxItems": 30
}
````

### Output

Each listing becomes one dataset record. Fields that a listing does not publish (for example, some studios list no bedroom count) come back as `null` rather than being silently dropped, so your columns stay consistent across runs.

| Field | Type | Description |
|-------|------|-------------|
| `adId` | string | Unique listing identifier on pisos.com |
| `listingTitle` | string | Listing headline, e.g. "Estudio en Carrer de les Ramelleres" |
| `operation` | string | `rent` or `sale`, detected from the search URL |
| `propertyType` | string | Piso, Estudio, Ático, Casa, Dúplex, and so on |
| `price` | integer | Numeric price |
| `currency` | string | Always `EUR` |
| `priceText` | string | Price exactly as displayed, e.g. "1.350 € /mes" |
| `pricePeriod` | string | Billing period for rentals, e.g. "/mes" |
| `priceDrop` | string | Recent price reduction, e.g. "150 € (-10%)", when shown |
| `bedrooms` | integer | Number of bedrooms |
| `bathrooms` | integer | Number of bathrooms |
| `areaSqm` | integer | Floor area in square meters |
| `floor` | string | Floor, e.g. "1ª planta" or "Bajo", when listed |
| `location` | string | Neighborhood, district, and city |
| `listingDescription` | string | Full description text from the listing card |
| `tag` | string | Card tag such as "Nuevo", when present |
| `badge` | string | Card badge such as "TOP", when present |
| `advertiserType` | string | `professional` (agency) or `private` |
| `agencyLogo` | string | Agency logo URL, when the advertiser shows one |
| `mainImage` | string | Primary photo URL |
| `images` | array | All photo URLs, de-duplicated |
| `imageCount` | integer | Number of photos |
| `url` | string | Direct link to the full listing |
| `sourceUrl` | string | The search URL this listing came from |
| `scrapedAt` | string | Extraction timestamp in UTC (ISO 8601) |

#### Example output

```json
{
    "adId": "65035325379.100500",
    "listingTitle": "Estudio en Carrer de les Ramelleres",
    "operation": "rent",
    "propertyType": "Estudio",
    "price": 1350,
    "currency": "EUR",
    "priceText": "1.350 € /mes",
    "pricePeriod": "/mes",
    "priceDrop": "150 € (-10%)",
    "bedrooms": 1,
    "bathrooms": 1,
    "areaSqm": 50,
    "floor": null,
    "location": "El Raval (Distrito Ciutat Vella. Barcelona Capital)",
    "tag": null,
    "badge": "TOP",
    "advertiserType": "professional",
    "mainImage": "https://fotos.imghs.net/mm-wp/1005/.../930d760c.jpg",
    "imageCount": 4,
    "url": "https://www.pisos.com/alquilar/estudio-el_raval-65035325379_100500/",
    "sourceUrl": "https://www.pisos.com/alquiler/pisos-ciutat_vella/",
    "scrapedAt": "2026-07-14T11:27:42.148748+00:00"
}
```

### Integrations

Like any Apify actor, results plug into the tools you already use:

- **Export** to JSON, CSV, Excel, XML, or an HTML table from the dataset tab
- **Automation** through Zapier, Make, or webhooks that fire when a run finishes
- **Scheduling** with Apify Schedules, so a search re-runs daily or weekly without you touching it

### FAQ

**Which pages are supported?**
Any pisos.com search results page, for rentals and sales, in any Spanish city, district, or neighborhood.

**Does it handle pagination?**
Yes. The actor walks through result pages until it reaches `maxItems` or runs out of pages, whichever comes first.

**Why are some fields null?**
Because the listing itself does not publish them. A studio may list no bedroom count, most listings have no price drop, and only some show a floor. Null means "not published", not "extraction failed".

**Does it scrape individual listing detail pages?**
No, it reads search result pages, which already carry the listing's key facts, description, and photos. That keeps runs fast and cheap.

**How fresh is the data?**
Every run fetches the live pages, so results reflect what pisos.com shows at that moment. Combine with Apify Schedules for continuous monitoring.

**Is scraping pisos.com legal?**
The actor collects only publicly visible listing data, no personal accounts and nothing behind a login. You are responsible for using the data in line with applicable laws and the website's terms in your jurisdiction.

### Support

If a run fails or a field comes back empty that should not, open an issue on the actor's page with the search URL you used and the run ID. Those two things are enough to reproduce and fix most problems quickly.

# Actor input Schema

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

One or more pisos.com search result URLs to extract listings from. Open pisos.com, apply your filters (location, rent or sale, price, rooms), copy the resulting page URL, and paste it here.

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

Maximum number of listings to extract across all search URLs. Pagination stops once this number is reached.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.pisos.com/alquiler/pisos-ciutat_vella/"
  ],
  "maxItems": 30,
  "requestTimeoutSecs": 30
}
```

# 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 = {
    "startUrls": [
        "https://www.pisos.com/alquiler/pisos-ciutat_vella/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/pisos-listings-extractor").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 = { "startUrls": ["https://www.pisos.com/alquiler/pisos-ciutat_vella/"] }

# Run the Actor and wait for it to finish
run = client.actor("kawsar/pisos-listings-extractor").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 '{
  "startUrls": [
    "https://www.pisos.com/alquiler/pisos-ciutat_vella/"
  ]
}' |
apify call kawsar/pisos-listings-extractor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Pisos Listings Extractor",
        "description": "Pisos Listings Extractor pulls property listings from pisos.com search pages, so you can track prices, build databases, and find leads without copying anything by hand.",
        "version": "0.0",
        "x-build-id": "U2YftVJZBYk4M24BU"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/kawsar~pisos-listings-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-kawsar-pisos-listings-extractor",
                "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/kawsar~pisos-listings-extractor/runs": {
            "post": {
                "operationId": "runs-sync-kawsar-pisos-listings-extractor",
                "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/kawsar~pisos-listings-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-kawsar-pisos-listings-extractor",
                "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",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Search page URLs",
                        "type": "array",
                        "description": "One or more pisos.com search result URLs to extract listings from. Open pisos.com, apply your filters (location, rent or sale, price, rooms), copy the resulting page URL, and paste it here.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max listings",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of listings to extract across all search URLs. Pagination stops once this number is reached.",
                        "default": 30
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout (seconds)",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Per-request timeout in seconds.",
                        "default": 30
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
