Habitaclia.com Spain Scraper avatar

Habitaclia.com Spain Scraper

Pricing

from $2.00 / 1,000 results

Go to Apify Store
Habitaclia.com Spain Scraper

Habitaclia.com Spain Scraper

Scrape real estate listings from Habitaclia.com — leading Spanish property portal owned by Adevinta, with deep coverage in Catalonia and major cities. Extract apartments, houses, attics, duplexes, offices, land and parking by region or city, with price (EUR), area (m²), rooms, location and images.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

Logiover

Logiover

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Habitaclia.com Property Scraper

Scrape real estate listings from Habitaclia.com — one of Spain's leading property portals, owned by Adevinta (the same group behind Fotocasa). This Apify actor extracts apartments, houses, attics, duplexes, offices, commercial premises, land and parking spaces from any Spanish region or city, returning clean, structured JSON ready for analysis, dashboards or downstream pipelines.

Built for real estate analysts, property investors, market researchers, data journalists and proptech teams who need reliable, schema-stable Spanish property data without dealing with browsers, captchas or proxy rotation manually.

Why Habitaclia

Habitaclia.com is part of the Adevinta network and has particularly deep coverage in Catalonia (Barcelona, Girona, Tarragona, Lleida) along with strong nationwide inventory in Madrid, Valencia, Sevilla, Málaga, Zaragoza, Bilbao and the Balearic & Canary Islands. Its long-running tenure as a regional Catalan portal means it often surfaces listings that don't appear on smaller national-only sites, making it a valuable complement to Idealista, Fotocasa and Pisos.com data.

What gets scraped

For every listing card on a Habitaclia search page, the actor returns a complete record:

Identity & links

  • adId, detailUrl, title, shortDescription

Transaction & classification

  • transactionTypesale (comprar) or rent (alquiler)
  • propertyTypeapartment | housing | house | attic | duplex | office | commercial | industrial | land | parking

Pricing

  • price (EUR), priceCurrency, pricePerSqm
  • priceDropValue, hasPriceDrop

Specifications

  • areaSqm, usableAreaSqm, terrainAreaSqm
  • rooms, roomsLabel, bathrooms
  • floor, buildingCondition, yearBuilt
  • energyClass, energyConsumption, energyEmissions, orientation

Location (parsed and deduplicated)

  • country (ES), province, city, district, neighborhood, street
  • fullAddress, latitude, longitude

Media & advertiser

  • mainImageUrl, imageUrls, imageCount
  • advertiserId, advertiserName, advertiserUrl, advertiserType (agency / private)

Boolean flags

  • hasElevator, hasParking, hasGarage, hasTerrace, hasBalcony, hasAirConditioning, hasHeating, hasGarden, hasPool, hasStorage, hasFittedWardrobes, hasSeaView, isFurnished, isLuxury, isExterior, isFeatured

Provenance

  • searchUrl, searchTransaction, searchPropertyType, searchLocation, searchKeyword, scrapedAt, labels

Common use cases

  • Market research & price benchmarking — track median €/m² across neighborhoods over time, compare Barcelona Eixample vs Sant Gervasi, study Madrid Centro vs Salamanca premiums
  • Investment due diligence — surface new listings matching specific yield, area, room or location criteria before they hit competitor portals
  • Lead generation for real-estate agencies — feed CRM systems with curated, region-specific inventory
  • Academic & journalistic research — quantify Spanish housing-market dynamics, gentrification, supply shocks
  • Real estate ML training data — collect labeled property records for valuation models, recommendation engines or fraud detection
  • Portfolio monitoring — track price drops on watched listings, alert on new inventory in target zones
  • Supply mapping for property tech — populate map-based proptech apps with current Spanish listings

Input parameters

FieldTypeDefaultDescription
transactionTypeenumsalesale (comprar) or rent (alquiler)
propertyTypeenumapartmentOne of: apartment, housing, house, attic, duplex, office, commercial, industrial, land, parking
locationstringbarcelonaHabitaclia location slug. Lowercase ASCII, underscore for spaces. See examples below.
minPrice, maxPriceintPrice range filter in EUR
minArea, maxAreaintSurface area filter in m²
minRooms, maxRoomsintRoom-count filter
advertiserTypeenumallall, agency, or private
keywordstringSubstring filter on title + description
maxListingsint200Hard cap on saved records
maxPagesint20Maximum search pages to crawl
proxyConfigurationobjectRESIDENTIAL ESApify proxy — RESIDENTIAL with apifyProxyCountry: "ES" strongly recommended

Location slug reference

Common slugs that work directly with Habitaclia:

barcelona madrid valencia sevilla
malaga alicante zaragoza bilbao
palma_de_mallorca girona tarragona lleida
murcia granada cordoba valladolid
las_palmas santa_cruz_de_tenerife san_sebastian

For specific municipalities use their slug too: sant_cugat_del_valles, terrassa, sabadell, mataro, badalona, getafe, alcala_de_henares, etc.

URL convention

Habitaclia uses an offset-based pagination scheme:

PageURL pattern
1https://www.habitaclia.com/{prefix?}{ptype}-{location}.htm
N (N>1)https://www.habitaclia.com/{prefix?}{ptype}-{location}-{N-1}.htm

