# Habitaclia.com Spain Scraper | 1$/1k Cheap (`trev0n/habitaclia-com-spain-scraper`) Actor

Scrape habitaclia.com real-estate listings across Spain. Filter by transaction, property type, location, price, area, rooms and advertiser or paste any habitaclia URL. Get price, area, rooms, energy rating, amenities, photos and advertiser. Incremental monitoring for cheap daily runs.

- **URL**: https://apify.com/trev0n/habitaclia-com-spain-scraper.md
- **Developed by:** [Paweł](https://apify.com/trev0n) (community)
- **Categories:** Real estate, Automation, Developer tools
- **Stats:** 6 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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.

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

## 🏠 Habitaclia.com Spain Scraper

🎯 **Pull thousands of Spanish property listings from Habitaclia.com — prices, areas, rooms, energy ratings, photos and advertisers — in clean, ready-to-use data.**

This scraper collects everything you see on Habitaclia, Spain's major real-estate portal: homes and rentals across every province, with full pricing, surface area, room counts, energy certificates, amenities, photo galleries and the advertising agency. Filter by city, price, size and more — or just paste a search link.

### 🚀 What Does It Do?

This scraper automatically browses Habitaclia listings and collects **structured, ready-to-use data** — no manual copy-pasting, no logins. Just set your filters and hit Start.

💡 **Two ways to use it:**

1. **🔍 Filter Mode** — Pick a transaction (sale or rent), a property type, a location and optional price/area/room filters. The scraper builds the search for you and collects every matching listing.
2. **📋 Direct URL Mode** — Already have a Habitaclia search or property link? Paste it in and the scraper figures out the rest automatically.

♻️ **Bonus — Monitoring Mode:** Re-run the same search daily and get **only what changed** — new listings, price drops and removed properties. Perfect for catching deals the moment they appear, at a fraction of the cost.

### 👥 Who Is This For?

| 👤 User                      | 💡 Use Case                                                             |
| ---------------------------- | ----------------------------------------------------------------------- |
| 🏢 Real estate agencies      | Track the market, benchmark prices, find new listings to match buyers   |
| 💰 Property investors        | Spot undervalued properties and price drops across neighborhoods        |
| 📊 Market analysts           | Build datasets on Spanish housing prices, supply and energy efficiency  |
| 🏦 Proptech & valuation      | Feed live supply data into pricing, recommendation and valuation models |
| 🔑 Relocation services       | Find rentals matching client budgets, sizes and locations               |
| 📰 Journalists & researchers | Study housing affordability and trends with real, current data          |

### ✨ Features

- 🌍 **All of Spain** — every city, town, province and district Habitaclia covers
- 🏘️ **Every property type** — apartments, houses, attics, duplexes, lofts, offices, commercial premises, industrial units, land, parking and more
- 💶 **Sale & rent** — switch between buying and renting with one setting
- 🎚️ **Powerful filters** — price range, area range, room count, advertiser type (agency vs. private owner) and keyword search
- 📸 **Full photo galleries** — every image for each property
- ⚡ **Energy certificates** — consumption and emissions ratings (A–G) plus exact values
- 🏷️ **Price-drop detection** — see which listings have been reduced and by how much
- 💸 **Cheap by default** — get ~20 rich fields per listing with no extra cost; turn on full details only when you need them
- ♻️ **Incremental monitoring** — recurring runs return only what changed (typically 80–95% cheaper)
- 📤 **Export anywhere** — JSON, CSV, Excel, Google Sheets, webhooks and more

### 🎛️ Filters & Options

| ⚙️ Option                     | 📝 What It Does                                                                                                                    |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| 🔄 **Transaction type**       | Properties for sale or for rent                                                                                                    |
| 🏠 **Property type**          | Apartment, house, attic, duplex, studio, loft, rural, chalet, office, commercial, industrial, land, parking, building or new build |
| 📍 **Location**               | Any Habitaclia city, town, province or district (e.g. Barcelona, Madrid, Valencia, Palma de Mallorca)                              |
| ↕️ **Sort order**             | Relevance, price (low/high), newest first, or largest area first                                                                   |
| 💶 **Min / Max price**        | Keep only listings inside your budget (EUR)                                                                                        |
| 📐 **Min / Max area**         | Keep only listings within a surface-area range (m²)                                                                                |
| 🛏️ **Min / Max rooms**        | Keep only listings within a room-count range                                                                                       |
| 👤 **Advertiser type**        | All, real-estate agency only, or private owner only                                                                                |
| 🔎 **Keyword**                | Keep only listings mentioning a word (e.g. "ascensor", "terraza", "reformado")                                                     |
| 📋 **Start URLs**             | Paste any Habitaclia search or property link instead of using filters                                                              |
| 📑 **Full property details**  | Open each listing for the long description, energy data, amenities, all photos and the advertiser                                  |
| 🔢 **Max listings**           | Cap how many results you collect                                                                                                   |
| 📄 **Max pages**              | Cap how many search pages to browse                                                                                                |
| ♻️ **Incremental monitoring** | Only return what changed since the previous run                                                                                    |

### 📦 What You Get (Output Fields)

Every property includes:

#### Listing & Pricing

| Field           | Example                                                                 |
| --------------- | ----------------------------------------------------------------------- |
| adId            | `2055003568449`                                                         |
| detailUrl       | `https://www.habitaclia.com/comprar-piso-...-girona-i2055003568449.htm` |
| title           | `Piso Calle bisbe lorenzana. Pis ampli i lluminós al centre de Girona`  |
| transactionType | `sale`                                                                  |
| propertySubtype | `flat`                                                                  |
| price           | `398000`                                                                |
| priceCurrency   | `EUR`                                                                   |
| pricePerSqm     | `5237`                                                                  |
| priceDropValue  | `25000`                                                                 |
| hasPriceDrop    | `true`                                                                  |

#### Property Specs

| Field                  | Example |
| ---------------------- | ------- |
| areaSqm                | `76`    |
| rooms                  | `3`     |
| bathrooms              | `1`     |
| yearBuilt              | `1980`  |
| energyConsumptionClass | `E`     |
| energyConsumptionValue | `147`   |
| energyEmissionsClass   | `E`     |
| energyEmissionsValue   | `31`    |

#### Amenities

| Field              | Example |
| ------------------ | ------- |
| hasElevator        | `true`  |
| hasParking         | `true`  |
| hasTerrace         | `false` |
| hasPool            | `false` |
| hasAirConditioning | `true`  |
| hasHeating         | `true`  |
| isFurnished        | `false` |

#### Location & Media

| Field        | Example                                              |
| ------------ | ---------------------------------------------------- |
| province     | `girona`                                             |
| city         | `girona`                                             |
| district     | `girona`                                             |
| neighborhood | `eixample_nord`                                      |
| location     | `Girona - Eixample Nord`                             |
| mainImageUrl | `https://images.habimg.com/imgh/2055-3568449/...jpg` |
| imageUrls    | `["https://images.habimg.com/...jpg", ...]`          |
| imageCount   | `31`                                                 |

#### Advertiser

| Field          | Example                                       |
| -------------- | --------------------------------------------- |
| advertiserType | `agency`                                      |
| advertiserName | `AGENTHIA SERVEIS IMMOBILIARIS`               |
| advertiserId   | `4604`                                        |
| advertiserUrl  | `https://www.habitaclia.com/inmobiliaria-...` |

### 📊 Example Output

```json
{
    "adId": "2055003568449",
    "realEstateAdId": "8c381017-404d-490e-ab10-44399e440f46",
    "detailUrl": "https://www.habitaclia.com/comprar-piso-pis-ampli-i-lluminos-al-centre-de-girona-i2055003568449.htm",
    "title": "Piso Calle bisbe lorenzana. Pis ampli i lluminós al centre de Girona, ubicació immillorable",
    "shortDescription": "Fantàstic pis situat en una de les millors zones de Girona centre, amb tots els serveis a l'abast.",
    "transactionType": "sale",
    "propertyType": "home",
    "propertySubtype": "flat",
    "advertType": "second_hand",
    "advertiserType": "agency",
    "price": 398000,
    "priceCurrency": "EUR",
    "pricePerSqm": 5237,
    "priceDropValue": null,
    "hasPriceDrop": false,
    "areaSqm": 76,
    "rooms": 3,
    "bathrooms": 1,
    "yearBuilt": null,
    "energyConsumptionClass": "F",
    "energyConsumptionValue": 326,
    "energyEmissionsClass": "F",
    "energyEmissionsValue": 71,
    "hasElevator": true,
    "hasParking": false,
    "hasTerrace": true,
    "hasPool": false,
    "hasAirConditioning": true,
    "hasHeating": true,
    "isFurnished": false,
    "province": "girona",
    "city": "girona",
    "district": "girona",
    "neighborhood": "eixample_nord",
    "location": "Girona - Eixample Nord",
    "mainImageUrl": "https://images.habimg.com/imgh/2055-3568449/pis-girona_0f4eb604.jpg",
    "imageUrls": ["https://images.habimg.com/imgh/2055-3568449/pis-girona_0f4eb604.jpg"],
    "imageCount": 31,
    "advertiserName": "AGENTHIA SERVEIS IMMOBILIARIS",
    "advertiserId": "4604",
    "advertiserUrl": "https://www.habitaclia.com/inmobiliaria-agenthia_serveis_immobiliaris_4604_1/",
    "scrapedAt": "2026-06-22T07:53:10.190Z"
}
````

### 📋 Dataset Views

The Apify Console gives you **4 ready-made table views** to quickly browse your results:

| View                      | What It Shows                                                                |
| ------------------------- | ---------------------------------------------------------------------------- |
| 📊 **Overview**           | Title, price, €/m², area, rooms, baths, type, location and link              |
| 📍 **Location**           | The full location hierarchy: neighborhood, district, city, comarca, province |
| ♻️ **Monitoring changes** | What changed since the last run — new, updated and price-dropped listings    |
| 📋 **Full Details**       | Every single field — the complete dataset                                    |

### ❓ FAQ

**🤔 Do I need a Habitaclia account or login?**
No. The scraper only reads publicly visible listings — no account, no credentials, nothing to set up.

**🤔 Can I scrape both for-sale and rental properties?**
Yes — just switch the transaction type. You can run separate searches for sale and rent.

**🤔 How do I keep costs low?**
Leave full details off (the default) — you still get ~20 rich fields per listing for free. Turn on full details only when you need descriptions, energy data and full photo galleries. For daily tracking, use Monitoring Mode to pay only for what changed.

**🤔 Can I filter by price, size or rooms?**
Absolutely. Set min/max price, min/max area and min/max rooms — plus advertiser type and keyword — to get exactly the listings you want.

**🤔 Can I export the data?**
Yes — JSON, CSV, Excel, XML, HTML, RSS. You can also push data directly to Google Sheets, Zapier, Make, or any webhook/API endpoint.

**🤔 How often should I run this?**
For fresh data, run daily or weekly. You can schedule automatic runs on Apify with just a few clicks, and Monitoring Mode keeps recurring runs cheap.

**🤔 Does it work with proxies?**
Yes — it uses Apify's built-in proxy service automatically. For very large or fast runs, residential proxies with country ES give the most reliable results.

### 🛠️ Need Custom Filters or Features?

**I'm happy to customize this scraper for your specific needs!** 🤝

Whether you need:

- 🎯 Additional filters (specific neighborhoods, property age, exact amenities, floor level)
- 📊 Extra data fields or custom output formats
- 🔄 Integration with your CRM, Google Sheets, or database
- ⏰ Scheduled scraping with automatic deduplication and price-drop alerts
- 🌐 Scraping from other Spanish property portals (Idealista, Fotocasa, Pisos.com) alongside Habitaclia

👉 **Don't hesitate to reach out via private message** — I respond quickly and I'm always open to building exactly what you need. No request is too small or too specific!

### ⚖️ Legal & Ethical Use

This scraper collects **only publicly available information** from Habitaclia.com. It does not access private data, bypass authentication, or collect personal contact details beyond the publicly listed advertising agency. Please use the data responsibly and in compliance with applicable laws and platform terms of service.

# Actor input Schema

## `transactionType` (type: `string`):

Whether to scrape properties for sale or for rent.

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

Type of property. 'Any home' covers all residential listings; the rest map to habitaclia's dedicated categories.

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

Habitaclia location: a city, town, province or district. Free text is normalised to habitaclia's slug (e.g. 'Palma de Mallorca' → 'palma\_de\_mallorca'). Examples: barcelona, madrid, valencia, sevilla, girona.

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

Native habitaclia ordering of the search results.

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

Optional. Paste any habitaclia.com URLs — a search-results page (e.g. https://www.habitaclia.com/viviendas-barcelona.htm) or an individual ad (…-i123456789.htm). Auto-classified. When provided, these REPLACE the filter fields above (price/area/room/keyword filters still apply).

## `minPrice` (type: `integer`):

Only keep listings priced at or above this (EUR).

## `maxPrice` (type: `integer`):

Only keep listings priced at or below this (EUR).

## `minArea` (type: `integer`):

Only keep listings with at least this built area (m²).

## `maxArea` (type: `integer`):

Only keep listings with at most this built area (m²).

## `minRooms` (type: `integer`):

Only keep listings with at least this many rooms.

## `maxRooms` (type: `integer`):

Only keep listings with at most this many rooms.

## `advertiserType` (type: `string`):

Filter by who posted the ad.

## `keyword` (type: `string`):

Only keep listings whose title or description contains this text (accent-insensitive). E.g. 'ascensor', 'reformado', 'terraza'.

## `fetchPropertyDetails` (type: `boolean`):

When enabled, every listing is opened to collect the full record: long description, build year, energy certificate, all amenities, every photo and the advertiser. When disabled (default, cheapest), only the ~20 rich fields already on the listing card are returned — no extra request per listing.

## `maxListings` (type: `integer`):

Hard cap on the number of records pushed to the dataset.

## `maxPages` (type: `integer`):

Maximum number of search-result pages to crawl per start URL (~25 listings per page).

## `maxConcurrency` (type: `integer`):

Maximum number of parallel requests.

## `maxRequestRetries` (type: `integer`):

How many times a failed request is retried on a fresh proxy session.

## `incremental` (type: `boolean`):

Track changes across runs. The first run records a baseline; later runs emit only NEW, UPDATED (e.g. price drops) and REAPPEARED listings — typically 80–95% cheaper for daily monitoring of the same search.

## `stateKey` (type: `string`):

Optional. Identifier for this monitoring baseline. Leave empty to derive one automatically from the search filters. Use a fixed value to keep one baseline across config tweaks.

## `emitUnchanged` (type: `boolean`):

Incremental only. Also output listings that did not change since the last run.

## `emitExpired` (type: `boolean`):

Incremental only. Also output listings that disappeared since the last run (likely sold/rented), tagged EXPIRED.

## `skipReposts` (type: `boolean`):

Incremental only. Drop NEW listings whose content matches a recently expired one (same property re-listed under a new id).

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

habitaclia serves fine over datacenter IPs, so the automatic Apify Proxy (cheapest) is the default. For very large or fast runs, switch to RESIDENTIAL with country ES.

## Actor input object example

```json
{
  "transactionType": "sale",
  "propertyType": "any",
  "location": "barcelona",
  "sort": "relevance",
  "advertiserType": "all",
  "fetchPropertyDetails": false,
  "maxListings": 200,
  "maxPages": 20,
  "maxConcurrency": 10,
  "maxRequestRetries": 5,
  "incremental": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "skipReposts": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `monitoring` (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 = {
    "location": "barcelona",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("trev0n/habitaclia-com-spain-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 = {
    "location": "barcelona",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("trev0n/habitaclia-com-spain-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 '{
  "location": "barcelona",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call trev0n/habitaclia-com-spain-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Habitaclia.com Spain Scraper | 1$/1k Cheap",
        "description": "Scrape habitaclia.com real-estate listings across Spain. Filter by transaction, property type, location, price, area, rooms and advertiser or paste any habitaclia URL. Get price, area, rooms, energy rating, amenities, photos and advertiser. Incremental monitoring for cheap daily runs.",
        "version": "1.0",
        "x-build-id": "YBQOlKemf8sIIwjG6"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/trev0n~habitaclia-com-spain-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-trev0n-habitaclia-com-spain-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/trev0n~habitaclia-com-spain-scraper/runs": {
            "post": {
                "operationId": "runs-sync-trev0n-habitaclia-com-spain-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/trev0n~habitaclia-com-spain-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-trev0n-habitaclia-com-spain-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": {
                    "transactionType": {
                        "title": "Transaction type",
                        "enum": [
                            "sale",
                            "rent"
                        ],
                        "type": "string",
                        "description": "Whether to scrape properties for sale or for rent.",
                        "default": "sale"
                    },
                    "propertyType": {
                        "title": "Property type",
                        "enum": [
                            "any",
                            "apartment",
                            "house",
                            "attic",
                            "duplex",
                            "studio",
                            "loft",
                            "rural",
                            "chalet",
                            "office",
                            "commercial",
                            "industrial",
                            "land",
                            "parking",
                            "building",
                            "newbuild"
                        ],
                        "type": "string",
                        "description": "Type of property. 'Any home' covers all residential listings; the rest map to habitaclia's dedicated categories.",
                        "default": "any"
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Habitaclia location: a city, town, province or district. Free text is normalised to habitaclia's slug (e.g. 'Palma de Mallorca' → 'palma_de_mallorca'). Examples: barcelona, madrid, valencia, sevilla, girona.",
                        "default": "barcelona"
                    },
                    "sort": {
                        "title": "Sort order",
                        "enum": [
                            "relevance",
                            "price_asc",
                            "price_desc",
                            "newest",
                            "area_desc"
                        ],
                        "type": "string",
                        "description": "Native habitaclia ordering of the search results.",
                        "default": "relevance"
                    },
                    "startUrls": {
                        "title": "Start URLs (advanced — overrides filters)",
                        "type": "array",
                        "description": "Optional. Paste any habitaclia.com URLs — a search-results page (e.g. https://www.habitaclia.com/viviendas-barcelona.htm) or an individual ad (…-i123456789.htm). Auto-classified. When provided, these REPLACE the filter fields above (price/area/room/keyword filters still apply).",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "minPrice": {
                        "title": "Min price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only keep listings priced at or above this (EUR)."
                    },
                    "maxPrice": {
                        "title": "Max price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only keep listings priced at or below this (EUR)."
                    },
                    "minArea": {
                        "title": "Min area (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only keep listings with at least this built area (m²)."
                    },
                    "maxArea": {
                        "title": "Max area (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only keep listings with at most this built area (m²)."
                    },
                    "minRooms": {
                        "title": "Min rooms",
                        "minimum": 0,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Only keep listings with at least this many rooms."
                    },
                    "maxRooms": {
                        "title": "Max rooms",
                        "minimum": 0,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Only keep listings with at most this many rooms."
                    },
                    "advertiserType": {
                        "title": "Advertiser type",
                        "enum": [
                            "all",
                            "agency",
                            "private"
                        ],
                        "type": "string",
                        "description": "Filter by who posted the ad.",
                        "default": "all"
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Only keep listings whose title or description contains this text (accent-insensitive). E.g. 'ascensor', 'reformado', 'terraza'."
                    },
                    "fetchPropertyDetails": {
                        "title": "Fetch full property details",
                        "type": "boolean",
                        "description": "When enabled, every listing is opened to collect the full record: long description, build year, energy certificate, all amenities, every photo and the advertiser. When disabled (default, cheapest), only the ~20 rich fields already on the listing card are returned — no extra request per listing.",
                        "default": false
                    },
                    "maxListings": {
                        "title": "Max listings",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Hard cap on the number of records pushed to the dataset.",
                        "default": 200
                    },
                    "maxPages": {
                        "title": "Max search pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of search-result pages to crawl per start URL (~25 listings per page).",
                        "default": 20
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of parallel requests.",
                        "default": 10
                    },
                    "maxRequestRetries": {
                        "title": "Max request retries",
                        "minimum": 0,
                        "type": "integer",
                        "description": "How many times a failed request is retried on a fresh proxy session.",
                        "default": 5
                    },
                    "incremental": {
                        "title": "Incremental monitoring",
                        "type": "boolean",
                        "description": "Track changes across runs. The first run records a baseline; later runs emit only NEW, UPDATED (e.g. price drops) and REAPPEARED listings — typically 80–95% cheaper for daily monitoring of the same search.",
                        "default": false
                    },
                    "stateKey": {
                        "title": "Monitoring state key",
                        "type": "string",
                        "description": "Optional. Identifier for this monitoring baseline. Leave empty to derive one automatically from the search filters. Use a fixed value to keep one baseline across config tweaks."
                    },
                    "emitUnchanged": {
                        "title": "Emit unchanged listings",
                        "type": "boolean",
                        "description": "Incremental only. Also output listings that did not change since the last run.",
                        "default": false
                    },
                    "emitExpired": {
                        "title": "Emit expired listings",
                        "type": "boolean",
                        "description": "Incremental only. Also output listings that disappeared since the last run (likely sold/rented), tagged EXPIRED.",
                        "default": false
                    },
                    "skipReposts": {
                        "title": "Skip reposts",
                        "type": "boolean",
                        "description": "Incremental only. Drop NEW listings whose content matches a recently expired one (same property re-listed under a new id).",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "habitaclia serves fine over datacenter IPs, so the automatic Apify Proxy (cheapest) is the default. For very large or fast runs, switch to RESIDENTIAL with country ES.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
