Habitaclia Scraper with Rental Yield & Deal Score – Spain avatar

Habitaclia Scraper with Rental Yield & Deal Score – Spain

Pricing

from $0.85 / 1,000 listings

Go to Apify Store
Habitaclia Scraper with Rental Yield & Deal Score – Spain

Habitaclia Scraper with Rental Yield & Deal Score – Spain

Gross rental yield by district and bedrooms in 11 Spanish cities, plus a deal score, estimated rent and yield for every flat for sale on Habitaclia. Whole-city market, prices in EUR.

Pricing

from $0.85 / 1,000 listings

Rating

0.0

(0)

Developer

Datanest

Datanest

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Categories

Features

Limited permissions

Share

This Actor calculates the price per m² by district and the gross rental yield by district and bedroom count, and gives every flat for sale a deal score, using Habitaclia listings for 11 Spanish cities: Madrid, Barcelona, Valencia, Zaragoza, Sevilla, Málaga, Murcia, Palma, Las Palmas de Gran Canaria, Alicante and Vigo. All prices are in EUR. Use it for rental yield in Spain, price per m² by district and spotting flats priced below their neighbourhood, whether you are a buy-to-let investor, an analyst or an AI agent. One run reads the flats for sale and for long-term rent and returns:

  • Gross rental yield per district and bedroom count, with medians, quartiles and sample sizes.
  • A 0–100 deal score for every listing for sale, against the median price per m² of comparable flats.
  • Every listing with our analytics (mode listings): deal score, estimated monthly rent and estimated gross yield for flats for sale, rent per m² for flats for rent.
  • Everything in EUR. The portal lists Spain only, so there is no currency conversion.

Asking prices and advertised rents, honestly labelled. Gross, not net.

Example output

City-level results of runs on the Apify platform on 27 November 2026 (mode yieldReport, whole market, Spanish residential proxy), highest gross yield first:

CityGross yieldMedian asking price €/m²Median asking rent €/m²/monthListings used sale/rentTemporary rentals excluded
Valencia7.12%3,40620.22,646/1,37425%
Barcelona6.86%5,46531.27,140/1,05153%
Zaragoza6.64%2,50213.8656/9510%
Sevilla6.51%2,66714.51,690/33429%
Alicante6.45%2,71214.62,443/25824%
Murcia6.41%1,93310.31,489/2849%
Madrid5.79%6,21630.08,428/3,80031%
Las Palmas de Gran Canaria5.51%3,07914.1651/10526%
Málaga5.45%4,03718.32,574/26444%
Vigo5.15%3,00012.9621/8914%
Palma4.90%5,24621.41,479/16734%

Snapshot of asking prices and rents on 27 November 2026; figures change month to month.

How to use it without code

  1. Open the Actor in Apify Console.
  2. Choose the cities and the mode: listings, yieldReport, scoreListings or both.
  3. Click Start.
  4. Download the results as Excel, CSV or JSON from the Output tab. Yield groups are in the yields dataset, except in yieldReport mode, where they are in the default dataset.

The first run with the default example (prefill: Vigo, the whole market) makes about 35 requests and takes under a minute.

What you get

  • Listings (listing records, mode: "listings"): every flat for sale and for rent, one row each, with our analytics on the sale rows. The cheapest way to use the Actor (see Listings mode).
  • Yield by district (areaYield records): for every district × bedroom group, the median sale price per m², the median monthly rent per m², quartiles, the number of listings behind each number, and the gross yield with a range. Groups with too few listings fall back to the city level and say so (groupLevel, confidence).
  • Scored listings (scoredListing records): for every flat for sale, a 0–100 deal score, its discount against comparable flats, an estimated monthly rent and gross yield, and a link to the listing. Sorted best deal first.
  • Sample transparency: every yield record reports how recent its sample is (median age, oldest listing) and what share of the portal's listings it covers (sample).
  • Two datasets: scored listings in the default dataset, yield groups in a second dataset called yields (see Where the results are).
  • Two reports in the key-value store: YIELD_REPORT (yield groups per city: the delivered ones in yieldReport and both, only the free low-confidence ones in scoreListings, none in listings) and RUN_SUMMARY (what was fetched, rejected and charged, per city and market side).

Cities and coverage

