Habitaclia.com Real Estate Scraper (Spain) avatar

Habitaclia.com Real Estate Scraper (Spain)

Pricing

from $0.43 / 1,000 list-tier listings

Go to Apify Store
Habitaclia.com Real Estate Scraper (Spain)

Habitaclia.com Real Estate Scraper (Spain)

Public Habitaclia.com property listings from search results: price, rooms, baths, area, location, agency, photos, and optional detail page. No start fee.

Pricing

from $0.43 / 1,000 list-tier listings

Rating

0.0

(0)

Developer

Stone Jade

Stone Jade

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Features

Limited permissions

Share

Extract structured residential property listings from Habitaclia.com, one of Spain's leading real estate portals, directly into clean JSON, CSV, Excel, or API pipelines. Collect asking rents and sale prices, room and bathroom counts, built and land area, multi-level Spanish locations, energy efficiency ratings, amenities, photos, and public agency contacts—with zero run-start fees and lightweight 256 MB HTTP execution.


Overview & Key Features

Habitaclia.com Real Estate Scraper extracts public rent (/alquiler/.../s) and sale (/comprar/.../s) property listings as well as direct detail URLs (/…/{uuid}/d) by reading the structured window.__INITIAL_PROPS__ JSON payload embedded directly in public Habitaclia pages—no headless browser needed.

Unlike many property portals where search cards omit key metadata, Habitaclia search result pages (~29 listings per page, paginated via /s and /s/N) already include rich descriptions, energy certificate ratings and CO2 emissions, feature tags, photo galleries, and public agency contacts. Leaving scrapeDetails off captures the complete search-card payload at full speed, while enabling scrapeDetails: true re-fetches each public detail page to confirm the detail embed.

Key Capabilities

  • Zero start fee, flat transparent pricing: Both list-tier (listing) and detail-tier (listing-detail) events cost $0.0005 per result ($0.50 per 1,000 listings on the Free tier, with 5%–15% Apify Store subscription discounts for Bronze through Diamond), with $0.00 start fee.
  • Rich list-tier payloads out of the box: Even with scrapeDetails: false, each row captures listingId, legacyNumericId, reference, title, price, currency, pricePeriod, rooms, baths, area_m2, landArea_m2, floor, constructionYear, propertyType, propertySubtype, propertyStatus, operation, city, district, neighborhood, province, address, zipCode, lat, lon, agency, agent, agencyWebsite, isPrivateOwner, phones, emails, energyRating, energyValue, energyEmissionsRating, energyEmissionsValue, features, photos, description, and canonical url.
  • Built-in privacy filtering (Privacy Policy A): Public commercial agency phone numbers, emails, and websites printed in __INITIAL_PROPS__ are retained, while private owner (particular) phone numbers and email addresses are automatically dropped (isPrivateOwner: true rows always output phones: [] and emails: []). The Actor never calls disallowed phone-reveal or AJAX endpoints.
  • Page-ordered output & graceful truncation: Even when concurrency is increased up to 3, rows are saved in page order, duplicate listing UUIDs across overlapping seeds are skipped without charging, and early stops append a single uncharged recordType: "run-notice" row plus a complete OUTPUT summary in the Key-Value Store.

Common Use Cases

  • Spanish residential market & rent benchmarking: Compare monthly rents (operation: "rent", pricePeriod: "month") and sale prices (operation: "sale") across Barcelona, Madrid, Valencia, Seville, Málaga, or any province/municipality on Habitaclia.com.
  • Energy certificate & building quality analytics: Analyze energyRating, energyValue, energyEmissionsRating, energyEmissionsValue, constructionYear, propertyStatus, and features (ELEVATOR, TERRACE, AIR_CONDITIONER, PRIVATE_PARKING, etc.) across neighbourhoods.
  • Agency & portfolio intelligence: Track brokerage inventory using agency, agent, agencyWebsite, reference, and legacyNumericId.
  • Geospatial housing maps: Use lat, lon, district, neighborhood, city, and province coordinates for GIS mapping and local comp engines.

