# Habitaclia.com Scraper: Spain Real Estate & Rentals (`responsible_front_evw/habitaclia-scraper`) Actor

Scrape Habitaclia.com property listings in Spain: flats and houses for rent or for sale in Barcelona, Catalonia, Valencia and any city. Price, price per m², size, rooms, neighbourhood, coordinates, photos and private owner or agency. $1 per 1,000 listings, no proxy needed, no sellers' personal data.

- **URL**: https://apify.com/responsible_front_evw/habitaclia-scraper.md
- **Developed by:** [Open Data Tools](https://apify.com/responsible_front_evw) (community)
- **Stats:** 2 total users, 1 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/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.com Scraper: Spain Real Estate & Rentals

Get clean, structured Spain real estate data from **Habitaclia.com**, one of Spain's main property portals (especially strong in Barcelona, the rest of Catalonia and the Valencian Community): rental listings and homes for sale. Paste a search URL or type a city, and get a table of listings with price, price per m², size, rooms, neighbourhood, coordinates and more. Export to Excel, CSV, JSON or connect it to your own tools via API.

### What is it for?

- **Real estate investors:** compare price per m² by neighbourhood, spot price drops, and find under-priced flats before others do.
- **Real estate agencies:** monitor the competition's stock, track new listings in your area, and find private owners selling or renting without an agency (you get the listing, never their personal contact data).
- **Rental market analysts and researchers:** build rent indexes by district, follow trends week by week, and feed dashboards or models with fresh data.
- **Proptech and data teams:** a reliable daily feed of Spanish listings without maintaining your own scraper.

### What data do you get?

For each listing:

| Group | Fields |
|---|---|
| Price | price (EUR), price per m², price drop |
| Size and layout | built size (m²), land area, rooms, bathrooms, floor, terrace (m²) |
| Property | type and subtype, new build or second hand, condition, year built, orientation, heating, energy certificate, features (lift, pool, parking, air conditioning, furnished...) |
| Location | street, neighbourhood, district, city, province, latitude and longitude, location precision |
| Listing | title, description, photos, videos, last update date, listing URL |
| Seller | seller type (`private` or `professional`); for agencies: agency name, Habitaclia profile and website. Optionally agency phone and email |

Search results pages already include almost everything, so a run is fast and cheap: about 29 listings per page.

### How to use it

1. Go to [habitaclia.com](https://www.habitaclia.com), choose rent or buy, the city or district and any filters you like.
2. Copy the URL of the results page and paste it into **Habitaclia search URLs**. You can add several URLs.
3. Or simply type a **City** (for example `valencia`, `barcelona`, `madrid`) and choose **Operation**.
4. Set **Max listings** and click **Start**.

**Tip: only private owners.** Add `/particulares` before the final `/s` of the URL, for example `https://www.habitaclia.com/alquiler/viviendas/valencia-provincia/valencia-capital/particulares/s`.

#### Example input

```json
{
  "startUrls": [
    { "url": "https://www.habitaclia.com/alquiler/viviendas/valencia-provincia/valencia-capital/s" }
  ],
  "maxItems": 50,
  "fetchDetails": false,
  "proxyConfiguration": { "useApifyProxy": false }
}
```

#### Example output (one listing, shortened)

```json
{
  "id": "6f129504-0000-0000-0000-000000000000",
  "url": "https://www.habitaclia.com/alquiler/apartamento/benicalap/valencia-capital/6f129504-.../d",
  "operation": "rent",
  "propertyType": "flat",
  "propertySubtype": "apartment",
  "isNewBuild": false,
  "price": 1050,
  "currency": "EUR",
  "pricePerM2": 19.44,
  "surfaceM2": 54,
  "rooms": 2,
  "bathrooms": 1,
  "features": ["INTERNET", "AIR_CONDITIONER", "ELEVATOR", "EQUIPPED_KITCHEN", "FURNISHED"],
  "energyCertificate": { "status": "PENDING" },
  "street": "C de Sant Josep de Pignatelli",
  "neighbourhood": "Barrio de Benicalap",
  "district": "Benicalap",
  "municipality": "Valencia Capital",
  "province": "Valencia",
  "latitude": 39.4909,
  "longitude": -0.3842,
  "locationPrecision": "ZONE",
  "sellerType": "professional",
  "agencyName": "Example Agency",
  "imageCount": 18,
  "updatedAt": "2026-10-20T03:05:28+02:00",
  "scrapedAt": "2026-10-23T09:25:36+00:00"
}
```

For private sellers, `sellerType` is `"private"` and all agency and contact fields are empty.

### Pricing

Pay only for what you get (pay per event):

| Event | Price |
|---|---|
| Listing returned | **$1.00 per 1,000 listings** ($0.001 each) |
| Detail page opened (optional, `fetchDetails`) | $1.50 per 1,000 listings, extra |
| Run start | $0.00005 per run |

Example: 1,000 rental listings in Valencia cost about $1. With detail pages, about $2.50. Platform usage is included. Set a maximum cost per run in the run options if you want a hard limit.

### Limitations

- Habitaclia shows no publication date, only the last update date (`updatedAt`).
- Some listings hide the price ("ask for price"): `price` is then empty.
- Some sellers show only the area, not the exact street: check `locationPrecision` (`EXACT`, `STREET` or `ZONE`). Private listings always show `ROUNDED`: no street number, coordinates rounded to about 100 m.
- The private or professional label is deduced from the search page. Turn on **Open each listing's detail page** if you need it confirmed for every listing.
- If the website changes its layout, the Actor may stop working for a while until it is updated.
- Proxy: start without proxy. If runs get blocked, use Apify datacenter proxy. Residential proxy is rarely needed and costs much more.

### Responsible use

- The Actor only reads public pages that `robots.txt` allows (listing and search pages). It does not use the URL parameters, internal APIs or "show phone" pages that `robots.txt` disallows.
- It **never collects phone numbers, emails or names of private sellers.** Agency phone and email are optional and off by default. Phone numbers and emails written inside the description text are replaced with `[phone removed]` or `[email removed]`.
- It waits between requests (2 seconds by default) to keep the load on the website low.
- You are responsible for how you use the data. Respect Habitaclia's terms, intellectual property and database rights, and data protection law (GDPR) in your country. Do not use the data to send unsolicited messages to private owners.

### FAQ

#### Is there a Habitaclia API?

Habitaclia has no public API for listings. This Habitaclia scraper works as one: run it from the Apify API, schedule it, and get the results as JSON, CSV or Excel.

#### How much does it cost to scrape Habitaclia?

$1 per 1,000 listings. 1,000 rental listings in Valencia or Barcelona cost about $1. Opening detail pages adds $1.50 per 1,000. No monthly fee.

#### Does it cover Barcelona, Catalonia and the rest of Spain?

Yes, any city or search on habitaclia.com, for rent or for sale. Habitaclia is strongest in Catalonia (Barcelona, Sabadell, Girona, Tarragona) and the Valencian Community.

#### Can I get only private owners ("particulares")?

Yes. Add `/particulares` before the final `/s` of the search URL. You get the listing, never the owner's name, phone or email.

#### Is it an alternative to Idealista or Fotocasa scrapers?

Habitaclia is a different Spanish property portal with its own stock, especially in Catalonia. Use it together with Idealista, Fotocasa or Pisos.com scrapers to cover more of the Spanish real estate market.

#### Can I track new listings and price drops?

Yes. Schedule a daily run on the same search URL. Each listing has `priceDrop` and `updatedAt`.

#### Does it collect personal data?

No personal data of private sellers: no names, phones or emails, phones or emails written in the description are removed, and private listings show the street without the house number. Agency contact data is optional and off by default.

### En español

**Scraper de Habitaclia: pisos en alquiler y venta en España.** Saca los anuncios de cualquier búsqueda de habitaclia.com (Barcelona, Cataluña, Valencia y el resto de España): precio, precio por m², metros, habitaciones, baños, barrio, distrito, municipio, tipo de vendedor (particular o agencia), bajadas de precio y enlace al anuncio. Resultados en JSON, CSV o Excel, y se puede programar cada día para seguir anuncios nuevos y bajadas de precio.

- **Solo particulares:** añade `/particulares` antes del `/s` final de la URL de búsqueda.
- **Sin datos personales:** de los particulares no salen nombre, teléfono, correo ni número de portal (solo calle, barrio y ciudad).
- **Precio:** 1 $ por 1.000 anuncios, y 1,50 $ más por 1.000 si abres las fichas. Sin cuota mensual.
- **Para qué sirve:** estudios de precios de alquiler y venta, seguimiento del mercado inmobiliario por barrio, comparar con Idealista, Fotocasa o pisos.com.

### Questions or a missing field?

Open an issue in the **Issues** tab. Feature requests are welcome.

# Actor input Schema

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

One or more listing pages from habitaclia.com. Open habitaclia.com, set your filters (city, district, price, rooms...) and paste the URL of the results page. Example: https://www.habitaclia.com/alquiler/viviendas/valencia-provincia/valencia-capital/s . To get only private sellers, add /particulares before the final /s.

## `city` (type: `string`):

City name in Spanish, for example valencia, madrid, barcelona, sabadell. Used together with 'Operation'.

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

Rent or sale. Only used with 'City'.

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

Maximum number of listings to return in total. You only pay for the listings you get.

## `maxPagesPerSearch` (type: `integer`):

0 = no limit. Each results page has about 29 listings.

## `fetchDetails` (type: `boolean`):

Slower and charged extra (one more request per listing). Confirms whether the seller is a private owner or a professional. The search results already include almost all fields.

## `includeAgencyContact` (type: `boolean`):

Only for listings published by real estate agencies. Contact data of private sellers is never collected.

## `requestDelaySecs` (type: `integer`):

Pause between page requests, to be gentle with the website.

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

Start with no proxy. If the website blocks the run, use Apify datacenter proxy. Residential proxy is rarely needed and costs much more.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.habitaclia.com/alquiler/viviendas/valencia-provincia/valencia-capital/s"
    }
  ],
  "operation": "alquiler",
  "maxItems": 50,
  "maxPagesPerSearch": 0,
  "fetchDetails": false,
  "includeAgencyContact": false,
  "requestDelaySecs": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `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": [
        {
            "url": "https://www.habitaclia.com/alquiler/viviendas/valencia-provincia/valencia-capital/s"
        }
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("responsible_front_evw/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 = {
    "startUrls": [{ "url": "https://www.habitaclia.com/alquiler/viviendas/valencia-provincia/valencia-capital/s" }],
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("responsible_front_evw/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 '{
  "startUrls": [
    {
      "url": "https://www.habitaclia.com/alquiler/viviendas/valencia-provincia/valencia-capital/s"
    }
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call responsible_front_evw/habitaclia-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,responsible_front_evw/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/0kDQdstKzTBwCn9gQ/builds/Rb6FNZEtQkReYZqTh/openapi.json
