# Imovirtual Scraper (`dadhalfdev/imovirtual-scraper`) Actor

Extract detailed property listings from Imovirtual.com, Portugal's leading real estate platform. Get comprehensive property data for market analysis, lead generation, or research purposes.

- **URL**: https://apify.com/dadhalfdev/imovirtual-scraper.md
- **Developed by:** [Marco Rodrigues](https://apify.com/dadhalfdev) (community)
- **Categories:** Real estate, Automation, Integrations
- **Stats:** 33 total users, 3 monthly users, 97.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🏠 Imovirtual Property Scraper

Want to pull property listings from [Imovirtual](https://www.imovirtual.com/), Portugal's leading real estate platform? This scraper makes it super easy!

Set **location and filters** (property type, buy/rent, price, area, bedrooms) and get structured listings with prices, sizes, agency details, and photos as CSV or JSON.

### 💡 Perfect for...

- **Real Estate Market Analysis:** Track property prices and trends across Portugal.
- **Lead Generation:** Collect agency names and listing contacts for outreach.
- **Investment Research:** Compare prices by city, type, and size.
- **Market Competition:** Monitor competitor listings and pricing.
- **Property Database:** Build your own structured inventory of Portuguese listings.
- **🤖 AI Agents:** Power bots and workflows with filter-based search.
- **📚 RAG Systems:** Feed listing specs and descriptions into retrieval pipelines.

### ✨ Why you'll love this scraper

- 🎯 **Flexible Filters:** Location, property type, buy/rent, price range, area, and bedrooms.
- 📊 **Rich Listings:** Title, price, price per m², size, rooms, floor, agency, photos, and flags.
- 🔁 **Pagination:** Collects listings across result pages until `max_properties` is reached.

### 📦 What's inside the data?

For every listing you get:

- **Core:** `id`, `title`, `url`, `description`
- **Location:** `full_address`, `province`
- **Pricing & Size:** `price`, `price_per_square_meter`, `area_square_meter`, `terrain_area_square_meter`
- **Details:** `rooms_number`, `floor_number`, `date_created`
- **Agency & Media:** `agency_id`, `agency_name`, `first_photo`, `number_of_photos`
- **Flags:** `is_private_owner`, `is_promoted`, `is_exclusive_offer`

### 🚀 Quick start

1. Set `search_location` (e.g. Lisboa, Porto, Braga).
2. Pick `property_type` and `listing_type` (buy or rent).
3. Optionally set price, area, and bedrooms.
4. Set `max_properties` and click **Start**.

Export JSON, CSV, or Excel when done.

***

#### Tech details for developers 🧑‍💻

**Input Example**

```json
{
  "search_location": "Lisboa",
  "property_type": "apartment",
  "listing_type": "buy",
  "min_price": 50000,
  "max_price": 500000,
  "min_sqft": 50,
  "max_sqft": 100,
  "number_of_bedrooms": 1,
  "max_properties": 100
}
```

**Output Example**

```json
{
  "id": 18668154,
  "title": "Apartamento T0 espaçoso com terraço, em São Bento, Lisboa",
  "url": "https://www.imovirtual.com/pt/anuncio/apartamento-t0-espacoso-com-terraco-em-sao-bento-lisboa-ID1gkrg",
  "description": "O projeto São Bento 21...",
  "full_address": "Rua de São Bento 123, Misericórdia, Lisboa",
  "province": "Lisboa",
  "first_photo": "https://.../",
  "number_of_photos": 13,
  "agency_id": 3456674,
  "agency_name": "Infante & Riu - Portugal Real Estate",
  "price": 450000,
  "price_per_square_meter": 7759,
  "area_square_meter": 58,
  "rooms_number": "ONE",
  "floor_number": "GROUND",
  "date_created": "2025-08-04 21:00:37",
  "is_private_owner": false,
  "is_promoted": false,
  "is_exclusive_offer": false
}
```

### 📋 Input reference (detailed)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `search_location` | string | Yes | `Lisboa` | Location to search (e.g. Lisboa, Porto, Braga). |
| `property_type` | string enum | Yes | `apartment` | `apartment`, `house`, `studio`, `building`, `room`, `land`, `commercial`, `office/warehouse`, `garage`. |
| `listing_type` | string enum | Yes | `buy` | `buy` or `rent`. |
| `min_price` / `max_price` | integer | No | — | Price bounds in euros. |
| `min_sqft` / `max_sqft` | integer | No | — | Area bounds in m². |
| `number_of_bedrooms` | integer | No | `1` | Number of bedrooms (1–6). |
| `max_properties` | integer | No | `100` | How many listings to return (`1`–`300`). |

#### Notes

- Each run returns at most **`max_properties`** listings.
- Narrow filters (location, price, type) if you need a focused dataset.

# Actor input Schema

## `search_location` (type: `string`):

The location to search for properties (e.g. Lisboa, Porto, Braga).

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

Type of property to search for.

## `listing_type` (type: `string`):

Buy or rent listings.

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

Minimum price in euros (or leave empty for any).

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

Maximum price in euros (or leave empty for any).

## `min_sqft` (type: `integer`):

Minimum area in square meters (or leave empty for any).

## `max_sqft` (type: `integer`):

Maximum area in square meters (or leave empty for any).

## `number_of_bedrooms` (type: `integer`):

Number of bedrooms (1–6).

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

How many listings to return (1–300).

## Actor input object example

```json
{
  "search_location": "Lisboa",
  "property_type": "apartment",
  "listing_type": "buy",
  "min_price": 50000,
  "max_price": 500000,
  "min_sqft": 50,
  "max_sqft": 100,
  "number_of_bedrooms": 1,
  "max_properties": 100
}
```

# Actor output Schema

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

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

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

All scraped listings from the default dataset without view transformation.

# 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 = {
    "search_location": "Lisboa",
    "property_type": "apartment",
    "listing_type": "buy",
    "min_price": 50000,
    "max_price": 500000,
    "min_sqft": 50,
    "max_sqft": 100,
    "number_of_bedrooms": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("dadhalfdev/imovirtual-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 = {
    "search_location": "Lisboa",
    "property_type": "apartment",
    "listing_type": "buy",
    "min_price": 50000,
    "max_price": 500000,
    "min_sqft": 50,
    "max_sqft": 100,
    "number_of_bedrooms": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("dadhalfdev/imovirtual-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 '{
  "search_location": "Lisboa",
  "property_type": "apartment",
  "listing_type": "buy",
  "min_price": 50000,
  "max_price": 500000,
  "min_sqft": 50,
  "max_sqft": 100,
  "number_of_bedrooms": 1
}' |
apify call dadhalfdev/imovirtual-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dadhalfdev/imovirtual-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/f6P5cklXFhVw5ZlCh/builds/pOkWNgXVgjSKXI8Nu/openapi.json