Input Configuration

All input fields are optional. Running with an empty input ({}) automatically scrapes Habitaclia's public rental apartment searches (viviendas) in both Barcelona and Madrid (https://www.habitaclia.com/alquiler/viviendas/barcelona-provincia/barcelona-capital/s and https://www.habitaclia.com/alquiler/viviendas/madrid-provincia/madrid-capital/s) up to 50 listings total.

ParameterTypeDefaultConstraintsDescription
startUrlsarray<object | string>Barcelona + Madrid rental searchesPublic habitaclia.com search (/…/s or /…/s/N) or detail (/…/{uuid}/d) URLsSearch result URLs or direct listing detail URLs. Accepts Request List { "url": "..." } objects or plain URL strings.
maxItemsinteger50Min 1, Max 2000Maximum number of charged listings to collect across all seeds before stopping cleanly.
maxPagesintegernull (unlimited)Min 1, Max 2000Optional cap on search result pages fetched per list seed (~29 listings per page).
startPageinteger1Min 1, Max 2000First search page number when the start URL does not already specify /s/N.
scrapeDetailsbooleanfalsetrue / falseRe-fetches each listing's public detail page to confirm the detail embed (tier: "detail"). Charged as listing-detail instead of listing. Failed detail fetches preserve the list row (detailError) charged as listing.
requestDelayMsinteger1200Min 1200Minimum interval in milliseconds between HTTP request starts. A Crawl-delay directive in robots.txt can only raise this gap.
concurrencyinteger1Min 1, Max 3Maximum search or detail requests in flight simultaneously. Rows are still emitted in page order while spacing request starts by at least requestDelayMs.
maxRunSecondsinteger3600Min 30Graceful run-time budget in seconds. Stops ahead of platform timeout, writes OUTPUT, and appends an uncharged run-notice row when truncated.
proxyConfigurationobject{ "useApifyProxy": false }Apify Proxy configDirect connection by default. Do not default to residential proxies. If a RESIDENTIAL proxy group is used, transfer is strictly capped at a fixed 5 MB per run (not user-tunable).
useProxyFallbackbooleanfalsetrue / falseWhen a proxy is configured, remain on a direct connection until repeated HTTP 403 or 429 responses occur, then switch to the configured proxy. Recommended whenever using residential proxies.
allowDetailOnResidentialbooleanfalsetrue / falseWhen using a RESIDENTIAL proxy group, detail pages stay on direct connections by default. Enable only if detail requests should also route through the residential proxy within the 5 MB cap.

Example 1: List-Tier Search (Barcelona & Madrid Rentals)

Fast list-tier collection of up to 200 rental listings across Barcelona and Madrid directly from search result pages:

{
"startUrls": [
{
"url": "https://www.habitaclia.com/alquiler/viviendas/barcelona-provincia/barcelona-capital/s"
},
{
"url": "https://www.habitaclia.com/alquiler/viviendas/madrid-provincia/madrid-capital/s"
}
],
"maxItems": 200,
"maxPages": 4,
"startPage": 1,
"scrapeDetails": false,
"requestDelayMs": 1200,
"concurrency": 1,
"proxyConfiguration": {
"useApifyProxy": false
}
}

Example 2: Sale Search with Detail-Embed Confirmation & Direct Listing URL

Collect homes for sale (comprar) in Valencia alongside a specific listing URL with scrapeDetails: true and proxy fallback enabled:

{
"startUrls": [
{
"url": "https://www.habitaclia.com/alquiler/planta-intermedia/carrer-del-capita-arenas-3/les-corts/barcelona-capital/014dca68-1aa8-4b49-b049-13b2a036824f/d"
},
{
"url": "https://www.habitaclia.com/comprar/viviendas/valencia-provincia/valencia-capital/s"
}
],
"maxItems": 100,
"scrapeDetails": true,
"requestDelayMs": 1500,
"concurrency": 2,
"maxRunSeconds": 1800,
"useProxyFallback": true,
"proxyConfiguration": {
"useApifyProxy": false
}
}

