Pisos.com Listings Scraper
Pricing
from $1.55 / 1,000 results
Pisos.com Listings Scraper
Scrape public sale and rental listings from Pisos.com and Habitaclia and return one dataset with titles, prices, locations, sizes, rooms, bathrooms, photos and coordinates. Add optional detail-page data such as descriptions, agency details and property features.
Pricing
from $1.55 / 1,000 results
Rating
0.0
(0)
Developer
Axiom Works
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a month ago
Last modified
Categories
Features
Share
Spain Property Listings Scraper
Returns: one row per property listing with id, sourceUrl, title, price, location, sizeM2, rooms and imageUrls.
Input: {"startUrls":[{"url":"https://www.pisos.com/venta/pisos-madrid/"}],"maxItems":20,"scrapeDetails":false}
Best for: property price monitoring, rental market research, lead lists for real estate agencies and investors.
{"id": "65098413759.100500","sourceUrl": "https://www.pisos.com/comprar/piso-gaztambide-65098413759_100500/","title": "Piso en calle de la Princesa, 76","price": 1600000,"location": "Gaztambide (Distrito Chamberí. Madrid Capital)","sizeM2": 155,"rooms": 3,"imageUrls": ["https://fotos.imghs.net/mm-wp/1005/101/1005_2935432214101_1_202606051854533172743.jpg","https://fotos.imghs.net/mm-wp/1005/101/1005_2935432214101_2_202606051854533172928.jpg"]}
What does Spain Property Listings Scraper do?
This pisos.com scraper and habitaclia.com scraper turns the public search results of two Spanish property portals into a clean dataset. Give it a search-result URL for a city or province, for sale or for rent, and it walks through the result pages and saves one row for every listing. You get a Spanish real estate API without writing a parser: the same fields come back from both portals, so a Madrid sale search on Pisos.com and a Barcelona sale search on Habitaclia.com can be merged into one table.
The Actor reads only public pages that open without an account. It is not affiliated with Pisos.com or Habitaclia.com, and it does not need a login. It paginates automatically, removes duplicate listings, stops exactly at the number of items you ask for, and retries blocked or failed requests on a fresh proxy session.
Typical uses:
Track asking prices and price per square metre in a city or district over time.
Compare rental and sale supply across Madrid, Barcelona and other Spanish cities.
Build lead lists of agencies by switching on detail pages, which add the agency name and page.
Feed listings into a spreadsheet, a BI dashboard or a machine learning model for price estimation.
What data can you get?
Every record has the fields below. A field that a listing does not show is returned as null, so the dataset keeps one stable shape.
| Field | Type | Description |
|---|---|---|
id | string | Stable listing ID (the Pisos.com ad id, or the Habitaclia.com UUID) |
sourceUrl | string | Address of the listing page |
title | string | Listing title |
operation | string | sale or rent |
source | string | pisos.com or habitaclia.com |
price | number | Asking price in euros (monthly for rentals); null when the price is on request |
location | string | Neighbourhood and city as shown on the card |
city | string | City or municipality |
province | string | Province |
sizeM2 | number | Built area in square metres |
pricePerM2 | number | Price divided by sizeM2, euros, null when either is missing |
rooms | number | Number of bedrooms |
bathrooms | number | Number of bathrooms |
floor | string | Floor as shown on the card |
propertyType | string | Type of property, such as Piso, Casa or Ático |
description | string | Description text: a card excerpt, or the full text with detail pages on |
imageUrls | array | Photo URLs, with Pisos resize variants deduplicated by the source photo filename |
photoCount | number | Total number of photos in the listing |
latitude, longitude | number | Coordinates when present in the source; may be null |
agencyName | string | Agency name (detail pages on) |
agencyUrl | string | Agency page URL |
features | object | Feature table from the detail page: reference, condition, age, orientation and extras (Pisos.com) |
Fill rates depend on the listing. Price, size, rooms and bathrooms are present on nearly every card. Floor is missing for houses and ground-floor properties, and some listings show "consultar precio" instead of a number.
How to use
- Open the Actor in Apify Console and go to the Input tab.
- Paste one or more search-result URLs from Pisos.com or Habitaclia.com into Pisos or Habitaclia URL objects. Open the portal in your browser, choose the operation (buy or rent), the city and any filters in the URL path, and copy the address.
- Set Shared maximum listing count to the number of rows you need.
- Turn on Fetch optional listing details if you need the agency, the full description, the reference and the other features.
- Click Start. Results appear in the Output tab as soon as the first page is read. Download them as JSON, CSV, Excel or HTML, or read them through the API.
The maxItems budget is shared across all targets, and only matching unique records count toward it. Filters run after extraction. Missing values do not pass an enabled numeric filter. If a search returns no rows, widen the filters or check the search URL; if requests are blocked, change the proxy configuration.
If you do not have a URL, leave the URL list empty and fill in City name or slug (for example madrid), Sale or rent for location search and Portals for location search. The Actor builds the search address for you. This is convenient for Pisos.com. For Habitaclia.com, province and city are part of the path, so pasting a URL copied from the site is more reliable.
Supported URL shapes:
https://www.pisos.com/venta/pisos-madrid/ and https://www.pisos.com/alquiler/pisos-barcelona/
https://www.habitaclia.com/comprar/viviendas/barcelona-provincia/barcelona-capital/s
A single listing URL is accepted, but saving it depends on the page containing a parsable listing card. If no card is found, use a search-result URL instead.
Pages are requested politely, about one to two requests per second, with retries and backoff when a portal answers with an error.
Input
| Field | Type | Description |
|---|---|---|
startUrls | array | Pisos.com or Habitaclia.com search-result URLs. Pagination is followed automatically. |
maxItems | integer | Maximum number of listings to save across all URLs, 1 to 10000, default 50. |
propertyType | string | With location: all (default), flats or houses. |
minPrice, maxPrice | integer | Keep only listings in this price range in euros. Listings without a price are skipped when set. |
minSizeM2, minRooms | integer | Keep only listings with at least this size or number of rooms. |
scrapeDetails | boolean | Open each listing for agency, full description, reference, features and all photos. Default false. |
location | string | City name or slug, used only when startUrls is empty. |
operation | string | sale or rent, used with location. Default sale. |
sources | array | pisos and/or habitaclia, used with location. Default both. |
proxyConfiguration | object | Apify Proxy settings. Datacenter proxy by default; choose residential if the portals block you. |
Example input:
{"startUrls": [{ "url": "https://www.pisos.com/alquiler/pisos-barcelona/" },{ "url": "https://www.habitaclia.com/comprar/viviendas/barcelona-provincia/barcelona-capital/s" }],"maxItems": 100,"scrapeDetails": true,"proxyConfiguration": { "useApifyProxy": true }}
The limit maxItems applies to the whole run. With two start URLs and maxItems set to 100, the run saves 100 listings in total, taking the first URL until it is exhausted or the limit is reached.
Output
Each listing is one dataset item. This is a real item from a Pisos.com sale search for Madrid:
{"id": "65098413759.100500","sourceUrl": "https://www.pisos.com/comprar/piso-gaztambide-65098413759_100500/","title": "Piso en calle de la Princesa, 76","operation": "sale","source": "pisos.com","price": 1600000,"location": "Gaztambide (Distrito Chamberí. Madrid Capital)","city": "Madrid Capital","province": "Madrid","sizeM2": 155,"rooms": 3,"bathrooms": 3,"floor": "4ª planta","propertyType": "Piso","photoCount": 34,"latitude": 40.4325,"longitude": -3.71735,"agencyUrl": "https://www.pisos.com/inmobiliaria-princess_homes/"}
Pisos detail pages can contain several image sizes for the same photo. The Actor keeps the first source URL for each photo filename, so imageUrls contains distinct photos rather than repeated resize variants. photoCount remains the total advertised by the site; it may exceed the number of accessible photo URLs.
A Habitaclia.com item has the same fields. The card gives title, price, location, size, rooms, bathrooms, floor and photos; the detail page adds the description, coordinates and agency.
How much does it cost?
The Actor is charged per result: you pay for each listing saved to the dataset, and the run never saves or charges more than maxItems. See the Pricing tab of the Actor for the current rate. Platform usage such as proxy traffic and compute is billed separately according to your Apify plan. Detail pages cost more run time because they add one request per listing, but they do not change the per-result charge.
To keep a run cheap while you test, set maxItems to a small number such as 10 and leave detail pages off.
Use with AI agents (MCP)
You can call this Actor from an AI assistant through the Apify MCP server. Add the Actor to your MCP client configuration:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=axiomworks/pisos-habitaclia-property-scraper"}}}
Example prompts:
"Get 30 flats for sale in Madrid from Pisos.com and list the ten cheapest per square metre."
"Scrape Barcelona rentals on Pisos.com with detail pages and tell me which agencies advertise the most listings."
"Collect 20 sale listings from this Habitaclia.com search URL and return price, size and rooms as a table."
The agent sees the input fields described above, so keep maxItems explicit and pass full search URLs for best results.
Integrations and API
Run the Actor from code with the Apify API clients, or connect the dataset to Google Sheets, Make, Zapier, n8n or a webhook.
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("axiomworks/pisos-habitaclia-property-scraper").call(run_input={"startUrls": [{"url": "https://www.pisos.com/venta/pisos-madrid/"}],"maxItems": 50,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["title"], item["price"])
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('axiomworks/pisos-habitaclia-property-scraper').call({startUrls: [{ url: 'https://www.pisos.com/venta/pisos-madrid/' }],maxItems: 50,});const { items } = await client.dataset(run.defaultDatasetId).listItems();process.stdout.write(`${items.length}\n`);
cURL
curl -X POST "https://api.apify.com/v2/acts/axiomworks~pisos-habitaclia-property-scraper/run-sync-get-dataset-items" \-H "Authorization: Bearer $APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"startUrls":[{"url":"https://www.pisos.com/venta/pisos-madrid/"}],"maxItems":20}'
FAQ
Which portals and operations are supported? Pisos.com and Habitaclia.com, for sale and for rent. Residential search pages are supported. Pages for commercial property, land or new developments may have a different layout and can return fewer fields.
Why is price null for some listings?
Some listings show "consultar precio" (price on request). The Actor leaves the price empty instead of guessing.
Why are agencyName and features empty?
Those fields come from the detail page. Turn on Fetch optional listing details. On Pisos.com the detail page also provides the reference and the feature table; on Habitaclia.com it provides the description, coordinates and agency.
How many listings can I get from one search?
As many as the portal shows for that search, up to your maxItems. The Actor stops when a page has no new listings. Portals usually cap how deep a single search goes, so split very large areas into districts or municipalities.
What happens with a wrong URL or a city that does not exist? The run finishes quickly with zero items and a clear warning in the log. No placeholder records are saved.
The run returned fewer items than expected. Check the log. The portal may have blocked the request; switch the proxy to residential and try again. The Actor does not solve CAPTCHAs: if a block page persists it skips that page and keeps the listings it already has.
Are duplicates possible? No. Each listing id is saved once per run, even when it appears on several pages or in several start URLs.
Do I need to log in? No. Only public pages that load without an account are read.
Is it legal to scrape Pisos.com and Habitaclia.com?
The Actor collects publicly visible listing information that anyone can open in a browser, without logging in and without bypassing any protection. Scraping public data is generally lawful in many jurisdictions, but the rules depend on how you use the data. Listing text, photos and agency details may be protected by copyright or database rights, and personal data of private sellers is subject to the GDPR. Use the output for analysis and research, respect the data subjects, do not republish photos or descriptions as your own, and check the terms of each portal and your local law. This text is not legal advice; ask a lawyer if you plan a commercial use you are unsure about.
Feedback
Found a bug, a layout change or a field you need? Open an issue from the Actor's Issues tab in Apify Console and include the input you used and the URL that failed. Portals redesign their pages from time to time, and a short report helps fix extraction quickly.