# Imovirtual Property Scraper (`shahidirfan/imovirtual-property-scraper`) Actor

Scrape residential & commercial listings from Imovirtual. Extract prices, locations, property types, descriptions, agent details & images. Ideal for real estate market analysis, price intelligence, investment pipeline building & property dataset monetization. High-volume, reliable extraction.

- **URL**: https://apify.com/shahidirfan/imovirtual-property-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Real estate, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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

Extract property listing data from Imovirtual for Portuguese real estate research, pricing analysis, and listing monitoring. Collect apartment and house results with prices, areas, room counts, locations, images, seller details, and listing dates in a clean Apify dataset.

### Features

- **Result URL support** - Start from any compatible Imovirtual result page.
- **Search inputs** - Build a default apartment purchase search from location and optional keyword.
- **Pagination control** - Collect multiple result pages up to your chosen result limit.
- **Clean records** - Empty and always-missing values are removed from saved items.
- **Rich listing fields** - Capture price, area, room count, location hierarchy, images, seller, and tags.

### Use Cases

#### Market Research

Compare property prices across Portuguese districts and cities. Use fields such as price, area, room count, and price per square meter to understand local market ranges.

#### Investment Analysis

Build datasets for buy-to-let or resale analysis. Track asking prices, listing dates, seller type, and location details to shortlist useful opportunities.

#### Listing Monitoring

Run the scraper on a schedule to monitor new and updated listings. Compare listing IDs and dates across runs to detect changes.

#### Lead Enrichment

Collect structured property records for CRM workflows. Agency names, owner names, URLs, and location fields help qualify listings before outreach.

---

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrl` | String | No | Imovirtual apartment purchase URL | Imovirtual result URL. This has priority over the search fields. |
| `keyword` | String | No | `terraço` | Optional keyword matched against listing text and tags. |
| `location` | String | No | `todo-o-pais` | Location used when `startUrl` is empty, such as `lisboa`, `porto`, or `todo-o-pais`. |
| `results_wanted` | Integer | No | `20` | Maximum number of listings to save. |
| `max_pages` | Integer | No | `3` | Maximum result pages to request. |
| `proxyConfiguration` | Object | No | Apify Proxy off | Proxy settings for cloud runs. |

---

### Output Data

Each dataset item can contain:

| Field | Type | Description |
|-------|------|-------------|
| `id` | Integer | Imovirtual listing ID |
| `title` | String | Listing title |
| `url` | String | Listing detail URL |
| `transaction` | String | Transaction type |
| `estate` | String | Property category |
| `price` | Number | Listing price |
| `currency` | String | Price currency |
| `price_per_square_meter` | Number | Price per square meter |
| `area_sqm` | Number | Property area in square meters |
| `rooms` | String | Room count label |
| `city` | String | City, parish, or local area |
| `province` | String | District or province |
| `description` | String | Short listing description |
| `image_urls` | Array | Unique large image URLs returned by the listing endpoint |
| `total_possible_images` | Number | Total photo count reported by Imovirtual |
| `agency_name` | String | Agency name when available |
| `owner_name` | String | Advert owner name when available |
| `tags` | Array | Listing feature tags |
| `date_created` | String | Listing creation date |
| `page` | Integer | Result page where the listing was found |

---

### Usage Examples

#### Start From a URL

```json
{
  "startUrl": "https://www.imovirtual.com/pt/resultados/comprar/apartamento/todo-o-pais",
  "results_wanted": 50,
  "max_pages": 3
}
````

#### Search Lisbon Apartments

```json
{
  "location": "lisboa",
  "results_wanted": 40,
  "max_pages": 2
}
```

#### Filter by Keyword

```json
{
  "location": "porto",
  "keyword": "terraço",
  "results_wanted": 20,
  "max_pages": 5
}
```

***

### Sample Output

```json
{
  "id": 19174677,
  "title": "Apartamento T3 Duplex com terraço",
  "url": "https://www.imovirtual.com/pt/ad/apartamento-t3-duplex-com-terraco-ID1iscZ",
  "transaction": "SELL",
  "estate": "FLAT",
  "price": 280000,
  "currency": "EUR",
  "price_per_square_meter": 1458.33,
  "area_sqm": 192,
  "rooms": "T3",
  "city": "S. João da Madeira",
  "province": "Aveiro",
  "description": "Apartamento T3 duplex com terraço, último andar, óptimo estado...",
  "image_urls": [
    "https://ireland.apollo.olxcdn.com/v1/files/example/image;s=1280x1024;q=80"
  ],
  "total_possible_images": 22,
  "image": "https://ireland.apollo.olxcdn.com/v1/files/example/image;s=1280x1024;q=80",
  "owner_name": "Lúcia Ferreira",
  "is_private_owner": true,
  "date_created": "2026-07-18 16:21:06",
  "page": 1
}
```