Output Data & Dataset Schema

Preview Table

The table below shows sample rows combining the 2026-10-26 Barcelona test fixture structure with illustrative examples to show how fields map across rental and sale listings.

Listing IDTitlePriceCurrencyPeriodRoomsBathsArea (m²)City / DistrictAgency
014dca68-1aa8-4b49-b049-13b2a036824f¡Vive en el Corazón de Barcelona en este Exclusivo y Luminoso Piso con Terraza!5,300EURmonth53232Barcelona Capital / Les CortsREVEL
00000000-0000-4000-8000-000000000001Bright 3-bedroom flat with terrace (illustrative)1,850EURmonth3295Barcelona / EixampleExample Agency
00000000-0000-4000-8000-000000000002Renovated 4-bedroom family flat (illustrative)495,000EURnull42135Madrid / SalamancaExample Estates S.L.

Illustrative JSON Output Example

The JSON record below matches .actor/dataset_schema.json using an illustrative listing structure based on the 2026-10-26 Barcelona fixture (private-owner listings output isPrivateOwner: true, phones: [], and emails: []):

{
"listingId": "014dca68-1aa8-4b49-b049-13b2a036824f",
"legacyNumericId": "9863004320227",
"reference": "CA3",
"title": "¡Vive en el Corazón de Barcelona en este Exclusivo y Luminoso Piso con Terraza!",
"price": 5300,
"currency": "EUR",
"pricePeriod": "month",
"rooms": 5,
"baths": 3,
"area_m2": 232,
"landArea_m2": null,
"floor": "SIXTH",
"constructionYear": 1983,
"propertyType": "flat",
"propertySubtype": "flat",
"propertyStatus": "ALMOST_NEW",
"operation": "rent",
"city": "Barcelona Capital",
"district": "Les Corts",
"neighborhood": "Pedralbes",
"province": "Barcelona",
"address": "Carrer del Capità Arenas 3",
"zipCode": "08034",
"lat": 41.3892013,
"lon": 2.1265986,
"agency": "REVEL",
"agent": "Revel",
"agencyWebsite": "https://agency.example",
"isPrivateOwner": false,
"phones": [
"+34900000000"
],
"emails": [
"contact@example.com"
],
"energyRating": "F",
"energyValue": 133,
"energyEmissionsRating": "F",
"energyEmissionsValue": 33,
"features": [
"ELEVATOR",
"AIR_CONDITIONER",
"BALCONY",
"PRIVATE_PARKING"
],
"photos": [
"https://images.example.com/habitaclia/photo-1.jpg",
"https://images.example.com/habitaclia/photo-2.jpg"
],
"description": "Exterior flat with lift, terrace, and clear views in Pedralbes.",
"url": "https://www.habitaclia.com/alquiler/planta-intermedia/carrer-del-capita-arenas-3/les-corts/barcelona-capital/014dca68-1aa8-4b49-b049-13b2a036824f/d",
"publicationDate": null,
"page": 1,
"position": 1,
"listUrl": "https://www.habitaclia.com/alquiler/viviendas/barcelona-provincia/barcelona-capital/s",
"tier": "list",
"scrapedAt": "2026-10-26T00:00:00.000Z"
}

Full Dataset Field Reference

Every property declared in .actor/dataset_schema.json is listed below. Fields may be null or omitted when unpublished by the source or when specific to run-notice truncation records.

