# Habitaclia Scraper: Spain Property Listings (`kareninatech/habitaclia-scraper`) Actor

Scrape Habitaclia.com property listings (inmuebles) in Spain from a URL or filters. Extract price, EUR/m², price drops, energy certificate, amenities, coordinates, agency contacts, zone price comparison, rental yield estimate, risk flags, radius search, and monitor mode. Export JSON, CSV or Excel.

- **URL**: https://apify.com/kareninatech/habitaclia-scraper.md
- **Developed by:** [Karen Gisela Gallegos Aguilar](https://apify.com/kareninatech) (community)
- **Categories:** Real estate, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Habitaclia Scraper: Spain property listings API

Use this Habitaclia API alternative to scrape Habitaclia.com listings (inmuebles en venta y alquiler) in Spain and export JSON, CSV or Excel.

Looking for a flat in Barcelona, tracking rents in Girona, or hunting for investment deals in Catalonia? This scraper gets you clean Habitaclia.com data, and it also tells you **if a listing is cheap for its zone**, **what it could earn as a rental**, and **if the ad hides a risk** like an okupa, an auction, or a tenant inside.

Paste an `input_url` from your browser after filtering on Habitaclia (great for people), or use structured filters such as operation, property type, location, price, bedrooms, bathrooms, and surface (great for AI agents). When `input_url` is set, it overrides the filters. You get up to 1000 listings per run as CSV, Excel, or JSON.

#### Perfect for...

- **Investors:** Find listings priced below their district median and check the estimated gross rental yield in one run.
- **Home buyers and renters:** Watch new listings and price drops near your work, school, or the beach with a radius search.
- **Real estate agencies:** Track competitor stock and get agency contact data for professional listings.
- **Market research:** Get a ready-made market report with median price, EUR per m2, and price drop share per district.
- **Data analysts:** Download flat snake_case rows ready for spreadsheets, dashboards, or models.
- **AI agents and workflows:** Simple structured input and clean output for LangChain, CrewAI, n8n, Make, and MCP clients.

#### Why you'll love this scraper

- 📉 **Zone price comparison:** Every listing gets `zone_median_price_per_m2`, `price_vs_zone_pct`, and a `deal_label` (`well_below_zone` ... `well_above_zone`). It compares each listing with the other listings of the same district (or city) found in the run.
- 💶 **Rental yield estimate:** Turn on `estimate_rental_yield` and, for sale listings, the Actor also reads a small sample of rentals in the same area. You get `est_monthly_rent` and `gross_rental_yield_pct`. The rent sample rows are not saved and not charged.
- ⚠️ **Investor risk flags:** The Actor reads the title and description (Spanish and Catalan) and flags `occupied` (okupa), `auction`, `bare_ownership`, `rented_with_tenant`, `needs_renovation`, `social_housing` (VPO), `no_visits`, and `cash_only`. Use `exclude_risky` to drop them.
- 📍 **Radius search:** Give a center point (`center_lat`, `center_lng`) and get `distance_km` on every listing. Add `radius_km` to keep only nearby homes.
- 🏷️ **Price drop details:** `price_reduced_by`, `original_price`, and `price_drop_pct`, plus sorting by biggest price drop.
- 🔔 **Monitor mode:** Schedule the same search and get only new or price-changed listings, with `previous_price`, `price_change`, `first_seen_at`, and `days_tracked`.
- 📊 **Market report:** Each run saves a `MARKET_REPORT` record with medians per city and district.
- 🏙️ **Many places in one run:** Add several cities or provinces in `locations`. `max_properties` is shared fairly between them.
- ⚡ **Fast and cheap:** No browser. Habitaclia sends the data inside each results page, so 29 complete listings cost one request.
- 🔋 **Rich data out of the box:** Energy certificate (rating, kWh/m2, CO2), 15 amenity flags, floor, condition, construction year, coordinates, all photos, and agency phone, email, and website for professional listings.

#### What's inside the data?

**Core**

- `id`, `reference`, `title`, `url`, `short_url`, `operation` (sale or rent), `property_type`, `property_subtype`, `is_new_build`, `promotion_name`

**Pricing**

- `price`, `currency`, `price_period` (month for rentals), `price_per_m2`, `is_price_reduced`, `price_reduced_by`, `original_price`, `price_drop_pct`

**Specs**

- `rooms`, `bathrooms`, `surface_m2`, `land_area_m2`, `terrace_m2`, `floor` (number), `floor_label`, `construction_year`, `condition`, `orientation`, `heating`, `hot_water`

**Energy certificate**

- `energy_certificate_status`, `energy_rating`, `energy_consumption_kwh_m2`, `emissions_rating`, `emissions_kg_co2_m2`

**Amenities**

- `has_elevator`, `has_parking`, `has_terrace`, `has_balcony`, `has_pool`, `has_garden`, `has_air_conditioning`, `has_heating`, `has_storage_room`, `has_doorman`, `is_furnished`, `has_equipped_kitchen`, `is_exterior`, `has_sea_view`, `is_wheelchair_accessible`, plus the `amenities` and `tags` lists. `true` means yes, `false` means the listing says no, and `null` means unknown.

**Location**

- `address`, `street`, `street_number`, `neighborhood`, `district`, `city`, `comarca`, `province`, `region`, `zip_code`, `latitude`, `longitude`, `location_precision` (`exact`, `street`, or `zone`), `distance_km`

**Description and media**

- `description_snippet` (always), `description` (optional), `main_image`, `images`, `image_count`, `video_count`, `has_virtual_tour`, `floor_plan_count`

**Advertiser**

- `advertiser_type` (professional or private), `agency_name`, `agency_legal_name`, `agency_id`, `agency_url`, `agency_website`, `agency_logo`, `agency_phone`, `agency_email`, `is_opportunity`, `is_premium`

**Investor insights**

- `zone_median_price_per_m2`, `zone_level`, `zone_sample_size`, `price_vs_zone_pct`, `deal_label`
- `rent_median_per_m2`, `rent_sample_level`, `rent_sample_size`, `est_monthly_rent`, `gross_rental_yield_pct` (when `estimate_rental_yield` is on)
- `risk_flags`, `has_risk_flags`

**Monitor and meta**

- `monitor_status` (`new` or `changed`), `previous_price`, `price_change`, `first_seen_at`, `days_tracked`, `updated_at`, `source`, `search_url`, `scraped_at`

#### Sort options

Use `sort_by` (ignored when `input_url` is set, because the URL has its own order):

| Value | Order |
|---|---|
| empty | Relevance (Habitaclia default) |
| `newest` | Newest listings first (best for monitor mode) |
| `price_asc` | Price, low to high |
| `price_desc` | Price, high to low |
| `price_drop` | Biggest price drop first |

#### Quick start

**Option A. Input URL (great for people)**

1. Open [habitaclia.com](https://www.habitaclia.com), search a place, and apply your filters.
2. Copy the results URL from the address bar (it ends in `/s`, sometimes with `?` and filters).
3. Paste it into `input_url`.
4. Set `max_properties` and click Start.

**Option B. Structured filters (great for AI agents)**

1. Leave `input_url` empty.
2. Pick `operation`, `property_type`, and `location` (for example `Barcelona`, `Sant Cugat del Vallès`, or `girona-provincia`).
3. Add any price, bedroom, bathroom, or surface filters.
4. Turn on the investor options you want, set `max_properties`, and click Start.

#### Tech details for developers

**Input example (investor search)**

```json
{
  "operation": "comprar",
  "location": "Valencia",
  "locations": ["girona-provincia"],
  "min_rooms": 2,
  "max_price": 350000,
  "estimate_rental_yield": true,
  "exclude_risky": true,
  "sort_by": "newest",
  "max_properties": 200
}
```

**Input example (radius search)**

```json
{
  "operation": "alquiler",
  "location": "Barcelona",
  "center_lat": 41.3874,
  "center_lng": 2.1686,
  "radius_km": 3,
  "max_price": 1800,
  "max_properties": 100
}
```

**Input example (URL + monitor mode on a schedule)**

```json
{
  "input_url": "https://www.habitaclia.com/comprar/viviendas/barcelona-provincia/barcelona-capital/s?sortBy=NEWEST&maxPrice=500000",
  "monitor_mode": true,
  "monitor_key": "bcn-under-500k",
  "max_properties": 100
}
```

**Output example** (contact data replaced)

```json
{
  "id": "20041ca2-975d-424a-84a9-548be837196f",
  "reference": "I-04709V-W-04709V",
  "title": "Bonita vivienda en La Pechina",
  "url": "https://www.habitaclia.com/comprar/planta-intermedia/extramurs/valencia-capital/20041ca2-975d-424a-84a9-548be837196f/d",
  "operation": "sale",
  "property_type": "flat",
  "property_subtype": "flat",
  "is_new_build": false,
  "promotion_name": null,
  "price": 290000,
  "currency": "EUR",
  "price_period": null,
  "price_per_m2": 4142.86,
  "is_price_reduced": true,
  "price_reduced_by": 10000,
  "original_price": 300000,
  "price_drop_pct": 3.3,
  "rooms": 2,
  "bathrooms": 1,
  "surface_m2": 70,
  "land_area_m2": null,
  "terrace_m2": null,
  "floor": 1,
  "floor_label": "1st",
  "construction_year": 1930,
  "condition": "Good",
  "orientation": null,
  "heating": null,
  "hot_water": null,
  "energy_certificate_status": "available",
  "energy_rating": "E",
  "energy_consumption_kwh_m2": 88,
  "emissions_rating": "D",
  "emissions_kg_co2_m2": 15,
  "has_elevator": false,
  "has_parking": false,
  "has_terrace": null,
  "has_balcony": false,
  "has_pool": false,
  "has_garden": false,
  "has_air_conditioning": true,
  "has_heating": null,
  "has_storage_room": null,
  "has_doorman": null,
  "is_furnished": true,
  "has_equipped_kitchen": true,
  "is_exterior": true,
  "has_sea_view": null,
  "is_wheelchair_accessible": null,
  "amenities": [
    "equipped_kitchen",
    "home_appliances",
    "furnished",
    "air_conditioner"
  ],
  "tags": [
    "is_exterior"
  ],
  "address": "C. del Norte 3",
  "street": "C. del Norte",
  "street_number": "3",
  "neighborhood": "La Petxina",
  "district": "Extramurs",
  "city": "Valencia Capital",
  "comarca": "Valencia, Zona de",
  "province": "Valencia",
  "region": "Comunitat Valenciana",
  "zip_code": "46008",
  "latitude": 39.47524249089419,
  "longitude": -0.391021600413751,
  "location_precision": "zone",
  "description_snippet": "E&V presenta esta bonita y acogedora vivienda situado en la primera planta de un edificio sin ascensor, en una ubicación privilegiada. Esta vivienda combina el encanto de los elementos originales con el confort y el diseño moderno, creando un ambiente único y lleno de personalida",
  "description": null,
  "main_image": "https://static.fotocasa.es/images/ads/c2874d19-3e15-4632-9f01-b74e476e8dee?rule=original",
  "images": [
    "https://static.fotocasa.es/images/ads/c2874d19-3e15-4632-9f01-b74e476e8dee?rule=original",
    "https://static.fotocasa.es/images/ads/5a5f4f42-43ed-443d-b5ae-b0a918e368ab?rule=original",
    "..."
  ],
  "image_count": 29,
  "video_count": 0,
  "has_virtual_tour": true,
  "floor_plan_count": 0,
  "advertiser_type": "professional",
  "agency_name": "Engel & Völkers València",
  "agency_id": "5953",
  "agency_url": "https://www.habitaclia.com/inmobiliaria/engel-volkers-valencia/",
  "agency_website": "https://www.engelvoelkers.com/es-es/valencia/?utm_source=Fotocasa_Minisite&utm_medium=Referral&utm_content=valencia&utm_campaign=Portals",
  "agency_phone": "+34 600 000 000",
  "agency_email": "info@agency.example",
  "is_opportunity": true,
  "is_premium": true,
  "updated_at": "2026-10-30T11:25:12.2558739+01:00",
  "source": "search",
  "scraped_at": "2026-11-09T12:45:11.467Z",
  "distance_km": null,
  "risk_flags": [],
  "has_risk_flags": false,
  "monitor_status": null,
  "previous_price": null,
  "price_change": null,
  "first_seen_at": null,
  "days_tracked": null,
  "zone_median_price_per_m2": 3113.21,
  "zone_level": "district",
  "zone_sample_size": 5,
  "price_vs_zone_pct": 33.1,
  "deal_label": "well_above_zone",
  "rent_median_per_m2": 17.5,
  "rent_sample_level": "city",
  "rent_sample_size": 84,
  "est_monthly_rent": 1225,
  "gross_rental_yield_pct": 5.07
}
```

**Market report** (key-value store record `MARKET_REPORT`, real numbers from a 50-listing Barcelona test run)

```json
{
  "listings": 50,
  "zones": [
    { "zone": "Barcelona Capital", "operation": "sale", "listings": 50, "median_price": 457500, "median_price_per_m2": 5520.84, "median_surface_m2": 93, "price_reduced_share_pct": 28, "median_gross_rental_yield_pct": 5.79 },
    { "zone": "Barcelona Capital / Ciutat Vella", "operation": "sale", "listings": 19, "median_price": 395000, "median_price_per_m2": 5067.8, "median_surface_m2": 85, "price_reduced_share_pct": 31.6, "median_gross_rental_yield_pct": 6.33 }
  ],
  "rent_sample_zones": [{ "zone": "Barcelona Capital / Eixample", "samples": 17, "median_rent_per_m2": 25.45 }]
}
```

#### Input reference

| Field | Type | Default | Description |
|---|---|---|---|
| `input_url` | string | empty | Habitaclia search or listing URL. Overrides all filters. |
| `start_urls` | array | empty | More search or listing URLs for the same run. |
| `operation` | string | `comprar` | `comprar` (buy) or `alquiler` (rent). |
| `property_type` | string | `viviendas` | `viviendas`, `oficinas`, `locales_comerciales`, `aparcamientos`, `industriales`, `terrenos_y_solares`, `inversiones`. |
| `location` | string | `barcelona` | City, town, or province. Plain names work. Use `girona-provincia` for a whole province, or a path like `barcelona-provincia/barcelona-capital/eixample`. |
| `locations` | array | empty | More places with the same filters. |
| `min_price` / `max_price` | integer | empty | Price range in EUR (monthly rent for rentals). |
| `min_rooms` / `max_rooms` | integer | empty | Bedroom range. |
| `min_bathrooms` | integer | empty | Minimum bathrooms. |
| `min_surface` / `max_surface` | integer | empty | Built surface range in m2. |
| `new_build_only` | boolean | `false` | Only new builds (obra nueva). |
| `private_sellers_only` | boolean | `false` | Only private owners (no contact data is returned for them). |
| `sort_by` | string | empty | See Sort options. |
| `center_lat` / `center_lng` | number | empty | Center point for `distance_km`. |
| `radius_km` | number | empty | Keep only listings within this distance. |
| `compare_with_zone` | boolean | `true` | Adds zone median EUR per m2 and `deal_label`. |
| `estimate_rental_yield` | boolean | `false` | Adds estimated rent and gross yield to sale listings. |
| `yield_sample_pages` | integer | `3` | Rent pages (29 listings each) read per location for the yield. |
| `detect_risks` | boolean | `true` | Adds `risk_flags`. |
| `exclude_risky` | boolean | `false` | Drops listings with any risk flag. |
| `max_properties` | integer | `100` | Max listings per run, up to 1000. In monitor mode, the number of listings checked. |
| `max_pages` | integer | auto | Optional page limit per location. |
| `include_full_description` | boolean | `true` | Adds the full description text. |
| `fetch_details` | boolean | `false` | Also opens each listing page. Rarely needed, the results pages already have the data. |
| `monitor_mode` | boolean | `false` | Save only new or price-changed listings vs the last run. |
| `monitor_key` | string | `default` | Separate monitor memory per schedule. |
| `proxyConfiguration` | object | Apify Proxy | Proxy settings. Failing requests are retried through Spanish residential proxies when your plan allows it. |

#### Notes

- **Zone comparison:** Medians need at least 5 listings with a price and surface in the same district, or the Actor falls back to the city. Bigger runs give better medians. `zone_level` and `zone_sample_size` tell you what was used. It is a quick snapshot, not an official valuation.
- **Rental yield:** Gross yield = estimated monthly rent x 12 / price. It does not include taxes, community fees, or vacancy. The rent sample uses the same property type and location as the sale search.
- **Risk flags:** They come from text and are a warning, not a legal check. Always confirm with the agency. Phrases like "no está ocupado" are ignored.
- **Monitor mode:** Seen listings are stored in a named key-value store (`habitaclia-monitor-<monitor_key>`). A listing is `changed` when its price moved. Use `sort_by: newest` so new listings show up at the top. Unchanged listings are not saved and not charged.
- **Many locations:** `max_properties` is split evenly between searches, so one big city does not use the whole budget.
- **Filters:** Habitaclia applies price, bedrooms, and bathrooms on its side. The Actor also checks every filter on each listing, so rows always match what you asked for.
- **Contact data:** Phone and email are only returned for professional advertisers. Private sellers never get a name, phone, or email in the output.
- **Public data only:** The scraper reads public pages, without login. Please use the data responsibly and in line with Habitaclia's terms and privacy laws such as GDPR.

### FAQ

**What is the best way to start?** Paste a Habitaclia.com search URL, or use the filters (location, operation, price, rooms, radius). Then run and export JSON, CSV or Excel.

**Do I need to code?** No. You can also call this Habitaclia API alternative from your own code or automation tools.

**What do deal labels, rental yield and risk flags mean?** The Actor can compare price vs the zone, estimate a gross rental yield, and flag texts that mention risks such as an auction or a tenant (when those signals appear on the ad). These are estimates from public listing data, not official valuations.

**What does monitor mode do?** On a schedule, later runs can focus on new or changed listings so you do not re-download the same ads every day.

**Is this an official Habitaclia API?** No. It reads public listing pages and is not affiliated with Habitaclia. Follow their terms and applicable privacy laws.

### Related Actors

More data extractors by [kareninatech](https://apify.com/kareninatech):

- [Fotocasa Scraper — Spain property listings](https://apify.com/kareninatech/fotocasa-scraper)
- [BOE Subastas Scraper — Spain official auctions](https://apify.com/kareninatech/boe-subastas-scraper)
- [Argenprop Scraper — Argentina and Uruguay listings](https://apify.com/kareninatech/argenprop-scraper)
- [Fincaraiz Scraper — Colombia property listings](https://apify.com/kareninatech/fincaraiz-scraper)

#### Need a custom scraper or AI agent?

Need extra fields, another Spanish portal, price alerts, or a full data pipeline? Open an issue on this Actor and let's build it together.

# Actor input Schema

## `input_url` (type: `string`):

Optional. Paste a Habitaclia search results URL after filtering on the website, for example https://www.habitaclia.com/comprar/viviendas/barcelona-provincia/barcelona-capital/s?minPrice=200000. A single listing URL also works. When set, it overrides all the filters below. Leave empty to use structured filters, which is better for AI agents.

## `start_urls` (type: `array`):

Optional. More Habitaclia search or listing URLs to scrape in the same run. Also overrides the filters.

## `operation` (type: `string`):

Buy or rent. Ignored when input_url is set.

## `property_type` (type: `string`):

Same categories as on Habitaclia. Ignored when input_url is set.

## `location` (type: `string`):

City, town or province. Plain names work: Barcelona, Sant Cugat del Vallès, Girona, Madrid, Valencia. For a whole province use girona-provincia. You can also paste the path from a Habitaclia URL, like barcelona-provincia/barcelona-capital/eixample. Ignored when input_url is set.

## `locations` (type: `array`):

Optional. Search several places in one run with the same filters. Ignored when input_url is set.

## `min_price` (type: `integer`):

Minimum price. For rentals this is the monthly rent.

## `max_price` (type: `integer`):

Maximum price. For rentals this is the monthly rent.

## `min_rooms` (type: `integer`):

Minimum number of bedrooms, for example 2. Leave empty for no minimum.

## `max_rooms` (type: `integer`):

Maximum number of bedrooms, for example 4. Leave empty for no maximum.

## `min_bathrooms` (type: `integer`):

Minimum number of bathrooms, for example 1. Leave empty for no minimum.

## `min_surface` (type: `integer`):

Minimum built surface in square metres, for example 60. Leave empty for no minimum.

## `max_surface` (type: `integer`):

Maximum built surface in square metres, for example 180. Leave empty for no maximum.

## `new_build_only` (type: `boolean`):

If true, only keep new-build homes (obra nueva).

## `private_sellers_only` (type: `boolean`):

Only listings from private owners (particulares). Private sellers never get contact data in the output.

## `sort_by` (type: `string`):

Order of results. Empty keeps Habitaclia relevance order. Ignored when input_url is set.

## `center_lat` (type: `number`):

Optional. With center longitude, adds distance_km to every listing (for example your office, a school or the beach).

## `center_lng` (type: `number`):

Optional longitude of the map center, for example 2.17. Use with center_lat.

## `radius_km` (type: `number`):

Optional. Keep only listings within this distance of the center point. Listings without coordinates are dropped.

## `compare_with_zone` (type: `boolean`):

Adds zone_median_price_per_m2, price_vs_zone_pct and deal_label: how cheap or expensive each listing is per m2 compared with the other listings of the same district (or city) in this run.

## `estimate_rental_yield` (type: `boolean`):

For sale listings, also reads a small sample of rentals in the same area and adds est_monthly_rent and gross_rental_yield_pct. Rent sample rows are not saved or charged.

## `yield_sample_pages` (type: `integer`):

How many rent result pages (29 listings each) to read per location for the yield estimate. More pages give better district medians.

## `detect_risks` (type: `boolean`):

Reads the title and description for warnings such as occupied (okupa), auction, bare ownership, rented with tenant, needs renovation, social housing (VPO), no visits and cash only. Adds risk_flags.

## `exclude_risky` (type: `boolean`):

If true, drop listings that have any risk flag.

## `max_properties` (type: `integer`):

Maximum number of listings to save per run (up to 1000).

## `max_pages` (type: `integer`):

Optional. Limit of result pages per location (29 listings each). Leave empty for automatic.

## `include_full_description` (type: `boolean`):

Adds the full listing description. A short description_snippet is always included.

## `fetch_details` (type: `boolean`):

Open each listing page too. Habitaclia already sends almost all data in the results pages, so this is rarely needed. One extra request per property.

## `monitor_mode` (type: `boolean`):

Remember listings across runs in a named key-value store. Later runs save only listings that are new or whose price changed, with monitor_status, previous_price, price_change, first_seen_at and days_tracked. Pair with Apify Schedules for alerts.

## `monitor_key` (type: `string`):

Namespace for monitor mode so two schedules (for example Barcelona sale vs Girona rent) do not share memory. Letters, numbers and dashes only.

## `proxyConfiguration` (type: `object`):

Proxy settings. Apify Proxy is recommended. If a request keeps failing, the Actor retries it through Spanish residential proxies when your plan allows it.

## Actor input object example

```json
{
  "input_url": "",
  "operation": "comprar",
  "property_type": "viviendas",
  "location": "barcelona",
  "new_build_only": false,
  "private_sellers_only": false,
  "sort_by": "",
  "compare_with_zone": true,
  "estimate_rental_yield": false,
  "yield_sample_pages": 3,
  "detect_risks": true,
  "exclude_risky": false,
  "max_properties": 50,
  "include_full_description": true,
  "fetch_details": false,
  "monitor_mode": false,
  "monitor_key": "default",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Table view of scraped results using the dataset 'overview' view.

## `investor` (type: `string`):

No description

## `results` (type: `string`):

All scraped results from the default dataset without view transformation.

## `marketReport` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "input_url": "",
    "location": "barcelona",
    "max_properties": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kareninatech/habitaclia-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "input_url": "",
    "location": "barcelona",
    "max_properties": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("kareninatech/habitaclia-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "input_url": "",
  "location": "barcelona",
  "max_properties": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call kareninatech/habitaclia-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kareninatech/habitaclia-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qfPdSCvcbERNYwsub/builds/W7QP44JsJ2C59zkNK/openapi.json