Where {prefix} is empty for sale or alquiler- for rent. Worked examples:

  • /pisos-barcelona.htm — apartments for sale in Barcelona, page 1
  • /pisos-barcelona-1.htm — same, page 2
  • /alquiler-pisos-madrid.htm — apartments for rent in Madrid
  • /casas-girona-3.htm — houses for sale in Girona, page 4
  • /aticos-palma_de_mallorca.htm — penthouses in Palma de Mallorca

Output

One JSON record per listing, written to the default Apify dataset. Sample:

{
"adId": "10899004377662",
"detailUrl": "https://www.habitaclia.com/comprar-piso-...-i10899004377662.htm",
"title": "Piso en Calle aragó 79. Vea el tour virtual 3d en 4k",
"transactionType": "sale",
"propertyType": "apartment",
"price": 599000,
"priceCurrency": "EUR",
"pricePerSqm": 4792,
"areaSqm": 125,
"rooms": 4,
"bathrooms": 2,
"country": "ES",
"province": "Barcelona",
"city": "Barcelona",
"neighborhood": "La Nova Esquerra de l'Eixample",
"street": "Calle aragó 79",
"fullAddress": "Calle aragó 79, La Nova Esquerra de l'Eixample, Barcelona",
"mainImageUrl": "https://images.habimg.com/imgh/10899-4377662/...jpg",
"scrapedAt": "2026-05-06T11:46:40.892Z"
}

Export the dataset as JSON, CSV, Excel, XML, RSS or HTML directly from the Apify console, or stream it via the Apify API into BigQuery, Snowflake, Postgres or any data warehouse.

Example runs

Barcelona apartments, sale only, capped at 500 records

{
"transactionType": "sale",
"propertyType": "apartment",
"location": "barcelona",
"maxListings": 500,
"maxPages": 35
}

Madrid rentals between 1,000 € and 1,800 €

{
"transactionType": "rent",
"propertyType": "apartment",
"location": "madrid",
"minPrice": 1000,
"maxPrice": 1800,
"maxListings": 200
}

Houses for sale on the Costa Brava, agency-listed only, 3+ bedrooms

{
"transactionType": "sale",
"propertyType": "house",
"location": "girona",
"minRooms": 3,
"advertiserType": "agency",
"maxListings": 1000
}

Office space for rent in Valencia

{
"transactionType": "rent",
"propertyType": "office",
"location": "valencia"
}

Performance & reliability

  • HTTP-only fetching with got-scraping — no headless browser, no Playwright overhead
  • Apify RESIDENTIAL proxy with country pinned to ES for clean access
  • Per-attempt fresh proxy session ID — automatic rotation on 403 / 429 / 503 / short-body responses
  • 6-attempt exponential backoff on transient proxy or upstream failures
  • Pagination loop detection — auto-stops when the same first card repeats across pages
  • Thin-page guard — auto-stops when later pages return fewer than 5 cards (end of inventory)
  • Polite 1.2 s delay between page fetches to stay under rate limits

Typical throughput: 200 listings in roughly 90 seconds on a 1 GB Apify actor instance.

Diagnostic key-value entries

On the first page of every run, the actor writes diagnostic keys to the default key-value store, useful for selector calibration if Habitaclia ever changes its DOM layout:

  • debug_page1_html — raw HTML response of page 1
  • debug_card1_html — outer HTML of the first detected listing card
  • debug_card1_classes — sorted list of every unique CSS class found inside that card
  • debug_card1_parsed — parsed JSON for the first card

FAQ

Does this scraper work without Apify proxy? Habitaclia is hosted in the EU and tolerates clean datacenter traffic for small runs, but RESIDENTIAL ES proxy is strongly recommended for runs above 100 listings. The default input is pre-configured this way.

How fresh is the data? Real-time. Each run fetches live listing pages directly — no caching, no third-party feed.

Can I scrape the full listing detail pages? This actor is optimized for card-level extraction (which already returns 30+ fields per record). Detail-page enrichment (full description, all photos, energy certificate, agency contact, exact GPS) is a planned extension — open an issue if you need it.

What about duplicate listings? The actor deduplicates by adId within a run. Cross-portal deduplication (same property listed on Idealista + Fotocasa + Habitaclia) is your responsibility — match on coordinates, area, price and street.

Does it support custom search URLs? Currently the actor builds URLs from the structured input. Drop a feature request if you need to paste raw Habitaclia search URLs directly.

What does housing mean? Habitaclia's viviendas (housing) bucket combines apartments + houses + attics + duplexes — useful when you want all residential inventory regardless of subtype.

  • Use this actor only for publicly accessible data that you have a lawful basis to collect under GDPR and Spanish data-protection law
  • Respect Habitaclia's Terms of Service and robots.txt; throttle aggressive crawls
  • Personal data (advertiser names, phone numbers) must be handled in accordance with applicable privacy regulations
  • This actor is an independent project and is not affiliated with, endorsed by, or sponsored by Habitaclia.com or Adevinta

Local development

git clone <this-repo>
cd habitaclia-com-scraper
npm install
apify run --purge

Modify src/main.js to adjust selectors or extend extraction. The diagnostic key-value entries make selector recalibration straightforward — inspect debug_card1_html and debug_card1_classes after any failed run.

Changelog

  • 0.1.0 — initial release: card-level extraction, sale/rent, all 10 property types, RESIDENTIAL ES proxy with 6-attempt retry, location parsing with street detection, deduplicated full-address output

License

ISC.