FieldTypeTierDescription
listingIdstring | nullList, DetailStable Habitaclia listing UUID (raw.id). Absent on run-notice rows.
legacyNumericIdstring | nullList, DetailLegacy numeric listing ID cast to string when published.
referencestring | nullList, DetailAgency or publisher internal reference code when published (e.g. "CA3").
titlestring | nullList, DetailPublic listing headline / title.
pricenumber | nullList, DetailAsking rent or sale price numeric amount.
currencystring | nullList, DetailISO currency code ("EUR" is assumed for Spanish listings when the embed omits a currency).
pricePeriodstring | nullList, DetailBilling period ("month" for operation: "rent"; null for operation: "sale").
roomsnumber | nullList, DetailNumber of bedrooms/rooms when published.
bathsnumber | nullList, DetailNumber of bathrooms when published.
area_m2number | nullList, DetailBuilt surface area (builtSurface) in square metres (m²).
landArea_m2number | nullList, DetailPlot/land area (landArea) in square metres when published.
floorstring | number | nullList, DetailFloor as a number or published code such as "THIRD", "SIXTH", or "GROUND".
constructionYearnumber | nullList, DetailYear of construction when published.
propertyTypestring | nullList, DetailBuilding type label as published (e.g. "flat", "house").
propertySubtypestring | nullList, DetailProperty subtype label when published.
propertyStatusstring | nullList, DetailCondition/status code when published (e.g. "ALMOST_NEW").
operationstring | nullList, DetailNormalized transaction type: "rent" or "sale" (derived from transaction.type or URL path).
citystring | nullList, DetailMunicipality or city name (e.g. "Barcelona Capital").
districtstring | nullList, DetailMunicipal district name (e.g. "Les Corts", "Eixample").
neighborhoodstring | nullList, DetailNeighbourhood (barrio) name when published (e.g. "Pedralbes").
provincestring | nullList, DetailSpanish province name (e.g. "Barcelona", "Madrid").
addressstring | nullList, DetailDisplay address or street name + number when published.
zipCodestring | nullList, DetailSpanish postal code when published.
latnumber | nullList, DetailLatitude coordinate when published.
lonnumber | nullList, DetailLongitude coordinate when published.
agencystring | nullList, DetailReal estate agency trade name or publisher name.
agentstring | nullList, DetailPublic publisher/contact name on the listing.
agencyWebsitestring | nullList, DetailPublisher website URL when published.
isPrivateOwnerboolean | nullList, Detailtrue when the advertiser is a private individual (particular); false for commercial agencies.
phonesarray<string> | nullList, DetailPublic commercial phone numbers printed in the embed/description; always [] for private owners under Privacy Policy A.
emailsarray<string> | nullList, DetailPublic commercial email addresses printed in the embed/description; always [] for private owners.
energyRatingstring | nullList, DetailEnergy consumption efficiency rating letter ("A"–"G") when published.
energyValuenumber | nullList, DetailEnergy consumption value (kWh/m² year) when published.
energyEmissionsRatingstring | nullList, DetailCO2 emissions rating letter ("A"–"G") when published.
energyEmissionsValuenumber | nullList, DetailCO2 emissions numeric value (kg CO2/m² year) when published.
featuresarray<string> | nullList, DetailPublished amenity/feature codes (e.g. "ELEVATOR", "TERRACE", "AIR_CONDITIONER").
photosarray<string> | nullList, DetailPublic photo URLs extracted from listing multimedia metadata.
descriptionstring | nullList, DetailPlain-text listing description when published.
urlstring | nullList, DetailCanonical public Habitaclia listing detail URL (…/{uuid}/d).
publicationDatestring | nullList, DetailPublication timestamp when exposed; current Habitaclia embeds omit it, so this field is normally null.
pageinteger | nullList, Detail (from list)Search results page number where the listing was found; null for direct detail seeds.
positioninteger | nullList, Detail (from list)One-based position of the listing on its search results page; null for direct detail seeds.
listUrlstring | nullList, DetailSearch URL where the listing was discovered, or the direct detail URL for detail seeds.
tierstring | nullList, DetailExtraction tier: "list" for a search-card row or "detail" when merged with a fetched detail page.
scrapedAtstring | nullList, DetailISO 8601 UTC timestamp recording when the row was scraped.
detailErrorstring | nullList (fallback)Present only when scrapeDetails: true failed for that listing and the list row was preserved at the listing rate.
recordTypestring | nullRun-noticeSet to "run-notice" on the single uncharged truncation notice; omitted on listing rows.
truncatedAfterinteger | nullRun-noticeTotal number of charged listing rows saved before the truncated run stopped.
reasonstring | nullRun-noticeStop reason copied from OUTPUT.stopReason ("maxItems", "max-charge-reached", "run-time-limit", "proxy-budget", "cloudflare-challenge", "empty-page", or "errors").