Madrid, Barcelona, Valencia, Zaragoza, Sevilla, Málaga, Murcia, Palma, Las Palmas de Gran Canaria, Alicante, Vigo. The portal serves at most 10,000 results per list. A city with a longer list (Madrid, Barcelona) is read district by district, and a district that is still too long barrio by barrio; RUN_SUMMARY reports how much of the portal's total this reached (districtCoverage, share).

The portal's coverage is strongest in Barcelona and Madrid. In smaller cities there are fewer listings per district, so many groups are compared at the city level (groupLevel: "city_bedrooms" or "city"), which lowers confidence.

In the runs of 27 November 2026 every list of all 11 cities was read to its last page, with 0 blocked requests. Madrid and Barcelona were read through their districts (21 and 10); in both, the district totals added up to the city's number of listings.

Quick start

Open the Actor and press Start: the form opens with Vigo, the smallest city, for a quick first run (whole market, mode both). A run without any input, for example from the API or an AI agent, uses Vigo too. To analyse other cities, choose them in the Cities field. Every input field has a short description in the form.

Main settings:

  • cities – one or more of the 11 cities.
  • mode – listings, yieldReport, scoreListings or both.
  • bedrooms – "0" (studio), "1", "2", "3", "4+".
  • areaMin, areaMax – flat size in m².
  • maxListingsPerSide – listings for sale and, separately, for rent per city; 0 is the whole market.
  • minScore, maxScoredListings – keep only the best deals.
  • minSalePrice, maxSalePrice, minMonthlyRent, maxMonthlyRent – return only listings in your price range (see Price filter).
  • onlyNewOrChanged, watchlistName – monitoring.

Listings mode

mode: "listings" returns one row per listing, for sale and for rent, with recordType: "listing" and a transaction field (sale or rent).

  • Sale rows carry dealScore, discountVsMedianPct, estimatedMonthlyRentEur, estimatedGrossYieldPct and comparable, which names the groups the numbers come from. A flat with no comparable group (a city with too few listings) is still returned, with these fields null and the reason in estimateNote; if you narrowed the selection (area, bedrooms or a higher minimum sample; the price filter does not count, as it leaves comparisons unchanged), that note refers to the selected filters instead of the city.
  • Rent rows carry monthlyRentPerM2Eur; the sale fields are null.
  • Flats the portal itself excludes from price comparisons (see Limitations) are returned with null analytics, a flag and a note.
  • Rows follow the portal's relevance order, with sales and rents interleaved. No yield groups are written and maxScoredListings is ignored; the number of rows follows from maxListingsPerSide and the exclusions.

Example sale row (values are illustrative):

{
"recordType": "listing",
"transaction": "sale",
"source": "habitaclia",
"listingId": "00000000-0000-0000-0000-000000000000",
"url": "<link to the listing on the portal>",
"country": "ES",
"city": "Vigo",
"district": "Centro Urbano",
"bedrooms": 2,
"areaM2": 78.0,
"isPrimaryMarket": false,
"priceEur": 210000,
"pricePerM2Eur": 2692,
"groupMedianPricePerM2Eur": 3268,
"dealScore": 81,
"discountVsMedianPct": 17.6,
"estimatedMonthlyRentEur": 960,
"estimatedGrossYieldPct": 5.49,
"saleGroupLevel": "district",
"rentGroupLevel": "district",
"confidence": "high",
"updatedAt": "2026-11-20",
"flags": [],
"estimateNote": null,
"monthlyRentPerM2Eur": null,
"comparable": {
"sale": {"groupLevel": "district", "district": "Centro Urbano", "bedrooms": "2", "saleCount": 88, "confidence": "high"},
"rent": {"groupLevel": "district", "district": "Centro Urbano", "bedrooms": "2", "rentCount": 28}
}
}

Price filter

Four optional inputs, whole EUR, bounds included: minSalePrice and maxSalePrice for listings for sale, minMonthlyRent and maxMonthlyRent for rentals. Leave a field empty for no limit.

