Habitaclia Scraper with Rental Yield & Deal Score – Spain
Pricing
from $0.85 / 1,000 listings
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
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
5 days ago
Last modified
Categories
Features
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:
| City | Gross yield | Median asking price €/m² | Median asking rent €/m²/month | Listings used sale/rent | Temporary rentals excluded |
|---|---|---|---|---|---|
| Valencia | 7.12% | 3,406 | 20.2 | 2,646/1,374 | 25% |
| Barcelona | 6.86% | 5,465 | 31.2 | 7,140/1,051 | 53% |
| Zaragoza | 6.64% | 2,502 | 13.8 | 656/95 | 10% |
| Sevilla | 6.51% | 2,667 | 14.5 | 1,690/334 | 29% |
| Alicante | 6.45% | 2,712 | 14.6 | 2,443/258 | 24% |
| Murcia | 6.41% | 1,933 | 10.3 | 1,489/284 | 9% |
| Madrid | 5.79% | 6,216 | 30.0 | 8,428/3,800 | 31% |
| Las Palmas de Gran Canaria | 5.51% | 3,079 | 14.1 | 651/105 | 26% |
| Málaga | 5.45% | 4,037 | 18.3 | 2,574/264 | 44% |
| Vigo | 5.15% | 3,000 | 12.9 | 621/89 | 14% |
| Palma | 4.90% | 5,246 | 21.4 | 1,479/167 | 34% |
Snapshot of asking prices and rents on 27 November 2026; figures change month to month.
How to use it without code
- Open the Actor in Apify Console.
- Choose the cities and the mode:
listings,yieldReport,scoreListingsorboth. - Click Start.
- Download the results as Excel, CSV or JSON from the Output tab. Yield groups are in the
yieldsdataset, except inyieldReportmode, 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 (
listingrecords,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 (
areaYieldrecords): 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 (
scoredListingrecords): 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 inyieldReportandboth, only the free low-confidence ones inscoreListings, none inlistings) andRUN_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,scoreListingsorboth.bedrooms–"0"(studio),"1","2","3","4+".areaMin,areaMax– flat size in m².maxListingsPerSide– listings for sale and, separately, for rent per city;0is 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,estimatedGrossYieldPctandcomparable, 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 fieldsnulland the reason inestimateNote; 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 arenull. - Flats the portal itself excludes from price comparisons (see Limitations) are returned with
nullanalytics, a flag and a note. - Rows follow the portal's relevance order, with sales and rents interleaved. No yield groups are written and
maxScoredListingsis ignored; the number of rows follows frommaxListingsPerSideand 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
maxListingsPerSidesample), 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
maxListingsPerSidelimits it), so that the comparisons stay fair. - Where it works:
mode: "listings"(sale and rent rows, temporary rentals included) andscoreListings(sale rows; the rent fields are ignored with a warning in the log). Inbothit narrows the scored listings in the same way and leaves the yield groups unchanged.yieldReportignores 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 beforemaxScoredListings. - 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.*.priceFilteredcounts 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:
scoredListingrecords (modesscoreListingsandboth),listingrecords (modelistings), or the yield groups themselves in modeyieldReport. The API call that returns the default dataset directly would otherwise be empty in that mode. yieldsdataset:areaYieldrecords. In modeyieldReporta copy is kept here too, because the Rental yield by district view of the Output tab reads this dataset.- Key-value store:
YIELD_REPORTandRUN_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 isscoredExcludedOutliersinRUN_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 (blockedMessageinRUN_SUMMARY;blockedAtsays where). Cities completed before the stop are delivered and charged; the rest are markedskipped. 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.
| Event | Free | Bronze | Silver | Gold | When |
|---|---|---|---|---|---|
Yield group (area-yield) | $0.03 | $0.0285 | $0.027 | $0.0255 | per areaYield record with high or medium confidence |
Listing or scored listing (scored-listing) | $0.001 | $0.00095 | $0.0009 | $0.00085 | per 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:
| Run | Paid yield groups | Cost | Duration |
|---|---|---|---|
| Barcelona | 29 | $0.87 | about 11 minutes |
| Madrid | 61 | $1.83 | about 12 minutes |
| The 9 other cities in one run | 135 | $4.05 | about 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;updatedAtand thesampleblock 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.