Dataset Views & Key-Value Store Summary

  • Dataset Views: Includes a pre-configured Overview (overview) table in Apify Console displaying listingId, title, price, currency, operation, rooms, baths, area_m2, city, neighborhood, agency, tier, and clickable url. Export cleanly to JSON, CSV, Excel, XML, or Parquet.
  • Key-Value Store — OUTPUT: Every run writes a full JSON summary under key OUTPUT containing normalized input, pricing events, seed statuses, siteTotalEntries, pushed counts, listSource, unavailableFields, http stats, robots stats, robotsDisallowedHits, errors, stopReason, and truncated.

Pricing & Apify Store Tier Discounts

This Actor uses Pay-Per-Event (PPE) billing in USD (live pricing verified 2026-11-21) with no run-start fee ($0.00). Apify Store subscription plans automatically apply 5% to 15% tier discounts on every event:

EventDescriptionFreeBronze (5% off)Silver (10% off)Gold (15% off)Platinum (15% off)Diamond (15% off)
listingOne Habitaclia.com listing from a public search page$0.0005 ($0.50/1k)$0.000475 ($0.475/1k)$0.00045 ($0.45/1k)$0.000425 ($0.425/1k)$0.000425 ($0.425/1k)$0.000425 ($0.425/1k)
listing-detailOne listing confirmed from its detail page (replaces listing)$0.0005 ($0.50/1k)$0.000475 ($0.475/1k)$0.00045 ($0.45/1k)$0.000425 ($0.425/1k)$0.000425 ($0.425/1k)$0.000425 ($0.425/1k)

Cost Comparison & Billing Guarantees

  • ~50% lower cost vs. benchmark: On the Free tier, 1,000 Habitaclia listings cost $0.50 ($0.425 on Gold/Platinum/Diamond) with $0.00 start fee—half the $1.00005 per 1,000 results benchmark of trev0n ($0.001 × 1,000 + $0.00005 start fee).
  • No double-charging on details: listing-detail replaces listing for that row; the two events are never charged together on a single listing.
  • Graceful detail fallback: If a detail page fails while scrapeDetails: true, the Actor keeps the list row (with detailError) and charges only listing.
  • Zero charge on non-results: Deduplicated listings, uncharged run-notice rows, and failed runs with zero scraped listings incur $0.00 in event charges.
  • Always check the live Pricing tab in Apify Console for any separately billed platform compute or storage usage.

API & SDK Quickstart

Call Habitaclia.com Real Estate Scraper (Stone_JadeX/habitaclia-com-scraper) programmatically from JavaScript or Python using the official Apify API client libraries.