{"cities": ["valencia"], "mode": "listings", "maxSalePrice": 300000, "maxMonthlyRent": 1500}
  • Only the returned rows change. Medians, comparable groups, deal scores and rent and yield estimates are still computed from the whole market of the city (or your maxListingsPerSide sample), including the listings the filter leaves out.
  • The filter does not shorten a run: the Actor still reads the whole market of each city (unless maxListingsPerSide limits it), so that the comparisons stay fair.
  • Where it works: mode: "listings" (sale and rent rows, temporary rentals included) and scoreListings (sale rows; the rent fields are ignored with a warning in the log). In both it narrows the scored listings in the same way and leaves the yield groups unchanged. yieldReport ignores all four with a warning.
  • Filtered rows are not returned, not charged and not recorded by monitoring. The filter applies after the outlier exclusion and minScore, and before maxScoredListings.
  • Nothing matches: the run succeeds with no listing rows, its status message names the price filter, and no listing rows are charged. In both, the yield groups are still delivered and charged.
  • A minimum greater than its maximum is an input error: the run stops before its first request.
  • RUN_SUMMARY.cities.*.priceFiltered counts the rows left out per side (sale, rent).

A measured example of a filtered run is in What a report costs.

Example inputs

Whole market of one city, every listing with analytics:

{"cities": ["vigo"], "mode": "listings"}

Yield report for two cities:

{"cities": ["valencia", "malaga"], "mode": "yieldReport"}

Underpriced two-bedroom flats in Barcelona:

{"cities": ["barcelona"], "mode": "scoreListings", "bedrooms": ["2"], "minScore": 80, "maxScoredListings": 200}

Where the results are

  • Default dataset: scoredListing records (modes scoreListings and both), listing records (mode listings), or the yield groups themselves in mode yieldReport. The API call that returns the default dataset directly would otherwise be empty in that mode.
  • yields dataset: areaYield records. In mode yieldReport a copy is kept here too, because the Rental yield by district view of the Output tab reads this dataset.
  • Key-value store: YIELD_REPORT and RUN_SUMMARY.

For AI agents

Call the Actor data-nest/habitaclia-rental-yield from an agent or over MCP with a small input, for example one city in yield-report mode:

{"cities": ["vigo"], "mode": "yieldReport"}

The result is a list of areaYield records in the default dataset, one per district and bedroom group, with city, district, bedrooms, groupLevel, confidence, saleCount, rentCount, salePricePerM2Eur.median, rentPerM2MonthlyEur.median and grossYieldPct. Set a maximum charge per run to cap the cost.

Output

areaYield – one record per district and bedroom group (bedrooms is "0", "1", "2", "3", "4+", or "all" for the whole district or city):

{
"recordType": "areaYield",
"country": "ES",
"city": "Vigo",
"district": "Centro Urbano",
"bedrooms": "2",
"groupLevel": "district",
"confidence": "high",
"saleCount": 88,
"rentCount": 28,
"salePricePerM2Eur": {"median": 3268, "p25": 2900, "p75": 3700},
"rentPerM2MonthlyEur": {"median": 14.4, "p25": 12.9, "p75": 16.0},
"grossYieldPct": 5.29,
"grossYieldRangePct": [4.2, 6.6],
"priceBasis": "asking",
"sample": {
"sale": {"medianDaysSinceUpdate": 28.0, "maxDaysSinceUpdate": 113, "share": 1.0, "fetched": 780, "totalItems": 799, "typologyTiles": 19, "reachableItems": 780},
"rent": {"medianDaysSinceUpdate": 15.0, "maxDaysSinceUpdate": 113, "share": 1.0, "fetched": 117, "totalItems": 117, "typologyTiles": 0, "reachableItems": 117}
},
"sources": ["habitaclia"],
"computedAt": "2026-11-27T11:09:13Z"
}

scoredListing – one record per flat for sale:

{
"recordType": "scoredListing",
"source": "habitaclia",
"listingId": "00000000-0000-0000-0000-000000000000",
"url": "<link to the listing on the portal>",
"country": "ES",
"city": "Vigo",
"district": "Centro Urbano",
"bedrooms": 2,
"areaM2": 78.0,
"isPrimaryMarket": false,
"priceEur": 210000,
"pricePerM2Eur": 2692,
"groupMedianPricePerM2Eur": 3268,
"dealScore": 81,
"discountVsMedianPct": 17.6,
"estimatedRentMonthlyEur": 960,
"grossYieldPct": 5.49,
"saleGroupLevel": "district",
"rentGroupLevel": "district",
"confidence": "high",
"updatedAt": "2026-11-20",
"flags": [],
"estimateNote": null,
"changeType": null,
"priceCutPct": null
}

