# Habitaclia Property Scraper (`snappytools/habitaclia-property-scraper`) Actor

You give it one or more public habitaclia.com search pages, such as homes for sale in Barcelona. You get back one row per property listing, with the asking price, floor area in areaM2, rooms, bathrooms, pricePerM2, location and the advertising agency. Schedule it to track a market week by week.

- **URL**: https://apify.com/snappytools/habitaclia-property-scraper.md
- **Developed by:** [Snappy](https://apify.com/snappytools) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 87.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.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/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

## Habitaclia Property Scraper – habitaclia.com listings export

You give it one or more public habitaclia.com search pages, such as homes for sale in Barcelona. You get back one row per property listing, with the asking `price`, floor area in `areaM2`, `rooms`, `bathrooms`, `pricePerM2`, `location` and the advertising `agency`.

Each row has an `id` and a canonical `url`, so you can match listings between runs and spot new ones or price changes. Schedule it to track a market week by week.

### Why this one

- **Clean, consistent fields.** Every row uses the same field names, with numbers taken out of the Spanish text so you can sort and filter straight away.
- **Follows result pages for you.** Set **Max pages per search** and it walks through the pages of each search.
- **Several searches in one run.** Paste as many search URLs as you like and each row records its `searchUrl`.
- **Bounded runs.** **Max listings** caps the output, up to 1,000 per run.
- **Public pages only.** No login, no account and no private data.
- **Priced per result.** $2.00 per 1,000 results, and runs with no results cost nothing.

### Quick start

```json
{
  "maxItems": 5,
  "maxPagesPerUrl": 3,
  "startUrls": ["https://www.habitaclia.com/viviendas-barcelona.htm"]
}
```

This returns up to 5 homes listed in Barcelona, one row per listing. In a test run on 14 Nov 2026 it returned 5 listings.

### What you can use it for

| Who | What for |
| --- | --- |
| Property investors | Compare `pricePerM2` across Catalan neighbourhoods before buying |
| Real estate agencies | Watch which competitors list in your area and at what prices |
| Relocation consultants | Build shortlists of rentals for clients moving to Barcelona |
| Market analysts | Track asking prices and stock over time with scheduled runs |
| Proptech developers | Feed listing data into valuation models and dashboards |

### How to use it

1. Click **Try for free**.
2. In **Search page URLs**, paste one or more habitaclia.com search pages, for example `https://www.habitaclia.com/viviendas-barcelona.htm`. Set your filters on the website first, then copy the address.
3. Set **Max listings**, for example `100`.
4. Set **Max pages per search**, for example `5`.
5. Click **Start**.

Tip: save the input as a task and add it to **Schedules** to collect fresh listings regularly.

### What data you get

Each dataset row is one property listing with these fields.

| Field | What it is | Example |
| --- | --- | --- |
| `id` | Listing identifier from the URL path | `comprar/planta-intermedia/gracia/barcelona-capital/933b279b-5965-46a5-8847-a0a484eb9055/d` |
| `url` | Link to the listing | `https://www.habitaclia.com/comprar/planta-intermedia/gracia/barcelona-capital/933b279b-5965-46a5-8847-a0a484eb9055/d` |
| `title` | Listing headline | `Piso con balcón en venta en Gràcia` |
| `price` | Asking price as a number | `24385` |
| `currency` | Currency of the price | `EUR` |
| `areaM2` | Floor area in square metres | `70` |
| `rooms` | Number of rooms | `2` |
| `bathrooms` | Number of bathrooms | `1` |
| `pricePerM2` | Price per square metre | `348` |
| `location` | Area text from the card | `venta en Gràcia` |
| `agency` | Advertiser name when shown, otherwise `null` | `null` |
| `searchUrl` | Search page the row came from | `https://www.habitaclia.com/viviendas-barcelona.htm` |
| `scrapedAt` | When the row was collected | `2026-11-14T07:15:41.858Z` |

### Pricing

| Event | Price |
| --- | --- |
| Result (each row written to the dataset) | $0.002 |

| Run | Cost |
| --- | --- |
| 100 results | $0.20 |
| 1,000 results | $2.00 |
| 10,000 results | $20.00 |

There is no start fee. Runs with no results cost nothing.

### Good to know

- **Limits:** up to 1,000 listings per run and up to 20 result pages per search URL.
- **Where the data comes from:** public habitaclia.com search result pages.
- **Empty fields:** fields a card does not show come back as `null`, for example `agency`.
- **Freshness:** you get what the site shows at run time. Listings can be removed or repriced at any moment.
- **Not affiliated:** this tool isn't affiliated with or endorsed by Habitaclia or its owners.

### FAQ

**Can I scrape rentals as well as sales?**
Yes. Paste a rental search URL into **Search page URLs**.

**How do I get only new listings?**
Schedule the run and compare the `id` values with your previous dataset.

**Why is a field empty?**
Some cards leave out details such as the agency, so those fields come back as `null`.

### Getting the data out

Download the results as Excel, CSV or JSON from the Output tab. Send them to Google Sheets, Slack, Zapier, Make or webhooks from the **Integrations** tab. Every run is also available through the Apify API, and you can run it automatically from **Schedules**.

### Questions or problems

Open an issue on the **Issues** tab and include the run link. I reply within one business day.

### Related tools

- [Trade Me Property Scraper](https://apify.com/snappytools/trade-me-property-scraper): property listings from Trade Me
- [Otodom Scraper](https://apify.com/snappytools/otodom-scraper): property listings from Otodom

# Actor input Schema

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

Public habitaclia.com search result pages to read, for example a city listing page for homes for sale or rent.

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

Maximum number of listings saved across all search pages. Between 1 and 1000.

## `maxPagesPerUrl` (type: `integer`):

How many result pages to follow for each search URL. Between 1 and 20.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.habitaclia.com/viviendas-barcelona.htm"
  ],
  "maxItems": 20,
  "maxPagesPerUrl": 3
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        "https://www.habitaclia.com/viviendas-barcelona.htm"
    ],
    "maxItems": 20,
    "maxPagesPerUrl": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("snappytools/habitaclia-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 = {
    "startUrls": ["https://www.habitaclia.com/viviendas-barcelona.htm"],
    "maxItems": 20,
    "maxPagesPerUrl": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("snappytools/habitaclia-property-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 '{
  "startUrls": [
    "https://www.habitaclia.com/viviendas-barcelona.htm"
  ],
  "maxItems": 20,
  "maxPagesPerUrl": 3
}' |
apify call snappytools/habitaclia-property-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,snappytools/habitaclia-property-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/e2cOchfziKjAaBu4C/builds/8Igmdpxb3FpWPwiJS/openapi.json