JavaScript (Node.js) — ApifyClient

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: process.env.APIFY_TOKEN,
});
const run = await client.actor('Stone_JadeX/habitaclia-com-scraper').call({
startUrls: [
{ url: 'https://www.habitaclia.com/alquiler/viviendas/barcelona-provincia/barcelona-capital/s' },
{ url: 'https://www.habitaclia.com/alquiler/viviendas/madrid-provincia/madrid-capital/s' },
],
maxItems: 50,
scrapeDetails: false,
requestDelayMs: 1200,
concurrency: 1,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const listings = items.filter((row) => row.recordType !== 'run-notice');
console.log(`Collected ${listings.length} listings`);
for (const item of listings.slice(0, 5)) {
console.log(item.listingId, item.title, item.price, item.currency, `${item.area_m2} m2`);
}

Python — ApifyClient

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("Stone_JadeX/habitaclia-com-scraper").call(run_input={
"startUrls": [
{"url": "https://www.habitaclia.com/alquiler/viviendas/barcelona-provincia/barcelona-capital/s"},
{"url": "https://www.habitaclia.com/alquiler/viviendas/madrid-provincia/madrid-capital/s"},
],
"maxItems": 50,
"scrapeDetails": False,
"requestDelayMs": 1200,
"concurrency": 1,
})
items = [
row for row in client.dataset(run["defaultDatasetId"]).iterate_items()
if row.get("recordType") != "run-notice"
]
print(f"Collected {len(items)} listings")
for item in items[:5]:
print(item.get("listingId"), item.get("title"), item.get("price"), item.get("currency"), item.get("city"))

FAQ, Compliance & Limitations

This Actor reads only publicly available listing pages and the public window.__INITIAL_PROPS__ JSON payload served in a normal browser session, without logging in or bypassing access controls. To protect personal privacy, phone numbers and email addresses belonging to private owners (isPrivateOwner: true) are automatically stripped, retaining only publicly published commercial contacts of real estate agencies. You are responsible for ensuring your downstream use complies with applicable law (including GDPR) and Habitaclia's terms of use. This is an independent tool and is not affiliated with Habitaclia.

How does the Actor handle robots.txt and login/account pages?

At startup, the Actor fetches https://www.habitaclia.com/robots.txt, parses User-agent: * rules scoped to www.habitaclia.com, and honors any Crawl-delay value higher than requestDelayMs. Standard search list paths (/s and /s/N) and detail pages (/…/{uuid}/d) are parsed without calling disallowed phone-reveal, AJAX, or captcha endpoints (/solicitud/vertelefono*, /phone-validation*). If a requested URL matches a Disallow rule, it is still requested, logged as a warning and counted in robotsDisallowedHits. Login and account URLs are always refused and never requested.

How do proxy fallback and the 5 MB residential cap work?

Direct connections (proxyConfiguration.useApifyProxy: false) are used by default, and residential proxies should never be configured as a default. When an Apify Proxy group is provided:

  • Enable useProxyFallback: true to stay on direct connections until repeated HTTP 403 or 429 responses trigger fallback.
  • When a RESIDENTIAL proxy group is used, proxy transfer is hard-capped at 5 MB per run (not user-configurable). If the projected next request would exceed 5 MB, the run stops cleanly with stopReason: "proxy-budget".
  • Detail requests remain on direct connections by default when a residential proxy group is configured unless allowDetailOnResidential: true is explicitly turned on.

What are the main limitations?

  • Habitaclia.com only: Input validation restricts startUrls strictly to public habitaclia.com search (/…/s, /…/s/N) and detail (/…/{uuid}/d) URLs.
  • Ceiling vs. guarantee: maxItems defaults to 50 and is capped at 2,000 (matching maxPages and startPage). Actual output depends on live search inventory and site availability.
  • Source-omitted metadata: Habitaclia embeds often omit transaction.price.currency (assumed "EUR" for Spanish listings) and do not expose a stable publicationDate field (left null when unpublished).
  • Anti-bot & snapshot semantics: Cloudflare challenges (HTTP 403) stop the run cleanly with stopReason: "cloudflare-challenge". Each run provides a point-in-time snapshot rather than live monitoring.

Changelog

0.1.1 — 2026-11-21

  • Added explicit prefill defaults (startUrls, maxItems, startPage, scrapeDetails, requestDelayMs, concurrency, maxRunSeconds, useProxyFallback, allowDetailOnResidential) and organized .actor/input_schema.json into clear sectionCaption groups.
  • Upgraded README.md to full Store documentation with complete 11-parameter input table + 2 JSON examples, illustrative JSON output, full 49-field dataset reference, live Pay-Per-Event pricing with Apify Store subscription tier discounts (Bronze through Diamond), JavaScript & Python ApifyClient SDK quickstarts, and aligned robots.txt warn-only compliance wording.

0.1.0 — 2026-10-26

  • Initial Habitaclia.com real estate scraper supporting list and optional detail tiers via window.__INITIAL_PROPS__, /s and /s/N pagination, Privacy Policy A contact filtering, fixed 5 MB residential proxy safety cap, and flat $0.0005 PPE pricing with zero start fee.