updatedAt is the date the portal last modified the listing, not the date it was published: the portal exposes no publication date. flags can contain large_discount (more than 30% below the group median), needsRenovation, suspectBedrooms, and the portal's exclusions bareOwnership, occupied and auction. In mode listings, a rent row flagged temporary_rent is a temporary (seasonal) rental: it is returned and charged like any other row, its estimateNote says so, and its rent is not used in any median or estimate. identicalListingIds lists listings merged into this one because price, area, bedrooms, district and property type are identical.

How the numbers are computed

  • Groups. Listings are grouped by city, district and bedroom count (0 for a studio, 1, 2, 3, 4+). Sale prices and rents fall back to the city level independently: a listing's price is compared with at least 15 comparable flats for sale, and its rent is estimated from at least 10 comparable rentals. Each record says which level it used.
  • Gross yield = 12 × median monthly rent per m² ÷ median sale price per m². The range uses the quartiles (low rent against high price, and the reverse).
  • Deal score. A listing's price per m² is compared with the median of its group on a log scale, divided by the group's typical spread (median absolute deviation). 50 means priced at the median; about 84 is one typical deviation cheaper; about 98 is two.
  • Estimated rent for a listing = median rent per m² of its group × the flat's area.
  • Prices are asking prices and advertised rents in EUR, and rents are long-term rentals only: temporary (seasonal) rentals, marked by a flag of the portal, are excluded from the rent medians and marked temporary_rent. Community fees are not counted as rent.
  • Asking-price yields are typically higher than yields based on signed contracts.
  • Bedrooms, not rooms. The portal counts bedrooms; 0 is a studio.

Why the numbers can be trusted

  • Sample sizes are shown. Every group carries its listing counts and a confidence level; thin groups fall back to the city level instead of producing noisy numbers.
  • Cleaning is explicit. Duplicates, hidden prices, unknown bedroom counts and implausible sizes are removed and counted in RUN_SUMMARY. Repeated rent listings for the same flat are counted once, and identical sale listings (same district, property type, bedrooms, area and price) are merged into one. The cheapest 1% and the most expensive 1% of each city's listings by price per m² are dropped before scoring. Separately, flat listings priced more than 40% below their group's median are not returned and not charged; their number is scoredExcludedOutliers in RUN_SUMMARY.
  • Portal exclusions stay out of the medians. Occupied flats, bare ownership and auctions are priced differently from normal sales, so the portal excludes them from its own price comparisons and so do we.
  • No personal data. Contact details, advertiser names, descriptions and photos are dropped when a listing is read; results contain our numbers and a link.
  • Proxy. By default every request, from the first one, goes through Apify Proxy's residential group with addresses in Spain, in one proxy session for the whole run. You can change this in the proxy configuration.
  • Loud failures. All retries stay in the same proxy session. If the portal answers with HTTP 403, the Actor repeats the request up to 3 times, after 15, 30 and 60 seconds (about 2 minutes in total). After HTTP 429 it repeats it up to 5 times, with growing pauses (about 8 minutes in total; longer if the answer asks for it with Retry-After, at most 5 minutes per pause). Then the run stops. A captcha or another challenge page, or a page without the expected listing data, stops the run at once. Network and proxy errors are retried up to 3 times; if they persist, that city is reported as failed (if this happens while reading robots.txt, the run fails). The Actor never switches proxy sessions, solves captchas or works around blocks. A stop is reported with a clear message (blockedMessage in RUN_SUMMARY; blockedAt says where). Cities completed before the stop are delivered and charged; the rest are marked skipped. If nothing was completed, the run fails and none of the Actor's result events are charged; Apify charges only its standard start fee of $0.00005.

Monitoring

Set onlyNewOrChanged: true and schedule the Actor (for example daily). Each run returns only listings that are new, or at least 1% cheaper, since the last run with the same watchlistName, marked changeType: "new" or "priceCut" with priceCutPct. Use one schedule per watchlist name. Unchanged listings are neither returned nor charged.

The monitoring memory is a named key-value store (habitaclia-rental-yield-state) in your account. If it cannot be opened or written, the run does not fail: it returns the listings without change detection (changeType is null), and RUN_SUMMARY.monitoring.warning says what happened.

For schedules we recommend mode: "scoreListings": with both, every scheduled run also returns (and charges) the full set of yield groups. Because the portal does not show when a listing was first published, firstSeenAt is set by the first run that sees it.

Pricing

Pay per result. Prices are for the Free plan; they are lower on higher Apify plans, and Platinum and Diamond pay the Gold price.

