# Habitaclia Scraper (`normdata/habitaclia-scraper`) Actor

Spanish property listings from habitaclia with the agency email and phone on every agency listing: homes, new builds, offices, premises, parking and land, for sale or rent, anywhere in Spain. Price per m2, price drops, energy rating, 28 features and new-listing tracking.

- **URL**: https://apify.com/normdata/habitaclia-scraper.md
- **Developed by:** [Norm Data](https://apify.com/normdata) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.60 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

![Norm Data](https://i.ibb.co/rGbhM5Y8/Chat-GPT-Image-Sep-8-2026-02-20-50-PM.png)

## 🏠 Habitaclia Spain Real Estate Scraper

Get property listings from **habitaclia**, one of Spain's biggest real estate portals: homes, new builds, offices, commercial premises, parking spaces, industrial buildings, whole buildings, and land, for sale or for rent. Every agency listing comes with the **agency's email and phone**, plus its website and logo, next to the price, features, energy certificate, and exact location. No login, no account.

Built for real estate professionals, investors, and B2B teams who work the Spanish property market, with more than 430,000 homes for sale alone.

### 🎯 Who uses it?

#### 🤝 B2B sales to real estate agencies

Build a list of active agencies in any city or province with their email, phone, website, and how many listings they have, ready for outreach.

#### 💰 Property investors

Find flats that need renovation, recent price drops, and listings below a price per square metre, across a city, comarca, or district.

#### 📊 Market analysts and proptech

Track asking prices, supply, energy ratings, and price drops by province, municipality, and neighbourhood, with coordinates on every listing.

#### 🏢 Commercial property teams

Search offices, premises, parking, industrial buildings, whole buildings, and land, for sale or rent, anywhere in Spain.

### ✨ What it does

- **Every property type:** homes, new build homes, offices, commercial premises, parking spaces, industrial buildings, whole buildings, and land, for sale or rent.
- **Any place:** cities, towns, comarcas, and districts by name (for example Sabadell, Vallès Occidental, or Chamberí), whole provinces, or all of Spain.
- **Price and size filters:** price, built surface, bedrooms, and bathrooms.
- **Home filters:** subtypes such as penthouse, duplex, chalet, or studio, and 28 must-have features such as pool, terrace, lift, parking, or air conditioning.
- **Condition and energy:** homes that need renovation or are renovated, and a minimum energy rating.
- **Deal filters:** recent price drops only, agencies or private owners, and only listings with an agency email or phone.
- **Complete results:** big searches are split automatically, so you get every match and not just the first 10,000.
- **New listing tracking:** schedule the same search and each run returns only the listings that appeared since the last one.
- **Place check:** a misspelled place stops the run with suggestions instead of quietly searching somewhere else.

Missing source values are returned as `null`, never invented.

### Why this scraper

- **Agency email and phone on every agency listing,** plus the agency's name, trade name, website, logo, and page. The lead is in the row, no extra lookups needed.
- **Full property detail from the search itself:** description, 40+ features, condition, floor, orientation, heating, energy certificate with ratings and values, and every photo, video, and virtual tour link.
- **Price intelligence:** price per square metre, the price drop amount, and the price before the drop.
- **Precise location:** street where the advertiser shows it, neighbourhood, district, municipality, comarca, province, and coordinates.
- **Private owners stay private:** their listings are included, with no name, email, or phone.

### How it compares

| Capability | This actor | Other habitaclia scrapers |
|---|:--:|:--:|
| Price, size, rooms, property type | yes | yes |
| **Agency email and phone** | **yes** | no |
| **Agency website, logo, and page** | **yes** | name only |
| **Search by city, comarca, district, or all of Spain** | **yes** | one location |
| **Every match past 10,000 results** | **yes** | capped by pages |
| **28 must-have features and home subtypes** | **yes** | no |
| **Condition and energy rating filters** | **yes** | no |
| **Price per m², price drop, and price before the drop** | **yes** | partial |
| **Only listings with an agency contact** | **yes** | no |
| **Only new listings on scheduled runs** | **yes** | partial |

### 📦 What data you get

| Entity | Useful fields |
| --- | --- |
| Listing | ID, code, title, description, operation, property type, subtype, new build flag, premium and opportunity flags, and the date it was last updated. |
| Price | Price in euros, price on request flag, price per m², price drop, and the price before the drop. |
| Property | Bedrooms, bathrooms, built surface, land area, floor, condition, orientation, heating, hot water, features, and highlights. |
| Energy | Certificate status, consumption and emissions ratings, and their values. |
| Location | Street and number where shown, neighbourhood, district, municipality, comarca, province, autonomous community, coordinates, and how exact the address is. |
| Agency | Name, trade name, email, phone, reference, ID, logo, website, and habitaclia page. |
| Media | Main photo, photo, video, virtual tour, and floor plan counts, and every photo, video, and tour link. |

Every record includes `scraped_at` (UTC). Download your dataset from Apify as CSV, JSON, Excel, or XML.

### 💡 Use cases

#### 🤝 Every agency listing flats in Sabadell, with email and phone

```json
{ "places": ["Sabadell"], "advertiser": "agency", "withContactOnly": true }
```

#### 💰 Barcelona flats to renovate under €300,000

```json
{ "places": ["Barcelona"], "conditions": ["NEEDS_RENOVATION"], "priceMax": 300000 }
```

#### 📉 Recent price drops on homes with a pool in Málaga province

```json
{ "provinces": ["malaga-provincia"], "features": ["POOL"], "priceDropsOnly": true }
```

#### 🏢 Commercial premises for rent in Madrid

```json
{ "operation": "alquiler", "propertyType": "locales_comerciales", "places": ["Madrid"] }
```

#### 🔔 New penthouses in Eixample, on a daily schedule

```json
{ "places": ["Eixample, Barcelona"], "subtypes": ["PENTHOUSE"], "onlyNewListings": true }
```

#### 🌿 Energy efficient new builds across all of Spain

```json
{ "propertyType": "obra-nueva", "minEnergyRating": "B" }
```

### ⚙️ How the input is organised

**Maximum results** sits at the very top, since it applies no matter what you're doing. Leave it empty to collect every match. Below it, the form is split into six numbered sections:

| Section | What it's for |
| --- | --- |
| **1 · What** | Buy or rent, property type, and home subtypes. |
| **2 · Where** | Places by name and whole provinces. Leave both empty for all of Spain. |
| **3 · Price, size, and rooms** | Price, built surface, bedrooms, and bathrooms. |
| **4 · Features and condition** | Must-have features, condition, minimum energy rating, and recent price drops. |
| **5 · Advertiser** | Agencies or private owners, and only listings with an agency contact. |
| **6 · Output** | Only new listings and sort order. |

> **Apify Free plan:** every run is limited to a fixed 10-row sample. Upgrade your Apify plan to run your own settings.

### 🛡️ Limits & responsible use

This Actor reads only public habitaclia search results. It never signs in and never contacts advertisers.

Agency contact details are business information. Listings from private owners are included without their name, email, or phone. Use the data for relevant business purposes, respect habitaclia's terms, and do not republish listings.

When a search is split to go past 10,000 results, listings whose price is shown only on request can be missed, since price ranges are used to split it.

Maximum bedrooms, condition, energy rating, price drops, the contact filter, and some features (such as gym, doorman, or alarm) are checked on each listing. Combined on a large area they mean checking every listing there, so a run can take several minutes to find a few rare matches. The log shows how many listings have been checked so far.

Runs are paced to stay gentle on the site. About 1,000 listings load in under half a minute.

### 📧 Contact

Need a scraper for a different site, or found something wrong with this one? norm.data.scrapers@gmail.com

### Local development

```bash
bun install
bun test
bun run src/main.ts
```

# Changelog

This Actor's version history is a separate document: https://apify.com/normdata/habitaclia-scraper/changelog.md

# Actor input Schema

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

Caps how many listings this run writes. Leave empty to collect every match.

## `operation` (type: `string`):

Listings for sale or for rent.

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

Homes, new build homes, offices, commercial premises, parking spaces, industrial buildings, whole buildings, or land.

## `subtypes` (type: `array`):

Only these kinds of home, e.g. penthouses and duplexes. Homes only.

## `places` (type: `array`):

Cities, towns, comarcas, or districts as you would write them, e.g. "Barcelona", "Sabadell", "Vallès Occidental", "Chamberí". Add the city or province after a comma when a name exists in several places, e.g. "Eixample, Barcelona". An unknown name stops the run with suggestions.

## `provinces` (type: `array`):

Search entire provinces. Leave both this and Places empty to search all of Spain.

## `priceMin` (type: `integer`):

Lowest asking price in euros (monthly rent when renting).

## `priceMax` (type: `integer`):

Highest asking price in euros (monthly rent when renting).

## `surfaceMin` (type: `integer`):

Smallest built surface in square metres.

## `surfaceMax` (type: `integer`):

Largest built surface in square metres.

## `roomsMin` (type: `string`):

Fewest bedrooms.

## `roomsMax` (type: `string`):

Most bedrooms.

## `bathroomsMin` (type: `string`):

Fewest bathrooms.

## `features` (type: `array`):

Every feature chosen must be present, e.g. swimming pool, terrace, lift, parking. Pets allowed is mostly listed on rentals, and smoke outlet on commercial premises.

## `conditions` (type: `array`):

Only homes in one of these states, e.g. needs renovation for investors.

## `minEnergyRating` (type: `string`):

Energy consumption rating from the certificate. Listings without a certificate are left out when this is set.

## `priceDropsOnly` (type: `boolean`):

Only listings whose price was lowered, with the amount and the price before.

## `advertiser` (type: `string`):

Agencies come with their name, email, phone, website, and logo. Private owners are listed without any personal details.

## `withContactOnly` (type: `boolean`):

Keeps only listings that come with an agency contact, for lead lists.

## `onlyNewListings` (type: `boolean`):

Remembers what this same search returned before, so a scheduled run returns only new listings. The first run returns the newest matches and sets the starting point.

## `sort` (type: `string`):

Order of results, the same options as on the site.

## Actor input object example

```json
{
  "maxItems": 10,
  "operation": "comprar",
  "propertyType": "viviendas",
  "places": [
    "Barcelona"
  ],
  "roomsMin": "any",
  "roomsMax": "any",
  "bathroomsMin": "any",
  "minEnergyRating": "any",
  "priceDropsOnly": false,
  "advertiser": "any",
  "withContactOnly": false,
  "onlyNewListings": false,
  "sort": "RELEVANCE"
}
```

# Actor output Schema

## `results` (type: `string`):

One dataset row per listing.

# 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": 10,
    "operation": "comprar",
    "propertyType": "viviendas",
    "places": [
        "Barcelona"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("normdata/habitaclia-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": 10,
    "operation": "comprar",
    "propertyType": "viviendas",
    "places": ["Barcelona"],
}

# Run the Actor and wait for it to finish
run = client.actor("normdata/habitaclia-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": 10,
  "operation": "comprar",
  "propertyType": "viviendas",
  "places": [
    "Barcelona"
  ]
}' |
apify call normdata/habitaclia-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,normdata/habitaclia-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KOHjUVpt7mf3DwmC0/builds/fSGV1UxE057qpAKsp/openapi.json
