Start free

How to scrape Idealista

Extract typed JSON from Idealista property pages: price, size in m2, rooms, bathrooms, location and listing type, with managed rendering for DataDome.

Site:
idealista.com
Difficulty:
Hard
Rendering:
JavaScript-rendered
Anti-bot:
DataDome, device fingerprint verification, sliding-puzzle CAPTCHA, behavioral and IP analysis

What you can extract from Idealista

These are the fields teams most often pull from idealista.com, and why a hand-written selector for each one tends to break over time.

Field Type Why selectors break
price number The headline price sits in a span like .info-data-price whose class hashes change between deploys, and the value is a localized string such as '320.000 EUR' using dots as thousands separators, so a CSS selector returns text you must still strip and reparse, and price-on-request listings render a word instead of a number.
size_m2 number Surface area is one unlabeled item inside a generic .info-features list shared with rooms and floor, with no stable per-field class, so a positional selector silently grabs the rooms value when a listing omits size, and the 'm2' suffix and Spanish decimal comma must be stripped before it is a usable number.
rooms number Room count appears as 'X hab.' in the same flat .info-features span list as size and floor, ordered differently for plots, garages and rooms-for-rent, so an index-based CSS selector that works on a flat in Madrid maps to the wrong attribute on a parking space or studio with no separate bedroom.
bathrooms number Bathroom count is frequently absent from the summary card and only shown in the detail 'Caracteristicas basicas' block, so a selector targeting the card returns nothing for many listings, and when present it is plain text like '2 baños' with no numeric attribute to read directly.
location string The location combines a neighborhood heading and a breadcrumb trail rendered after JavaScript hydration, with exact street often masked to 'zona' for privacy, so a single CSS selector captures either too little (just the district) or stale server-rendered placeholder text before the client fills it in.
listing_type string Whether a page is venta, alquiler or alquiler de habitacion is encoded in the URL slug and a small badge, not in any consistent labeled element, so a CSS selector cannot reliably distinguish a sale from a long-term rental, and seasonal or transfer listings reuse the same markup with different meaning.

The schema-first approach

Instead of maintaining selectors, you hand Extracto a JSON schema describing the shape you want. Here is a schema that works for Idealista:

{
  "price": "number",
  "size_m2": "number",
  "rooms": "number",
  "bathrooms": "number",
  "location": "string",
  "listing_type": "string"
}
  1. 1

    Describe the Idealista fields you want

    Write a small JSON schema listing the fields to pull from idealista.com (for example price, size_m2, rooms). No CSS selectors or XPath needed.

  2. 2

    Send the URL and schema to Extracto

    POST the Idealista page URL and your schema to the Extracto API. Extracto renders the page in a real browser, handling JavaScript and dynamic content automatically.

  3. 3

    Get schema-validated JSON back

    Extracto returns JSON that matches your schema exactly, validated before it leaves the API, so your pipeline never receives broken or partial data.

Common pitfalls when scraping Idealista

Is it legal to scrape Idealista?

Idealista's terms of service restrict automated access and bulk reuse of its listing content, and the site is one of the most actively defended real-estate portals in Spain, fronted by DataDome. Before extracting anything, read https://www.idealista.com/robots.txt and the Condiciones de Uso, and treat both as binding. Idealista also publishes an official idealista/data research program and a partner API, which is the sanctioned route for licensed datasets. Keep requests to genuinely public sale and rental pages, never to login-gated agency dashboards or personal contact data, pull only the specific fields you need rather than mirroring whole regions, and keep volume modest with conservative rate limiting so you do not affect their servers. Extracto provides managed rendering and a managed anti-bot layer as infrastructure, not a license: you remain responsible for respecting Idealista's ToS, robots.txt and Spanish and EU data-protection rules (GDPR), especially around any personal data such as private-seller phone numbers. When in doubt, prefer the official idealista/data channel or seek written permission.

Extracto follows robots.txt by default and rate-limits politely. You are responsible for compliance with Idealista's terms and applicable law (GDPR, CCPA) in your use case.

Scraping Idealista: FAQ

Can Extracto get past Idealista's DataDome protection?
Every Extracto request runs through a real headless browser plus a managed anti-bot bypass layer with proxies handled for you, which is what makes DataDome-protected pages like Idealista resolve to real content instead of a CAPTCHA challenge. You send the URL and your JSON schema and receive typed JSON. You remain responsible for staying within Idealista's terms of service and robots.txt, keeping request volume modest, and avoiding personal data.
Why is the price or size returned as null on some Idealista listings?
Extracto validates the response against your JSON schema and returns null for any field it cannot read with confidence, instead of inventing a value. On Idealista this happens when a listing shows 'precio a consultar' instead of a number, when a garage or plot has no bathroom or room count, or when surface area is simply not published. A null tells you the data is genuinely absent on that page rather than that extraction failed.
Does Idealista allow scraping its property listings?
Idealista's terms of service restrict automated access and bulk reuse, and the portal is actively defended by DataDome. For licensed datasets the sanctioned route is the official idealista/data program or a partner API. If you do extract public sale and rental pages, read robots.txt first, keep volume modest, avoid login-gated and personal data, and treat Extracto's managed infrastructure as a tool, not as permission to ignore those terms.
How do I separate sale listings from rentals when scraping Idealista?
Idealista encodes the listing type in the URL slug, venta-viviendas for sales and alquiler-viviendas for rentals, rather than in a single reliable on-page label. The most robust approach is to record which slug you requested and let Extracto extract a listing_type field as a string from the page, then reconcile it against the URL. Studios, rooms-for-rent and seasonal lets reuse similar markup, so the URL path is your ground truth.
Can I extract all listings in a city like Madrid in one Extracto call?
No. Extracto takes one URL per call and extracts that page; it is not a crawler and does not follow pagination or 'next' links. To cover a city you enumerate the individual search-result or property URLs you are entitled to access and call the API once per URL. This keeps each request explicit and lets you apply your own rate limiting so you stay within Idealista's terms and avoid loading their servers.