EventFreeBronzeSilverGoldWhen
Yield group (area-yield)$0.03$0.0285$0.027$0.0255per areaYield record with high or medium confidence
Listing or scored listing (scored-listing)$0.001$0.00095$0.0009$0.00085per listing record (mode listings) or scoredListing record

That is $1 per 1,000 listings on the Free plan. City-level context records (low confidence) are free. Apify adds its own start event of $0.00005 per run.

Measured on the Apify platform on 27 November 2026: the whole market of Vigo in mode listings, 695 rows, cost $0.70 (Free plan price, platform usage included).

To spend less: mode: "yieldReport" returns only the yield groups; maxScoredListings, minScore, bedrooms and the price filter reduce the number of scored listings; and you can set a maximum charge per run. When that maximum is close, the run stops cleanly, staying below it, after delivering free city-level context, the yield groups and the best-scored listings first.

Very low maximum charge. The Actor collects the whole sample before it returns any result. If your maximum charge per run is too low to justify that, the run uses a smaller sample instead: the first city in your list and 360 listings per side. The run still succeeds, never charges an event type you did not ask for, and RUN_SUMMARY shows budgetReduced: true. With an active price filter the sample is never reduced: the run reads the requested scope and stops writing rows at your maximum charge.

What a report costs

A report (mode: "yieldReport") is charged only for yield groups: $0.03 per area-yield event at the Free plan price. No scored-listing events are charged in this mode, and city-level context groups (low confidence) are free.

Measured on the Apify platform on 27 November 2026, whole market, mode yieldReport, Free plan price, platform usage included:

RunPaid yield groupsCostDuration
Barcelona29$0.87about 11 minutes
Madrid61$1.83about 12 minutes
The 9 other cities in one run135$4.05about 16 minutes

Vigo, mode listings with maxSalePrice 200000 and maxMonthlyRent 900 (run on 29 November 2026): 159 rows (108 sale + 51 rent) = 159 scored-listing events = $0.16 at the Free plan price. Deal scores and rent estimates were still computed from the whole Vigo market.

Limitations

  • Asking prices, not transaction prices. Gross yield, not net (no taxes, vacancy, maintenance).
  • Resale flats only. The portal's development tiles ("obra nueva") are projects, not listings: they have no single price or area, so they are counted in RUN_SUMMARY (typologyTiles) and left out of medians and results. The numbers describe individually listed flats; new builds are often more expensive per m², so the yield of the whole market may be somewhat lower.
  • Portal order, not newest first. The portal lists results by its own relevance and offers no sort by date that this Actor may use. A limited sample (maxListingsPerSide) is therefore not the newest listings; updatedAt and the sample block show how recent it is.
  • Bedrooms instead of rooms. Groups use the portal's bedroom count (0 = studio), which differs from the room counts of other markets.
  • Coverage differs by city. The portal is strongest in Barcelona and Madrid. In smaller cities many groups are compared at the city level and carry a lower confidence.
  • Portal exclusions. Flats with bare ownership, occupied flats and auctions are left out of the medians and returned (mode listings) only with a flag and without analytics.
  • No information about the flat's condition beyond the portal's status: a cheap listing may need renovation (needsRenovation).
  • Identical listings are merged. Different flats in one building with the same property type, price, area and bedrooms can be merged into one record; the merged IDs are listed in identicalListingIds.
  • Spain only, one portal.

FAQ

What does confidence mean? high: compared within the district with at least 40 sale listings; a city × bedroom count or whole-city comparison is also high when at least 80% of the city's listings were fetched and both sides have enough listings. medium: district with fewer listings, or city × bedroom count. low: whole-city comparison.

Why does a listing score 100 or 0? Its price per m² is far below or above its group's median. Check the listing: very low prices often mean a renovation case, a share of a flat or a data error.

Why is firstSeenAt empty? It is filled only in monitoring runs.

Can I get the newest listings only? Use monitoring (onlyNewOrChanged) on a schedule: the portal does not allow sorting by date.

Data sources and responsible use

  • Data comes from Habitaclia search-result pages only, which the portal's robots.txt allows; the Actor checks it at the start of every run and stops if a needed path is forbidden. Listing detail pages are never opened.
  • At most one request per second.
  • No personal data is collected or stored; each result links to the original listing instead of copying it.
  • This Actor is independent and not affiliated with or endorsed by Habitaclia.