# Pisos.com Property Scraper (`shahidirfan/pisos-com-property-scraper`) Actor

Extract real estate listings from Pisos.com at scale. Get property details, prices, location data & contact info instantly. Ideal for market research, investment analysis & data-driven real estate decisions. Automation-ready.

- **URL**: https://apify.com/shahidirfan/pisos-com-property-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Real estate, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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 Property Scraper

Extract comprehensive real estate listings from Pisos.com at scale. Collect properties for sale across Spain — including prices, locations, room counts, GPS coordinates, and descriptions — automatically and reliably. Perfect for property research, market analysis, and investment intelligence.

### Features

- **Direct URL or Location Search** — Provide a Pisos.com listing URL or simply enter a city/area name
- **Full Listing Data** — Extracts price, bedrooms, bathrooms, size, floor, location, and description
- **GPS Coordinates** — Captures latitude and longitude for mapping and spatial analysis
- **Price Drop Alerts** — Identifies listings with reduced prices
- **Smart Pagination** — Automatically navigates multiple pages to reach your desired result count
- **Duplicate Prevention** — Deduplicates results across pages for clean datasets
- **Proxy Support** — Built-in proxy configuration for reliable, uninterrupted scraping

### Use Cases

#### Property Investment Research
Identify high-value opportunities by scraping hundreds of listings across specific neighbourhoods. Compare price-per-m², track price drops, and build investment watchlists automatically.

#### Real Estate Market Analysis
Monitor pricing trends across Spanish cities and districts. Build datasets for statistical analysis, price index tracking, or competitive market reports for real estate agencies and developers.

#### Property Portal Aggregation
Aggregate Pisos.com listings into your own property search platform or CRM. Keep your database fresh with automated, scheduled scraping runs.

#### Location Intelligence
Use GPS coordinates to plot listings on maps, calculate proximity to amenities, or feed data into geospatial analysis tools for urban planning and site selection.

#### Academic & Market Research
Build large-scale datasets for academic studies on Spanish housing markets, affordability trends, and regional property dynamics.

---

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrl` | String | No | — | Full Pisos.com URL to scrape, e.g. `https://www.pisos.com/venta/pisos-madrid/`. Overrides Location. |
| `location` | String | No | `Madrid` | City or area name, e.g. `Barcelona`, `Valencia`, `Almería`. Used if Start URL is not set. |
| `results_wanted` | Integer | No | `20` | Maximum number of listings to collect. |
| `max_pages` | Integer | No | `5` | Safety cap on pages to visit (~30 listings per page). |
| `proxyConfiguration` | Object | No | Residential | Proxy settings for reliable access. |

---

### Output Data

Each item in the dataset contains:

| Field | Type | Description |
|-------|------|-------------|
| `title` | String | Property listing title |
| `url` | String | Full URL of the listing on Pisos.com |
| `location` | String | Neighbourhood, district, and city |
| `price` | String | Formatted price, e.g. `250.000 €` |
| `price_eur` | Integer | Numeric price in Euros |
| `price_drop` | String | Price reduction info, e.g. `15.000 € (-3%)` |
| `bedrooms` | Integer | Number of bedrooms |
| `bathrooms` | Integer | Number of bathrooms |
| `size_m2` | Integer | Surface area in square metres |
| `floor` | String | Floor level, e.g. `3ª planta`, `Bajo` |
| `property_type` | String | Schema.org type, e.g. `SingleFamilyResidence` |
| `description` | String | Short description snippet |
| `image_url` | String | URL of the main property photo |
| `badge` | String | Listing badge: `TOP`, `Oportunidad`, `Rebajado` |
| `latitude` | Number | GPS latitude |
| `longitude` | Number | GPS longitude |

---

### Usage Examples

#### Scrape by Location Name

Search for properties in any Spanish city:

```json
{
    "location": "Barcelona",
    "results_wanted": 50,
    "max_pages": 3
}
````

#### Scrape a Specific Search URL

Use your own filtered search URL from Pisos.com:

```json
{
    "startUrl": "https://www.pisos.com/venta/pisos-almeria_capital/",
    "results_wanted": 100,
    "max_pages": 5
}
```

#### Large-Scale Collection with Proxy

Collect a large dataset with residential proxy for maximum reliability:

```json
{
    "location": "Madrid",
    "results_wanted": 300,
    "max_pages": 15,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
```

***

### Sample Output

```json
{
    "id": "63366549974.440000",
    "title": "Piso en calle de Azcona",
    "url": "https://www.pisos.com/comprar/piso-guindalera28028-63366549974_440000/",
    "location": "Guindalera (Madrid Capital)",
    "price": "730.000 €",
    "price_eur": 730000,
    "price_drop": "20.000 € (-3%)",
    "bedrooms": 4,
    "bathrooms": 2,
    "size_m2": 145,
    "floor": "3ª planta",
    "property_type": "Apartment",
    "description": "Excepcional piso en la codiciada zona de Guindalera...",
    "image_url": "https://fotos.imghs.net/mm-wp/...",
    "badge": "Oportunidad",
    "latitude": 40.4276,
    "longitude": -3.6641
}
```

***

### Tips for Best Results

#### Use the Location Field for Quick Starts

- Enter any Spanish city name in the Location field: `Madrid`, `Barcelona`, `Sevilla`, `Valencia`
- For specific districts, use the direct URL from Pisos.com instead

#### Optimize Your Result Count

- Start with `results_wanted: 20` for testing
- Each page returns ~30 listings; set `max_pages` accordingly
- For large datasets (200+), enable residential proxies

#### Proxy Configuration

For reliable results, residential proxies are recommended:

```json
{
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
```

#### URL Patterns That Work

The scraper supports all standard Pisos.com listing URLs:

- `/venta/pisos-{location}/` — for-sale listings
- `/alquiler/pisos-{location}/` — rental listings
- `/venta/pisos-{location}/{page}/` — specific pages

***

### Integrations

Connect your data with:

- **Google Sheets** — Export for collaborative analysis
- **Airtable** — Build searchable property databases
- **Power BI / Tableau** — Create real estate market dashboards
- **Webhooks** — Send data to custom endpoints in real time
- **Make (Integromat)** — Automate workflows triggered by new listings
- **Zapier** — Connect to CRM, email, or notification tools

#### Export Formats

Download data in multiple formats:

- **JSON** — For developers and API integrations
- **CSV** — For spreadsheet and Excel analysis
- **XML** — For system integrations
- **Excel (XLSX)** — For business reporting

***

### Frequently Asked Questions

#### Which listing types does this support?

The scraper works with for-sale (`/venta/`) and rental (`/alquiler/`) listings. Provide the appropriate URL for your desired listing type.

#### Can I scrape a specific neighbourhood?

Yes — find the neighbourhood URL on Pisos.com (e.g. `/venta/pisos-madrid_capital_centro/`) and paste it as the `startUrl`.

#### How many results can I collect per run?

There is no hard limit. Adjust `results_wanted` and `max_pages` to control the volume. Each page contains approximately 30 listings.

#### What if the location name doesn't work?

Use the direct URL from Pisos.com instead of the location name. The site uses Spanish slugs (e.g. `almeria_capital`) which may differ from the city name.

#### Are GPS coordinates always available?

Coordinates are extracted from structured schema.org data embedded in each listing. Most listings include them; some older or partial listings may not.

#### Is data from Pisos.com always fresh?

The scraper fetches live data directly from the site on each run. For real-time monitoring, schedule runs using Apify's scheduling feature.

***

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)
- [Scheduling Runs](https://docs.apify.com/schedules)

***

### Legal Notice

This actor is designed for legitimate data collection purposes. Users are responsible for ensuring compliance with Pisos.com's terms of service and applicable data protection laws. Use data responsibly and respect rate limits. This tool is not affiliated with or endorsed by Pisos.com or its parent company.

# Actor input Schema

## `startUrl` (type: `string`):

Full Pisos.com search URL to scrape, e.g. https://www.pisos.com/venta/pisos-almeria\_capital/. If provided, overrides the Location field.

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

City or area name to search, e.g. 'Madrid', 'Barcelona', 'Valencia'. Used to build the URL automatically if Start URL is not given.

## `results_wanted` (type: `integer`):

Maximum number of property listings to collect.

## `max_pages` (type: `integer`):

Safety cap on the number of listing pages to visit (each page contains ~30 results).

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

Use Apify Proxy for reliable scraping. Residential proxies recommended.

## Actor input object example

```json
{
  "startUrl": "https://www.pisos.com/venta/pisos-almeria_capital/",
  "location": "Madrid",
  "results_wanted": 20,
  "max_pages": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrl": "https://www.pisos.com/venta/pisos-almeria_capital/",
    "location": "Madrid",
    "results_wanted": 20,
    "max_pages": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/pisos-com-property-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 = {
    "startUrl": "https://www.pisos.com/venta/pisos-almeria_capital/",
    "location": "Madrid",
    "results_wanted": 20,
    "max_pages": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/pisos-com-property-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 '{
  "startUrl": "https://www.pisos.com/venta/pisos-almeria_capital/",
  "location": "Madrid",
  "results_wanted": 20,
  "max_pages": 5
}' |
apify call shahidirfan/pisos-com-property-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Pisos.com Property Scraper",
        "description": "Extract real estate listings from Pisos.com at scale. Get property details, prices, location data & contact info instantly. Ideal for market research, investment analysis & data-driven real estate decisions. Automation-ready.",
        "version": "0.0",
        "x-build-id": "P98QwuybZDJSRCnus"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~pisos-com-property-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-pisos-com-property-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/shahidirfan~pisos-com-property-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-pisos-com-property-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/shahidirfan~pisos-com-property-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-pisos-com-property-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": {
                    "startUrl": {
                        "title": "Start URL",
                        "type": "string",
                        "description": "Full Pisos.com search URL to scrape, e.g. https://www.pisos.com/venta/pisos-almeria_capital/. If provided, overrides the Location field."
                    },
                    "location": {
                        "title": "Location (if not using Start URL)",
                        "type": "string",
                        "description": "City or area name to search, e.g. 'Madrid', 'Barcelona', 'Valencia'. Used to build the URL automatically if Start URL is not given."
                    },
                    "results_wanted": {
                        "title": "Maximum number of results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of property listings to collect.",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Maximum number of pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Safety cap on the number of listing pages to visit (each page contains ~30 results).",
                        "default": 5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use Apify Proxy for reliable scraping. Residential proxies recommended.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