***

### Tips for Best Results

#### Use Result URLs for Exact Searches

- Copy a working Imovirtual result URL when you need specific filters.
- Use `startUrl` when you already selected filters on the website.
- Keep `max_pages` modest for quick test runs.

#### Use Search Fields for Common Runs

- Set `location` to a district slug such as `lisboa` or `porto`.
- Use `todo-o-pais` for country-wide collection.
- Use `keyword` only when you want a text match inside collected listings.

#### Optimize Collection Size

- Start with `20` results for testing.
- Increase `results_wanted` and `max_pages` for larger datasets.
- Schedule repeated runs for monitoring instead of very large one-off runs.

***

### Integrations

Connect your data with:

- **Google Sheets** - Review property tables with your team.
- **Airtable** - Build searchable real estate databases.
- **Make** - Trigger workflows from new dataset items.
- **Zapier** - Send matching listings to business tools.
- **Webhooks** - Deliver fresh results to your own systems.

#### Export Formats

- **JSON** - For application workflows.
- **CSV** - For spreadsheet analysis.
- **Excel** - For reporting.
- **XML** - For system integrations.

***

### Frequently Asked Questions

#### Can I scrape any Imovirtual result URL?

Yes, compatible Imovirtual result URLs can be provided through `startUrl`.

#### Does user input override the sample values?

Yes, values you provide in the Apify UI or API are used at runtime.

#### Can I collect more than one page?

Yes, set `max_pages` above `1` and increase `results_wanted`.

#### Why are some fields missing?

Some listings do not publish every field. Empty values are removed from the saved record.

#### Can I search by keyword?

Yes, the keyword is matched against collected listing text, locations, agencies, owners, and tags.

***

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)
- [Scheduling Runs](https://docs.apify.com/schedules)

***

### Legal Notice

This actor is designed for legitimate data collection purposes. Users are responsible for ensuring compliance with website terms of service and applicable laws. Use collected data responsibly and respect rate limits.

# Actor input Schema

## `startUrl` (type: `string`):

Imovirtual result URL to scrape. If provided, it has priority over keyword and location fields.

## `keyword` (type: `string`):

Optional keyword matched against listing title, description, location, agency, owner, and tags.

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

Location slug or name used when Start URL is empty, for example Lisboa, Porto, Braga, or todo-o-pais.

## `results_wanted` (type: `integer`):

Maximum number of listings to save.

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

Maximum number of result pages to request.

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

Use Apify Proxy for cloud runs if direct access is limited.

## Actor input object example

```json
{
  "startUrl": "https://www.imovirtual.com/pt/resultados/comprar/apartamento/todo-o-pais",
  "keyword": "terraço",
  "location": "todo-o-pais",
  "results_wanted": 20,
  "max_pages": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrl": "https://www.imovirtual.com/pt/resultados/comprar/apartamento/todo-o-pais",
    "keyword": "terraço",
    "location": "todo-o-pais",
    "results_wanted": 20,
    "max_pages": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/imovirtual-property-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 = {
    "startUrl": "https://www.imovirtual.com/pt/resultados/comprar/apartamento/todo-o-pais",
    "keyword": "terraço",
    "location": "todo-o-pais",
    "results_wanted": 20,
    "max_pages": 3,
}

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

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

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

```

## CLI example

```bash
echo '{
  "startUrl": "https://www.imovirtual.com/pt/resultados/comprar/apartamento/todo-o-pais",
  "keyword": "terraço",
  "location": "todo-o-pais",
  "results_wanted": 20,
  "max_pages": 3
}' |
apify call shahidirfan/imovirtual-property-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=shahidirfan/imovirtual-property-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Imovirtual Property Scraper",
        "description": "Scrape residential & commercial listings from Imovirtual. Extract prices, locations, property types, descriptions, agent details & images. Ideal for real estate market analysis, price intelligence, investment pipeline building & property dataset monetization. High-volume, reliable extraction.",
        "version": "0.0",
        "x-build-id": "qV1X6nwaXgDMvhH2R"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~imovirtual-property-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-imovirtual-property-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/shahidirfan~imovirtual-property-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-imovirtual-property-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/shahidirfan~imovirtual-property-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-imovirtual-property-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrl": {
                        "title": "Start URL",
                        "type": "string",
                        "description": "Imovirtual result URL to scrape. If provided, it has priority over keyword and location fields."
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Optional keyword matched against listing title, description, location, agency, owner, and tags."
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Location slug or name used when Start URL is empty, for example Lisboa, Porto, Braga, or todo-o-pais."
                    },
                    "results_wanted": {
                        "title": "Results wanted",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of listings to save.",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Max pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of result pages to request.",
                        "default": 3
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use Apify Proxy for cloud runs if direct access is limited.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
