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

Scrape Imovirtual.com property listings in Portugal from any search URL: price, price per m², area, rooms, floor, district, city, parish, agency and photos. Filter by price, area and private owner. Export JSON, CSV or Excel.

- **URL**: https://apify.com/parsebird/imovirtual-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.39 / 1,000 listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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?

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

### Imovirtual Scraper

Imovirtual Scraper collects property listings from [Imovirtual.com](https://www.imovirtual.com), one of Portugal's main real estate portals. Paste any Imovirtual search URL and get every matching apartment, house, plot of land or room for sale or rent as structured data, with no account and no API key.

<table><tr>
<td style="border-left:4px solid #1C1917;padding:12px 16px;font-weight:600">
Paste a search URL from imovirtual.com, set an optional price range, area range or private-owner filter, and get price, price per m², area, rooms, floor, district, city, parish, street, agency and photos for every listing. Turn on listing details to add the full description, map coordinates, energy certificate, bathrooms and the advertiser's phone number.
</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor or any other LLM to start using this Actor.

```
Use the Apify Actor "parsebird/imovirtual-scraper" (Imovirtual Scraper) to get Portuguese property listings from imovirtual.com. Call it with the apify-client package: Python `ApifyClient("<APIFY_TOKEN>").actor("parsebird/imovirtual-scraper").call(run_input={...})`, or JavaScript `new ApifyClient({ token }).actor('parsebird/imovirtual-scraper').call({...})`, then read items from the run's default dataset. Inputs: startUrls (required, array of imovirtual.com search result URLs such as "https://www.imovirtual.com/pt/resultados/comprar/apartamento/lisboa/lisboa" or "https://www.imovirtual.com/pt/resultados/arrendar/moradia/porto"; filters already in the URL are kept; single listing URLs /pt/anuncio/... also work), maxItems (int, default 100, unique listings across all URLs), minPrice and maxPrice (int euros, inclusive; monthly rent for rentals), minAreaM2 and maxAreaM2 (int m², inclusive), privateOwnerOnly (bool, default false), includeDetails (bool, default false, opens each listing page), maxRequestRetries (int, default 3), proxyConfiguration (object, default Apify Proxy). Each item has listingId, url, title, estate (FLAT, HOUSE, TERRAIN, ROOM...), transaction (SELL or RENT), price, currency, priceHidden, pricePerSqm, areaM2, terrainAreaM2, rooms (ONE, TWO... MORE), roomsCount, floor, district, city, parish, neighborhood, street, locationName, agencyName, agencyId, agencyUrl, advertiserType, isPrivateOwner, photos (array of URLs), photoCount, dateCreated, createdAtFirst, pushedUpAt, isPromoted, isExclusiveOffer, developmentTitle, developmentUrl, videoUrl, virtualTourUrl, searchUrl, scrapedAt; with includeDetails also description, latitude, longitude, energyCertificate, bathrooms, market, constructionStatus, buildingType, buildingFloors, buildYear, heating, contactName, contactPhones, agencyAddress, referenceId, modifiedAt, attributes. Pricing: pay per listing saved. API docs: https://apify.com/parsebird/imovirtual-scraper/api. Get a token at https://console.apify.com/settings/integrations.
```

### What is Imovirtual Scraper?

**Imovirtual Scraper** turns [Imovirtual](https://www.imovirtual.com) search results into clean JSON, CSV or Excel. Run a search on imovirtual.com, copy the URL from the address bar and paste it into the Actor. It returns **every listing in that search** with its **price, price per m², area, rooms, floor, location from district down to street, agency and photos**.

It works as an **Imovirtual API alternative**. Imovirtual doesn't offer a public API for its listings, so this Actor collects the same data the website shows and saves it as a dataset you can download or read through the Apify API.

To try it, open the Input tab and click **Start**. The prefilled search returns 50 apartments for sale in Lisbon.

### What can Imovirtual Scraper do?

- 🔗 **Scrape any Imovirtual search URL**: apartments, houses, land, rooms and other property types, for sale (`comprar`) or for rent (`arrendar`), in any district, city or parish. Filters you set on the website, such as number of rooms or sort order, stay in place.
- 💶 **Filter by price and area**: set a minimum and maximum price and a minimum and maximum area in m². Both ends are inclusive.
- 👤 **Private owners only**: keep only listings posted by private owners (particulares), without agencies or developers.
- 📚 **Several searches in one run**: add as many search URLs as you need. Listings that show up in more than one search are saved once, and **Max listings** is shared fairly between the searches.
- 🏠 **Single listings**: paste listing URLs (`/pt/anuncio/...`) to scrape specific properties.
- 📄 **Listing details**: turn on **Include listing details** to add the full description, latitude and longitude, energy certificate, bathrooms, construction status, building type, heating, the advertiser's phone number and the agency's address.
- ⚙️ **Built for automation**: [schedule runs](https://docs.apify.com/platform/schedules) to watch new listings and price changes, call the Actor from the [Apify API](https://apify.com/parsebird/imovirtual-scraper/api), connect it to [Make, Zapier, n8n, Google Sheets or Slack](https://apify.com/integrations), and export as JSON, CSV, Excel or HTML.

### What data can you extract from Imovirtual?

| Field | Description |
|-------|-------------|
| `listingId`, `url`, `title` | Imovirtual listing ID, link to the listing and its title |
| `estate`, `transaction` | Property type (`FLAT`, `HOUSE`, `TERRAIN`, `ROOM` and others) and `SELL` or `RENT` |
| `price`, `currency`, `priceHidden` | Asking price, or monthly rent for rentals, in `EUR`, and whether the advertiser hides the price |
| `pricePerSqm` | Price per m² as shown by Imovirtual (sale listings) |
| `areaM2`, `terrainAreaM2` | Usable area and plot area in m² |
| `rooms`, `roomsCount` | Imovirtual's room count as a word (`ONE`, `TWO`… `MORE`) and as a number |
| `floor` | Floor (`0` for ground floor, `1`, `2`… `10+`) |
| `district`, `city`, `parish`, `neighborhood` | Location levels as Imovirtual names them: distrito, concelho, freguesia and zone |
| `street`, `locationName` | Street when the advertiser shows it, and the full location text |
| `agencyName`, `agencyId`, `agencyUrl`, `advertiserType` | Agency or advertiser and link to its Imovirtual profile |
| `isPrivateOwner` | `true` when a private owner posted the listing |
| `photos`, `photoCount` | Large photo URLs from the search results, and the listing's total number of photos |
| `dateCreated`, `createdAtFirst`, `pushedUpAt` | When the listing was created, first published, and last bumped to the top |
| `isPromoted`, `isExclusiveOffer` | Paid promotion and exclusive offer flags |
| `developmentTitle`, `developmentUrl` | New-build development the listing belongs to |
| `videoUrl`, `virtualTourUrl` | Video and 3D tour links |
| `description`, `latitude`, `longitude` | Full description and map position (details only) |
| `energyCertificate`, `bathrooms`, `market` | Energy rating (`a`, `b`, `c`…), bathrooms, `primary` or `secondary` market (details only) |
| `constructionStatus`, `buildingType`, `buildingFloors`, `buildYear`, `heating` | Building information when the advertiser fills it in (details only) |
| `contactName`, `contactPhones`, `agencyAddress`, `referenceId` | Advertiser contact, phone numbers, agency address and the agency's own reference (details only) |

Fields a listing doesn't have come back as `null`. Rooms and land have no floor, and many advertisers leave the street, build year or heating empty.

### How to scrape Imovirtual

1. Go to [imovirtual.com](https://www.imovirtual.com) and run a search, for example apartments for sale in Lisbon. Add any filters you like on the website.
2. Copy the URL from the browser's address bar. It looks like `https://www.imovirtual.com/pt/resultados/comprar/apartamento/lisboa/lisboa`.
3. Open [Imovirtual Scraper](https://apify.com/parsebird/imovirtual-scraper) on Apify Store and click **Try for free**.
4. Paste one or more URLs into **Search URLs**.
5. Optionally set **Min price**, **Max price**, **Min area**, **Max area** or **Private owners only**, and turn on **Include listing details**.
6. Set **Max listings** and click **Start**. When the run finishes, download the dataset as JSON, CSV, Excel or HTML, or read it from the [dataset API](https://docs.apify.com/api/v2/dataset-items-get).

### Input parameters

See the [Input tab](https://apify.com/parsebird/imovirtual-scraper/input-schema) for details.

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrls` | array | Yes | Lisbon apartments | Imovirtual search result URLs or listing URLs |
| `maxItems` | integer | No | 100 | Maximum unique listings saved, shared across all URLs |
| `minPrice` | integer | No | — | Minimum price in euros, inclusive. Monthly rent for rentals |
| `maxPrice` | integer | No | — | Maximum price in euros, inclusive |
| `minAreaM2` | integer | No | — | Minimum area in m², inclusive |
| `maxAreaM2` | integer | No | — | Maximum area in m², inclusive |
| `privateOwnerOnly` | boolean | No | `false` | Keep only listings from private owners |
| `includeDetails` | boolean | No | `false` | Open each listing page for the description, coordinates, energy certificate and phone |
| `maxRequestRetries` | integer | No | 3 | Retries for a failed request |
| `proxyConfiguration` | object | No | Apify Proxy | Proxy settings |

When you set a price or area filter, listings that hide their price or area are left out, because they can't be checked against it.

#### Example input

Apartments for sale in Lisbon and houses for rent in Porto district, between €150,000 and €400,000, at least 60 m², from private owners only:

```json
{
    "startUrls": [
        "https://www.imovirtual.com/pt/resultados/comprar/apartamento/lisboa/lisboa",
        "https://www.imovirtual.com/pt/resultados/arrendar/moradia/porto"
    ],
    "minPrice": 150000,
    "maxPrice": 400000,
    "minAreaM2": 60,
    "privateOwnerOnly": true,
    "maxItems": 500
}
```

The filters apply to every URL, so in this example the Porto rentals are filtered to €150,000 to €400,000 per month and few or none will match. Use separate runs when sale and rent searches need different price ranges.

### Output example

Each listing is one item. This is a real record from a run with **Include listing details** turned on (description and photos shortened). The Console shows the results as a table.

```json
{
    "listingId": 19323245,
    "url": "https://www.imovirtual.com/pt/anuncio/loja-com-95-m-e-apartamento-t1-com-vista-para-o-rio-douro-ID1j4Rf",
    "title": "Loja com 95 m² e Apartamento T1 com Vista para o Rio Douro",
    "shortDescription": null,
    "estate": "FLAT",
    "transaction": "SELL",
    "price": 395000,
    "currency": "EUR",
    "priceHidden": false,
    "pricePerSqm": 2633.33,
    "areaM2": 150,
    "terrainAreaM2": null,
    "rooms": "TWO",
    "roomsCount": 2,
    "floor": null,
    "district": "Porto",
    "city": "Porto",
    "parish": "Cedofeita, Ildefonso, Sé, Miragaia, Nicolau, Vitória",
    "neighborhood": "Miragaia - Virtudes",
    "street": "Viela Companhia",
    "locationName": "Miragaia - Virtudes, Cedofeita, Ildefonso, Sé, Miragaia, Nicolau, Vitória, Porto, Porto",
    "agencyName": "Porto Casas - Imobiliária",
    "agencyId": 2179825,
    "agencyUrl": "https://www.imovirtual.com/pt/empresas/agencias-imobiliarias/porto-casas-imobiliaria-ID2179825",
    "advertiserType": "business",
    "isPrivateOwner": false,
    "photos": [
        "https://ireland.apollo.olxcdn.com/v1/files/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmbiI6ImsyOHFuNWF1ZHhidS1FQ09TWVNURU0iLCJ3IjpbeyJmbiI6IjY5bmxwYTdlY3FtNzEtQVBUIiwicyI6IjE2IiwiYSI6IjAiLCJwIjoiMTAsLTEwIn1dfQ.GkjQmsEwd6ToZ9S8FEi4ahAoRS2JkD4vuLUfpY_ekR0/image;s=1280x1024;q=80"
    ],
    "photoCount": 13,
    "dateCreated": "2026-10-27T10:19:23Z",
    "createdAtFirst": "2026-10-27T10:19:23+00:00",
    "pushedUpAt": null,
    "isPromoted": false,
    "isExclusiveOffer": false,
    "developmentTitle": null,
    "developmentUrl": null,
    "videoUrl": null,
    "virtualTourUrl": null,
    "searchUrl": "https://www.imovirtual.com/pt/resultados/comprar/apartamento/porto/porto",
    "description": "Dois imóveis, uma localização de excelência e inúmeras possibilidades!\n\nApresentamos esta oportunidade de adquirir, em conjunto, uma loja de comércio ou serviços e um agradável apartamento T1...",
    "latitude": 41.14338,
    "longitude": -8.62083,
    "energyCertificate": "b",
    "bathrooms": "1",
    "market": "secondary",
    "constructionStatus": "ready_to_use",
    "buildingType": "block",
    "buildingFloors": null,
    "buildYear": null,
    "heating": null,
    "contactName": "PortoCasas",
    "contactPhones": ["+351221458228"],
    "agencyAddress": "Avenida Fernão Magalhães 1382, 4000-354, Bonfim, Porto, Porto",
    "referenceId": "APA_1013",
    "modifiedAt": "2026-10-27T10:21:54Z",
    "attributes": {
        "bathrooms_num": "1",
        "building_type": "block",
        "construction_status": "ready_to_use",
        "energy_certificate": "b",
        "m": "150",
        "market": "secondary",
        "price_per_m": "2633.33",
        "rooms_num": "2"
    },
    "scrapedAt": "2026-10-27T10:23:59.990081+00:00"
}
```

Without listing details, the fields from `description` to `attributes` are not in the item.

### Use Imovirtual Scraper from Python or JavaScript

Install the client with `pip install apify-client` or `npm install apify-client`, and get your API token from [Apify Console](https://console.apify.com/settings/integrations).

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("parsebird/imovirtual-scraper").call(run_input={
    "startUrls": ["https://www.imovirtual.com/pt/resultados/comprar/apartamento/porto/porto"],
    "maxPrice": 300000,
    "minAreaM2": 70,
    "maxItems": 200,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["price"], item["areaM2"], item["pricePerSqm"], item["parish"], item["url"])
```

**JavaScript**

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

const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('parsebird/imovirtual-scraper').call({
    startUrls: ['https://www.imovirtual.com/pt/resultados/arrendar/apartamento/lisboa/lisboa'],
    privateOwnerOnly: true,
    includeDetails: true,
    maxItems: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((l) => console.log(l.price, l.city, l.contactPhones, l.url));
```

### Use cases

- **Property price research**: compare asking prices and price per m² across Portuguese districts, cities and parishes.
- **Rental market analysis**: track monthly rents for apartments and rooms in Lisbon, Porto or the Algarve.
- **Private-owner leads**: find listings posted directly by owners, without an agency.
- **New listing alerts**: schedule a search sorted by newest and get fresh listings in your area every day.
- **Agency and competitor monitoring**: see which agencies list in a market and what they ask.
- **Data for apps, dashboards and models**: feed listing data into spreadsheets, BI tools or valuation models.

### How it works

1. The Actor reads each search URL and adds your price, area and private-owner filters to it.
2. It loads the results 72 listings at a time, page after page, until it reaches **Max listings** or the end of the search.
3. It checks each listing against your filters again and leaves out listings that don't match, such as promoted ads Imovirtual mixes into the results.
4. Listings that appear in several searches are saved once. If one search runs out of results, its unused share of **Max listings** goes to the other searches.
5. With **Include listing details** on, it opens each listing page and adds the description, coordinates, building information and contact details.

### How much does it cost to scrape Imovirtual?

Imovirtual Scraper uses pay-per-event pricing. You pay for each listing saved to the dataset. Platform usage (compute and proxy) is included in the event price, so it isn't billed separately.

| Event | Free | Bronze | Silver | Gold |
|-------|------|--------|--------|------|
| Listing scraped | $2.99 / 1,000 | $2.79 / 1,000 | $2.59 / 1,000 | **$2.39 / 1,000** |

One saved listing is one charge, with or without listing details. At Free plan prices, 100 listings cost about $0.30 and 1,000 listings cost $2.99. To control spending, use **Max listings**. The run also stops when it reaches the maximum cost per run you set in Apify Console.

### Is it legal to scrape Imovirtual?

Imovirtual Scraper only collects listing information that Imovirtual shows publicly to visitors who aren't logged in. It doesn't log in and doesn't access messages or account data. Listings can contain personal data, such as a private owner's name or an advertiser's phone number. If you store or process that data you're responsible for complying with the GDPR and Imovirtual's terms of service. Consult a lawyer if you're unsure. For more background, read Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

### Other real estate scrapers from ParseBird

| Actor | What it does |
|-------|--------------|
| [Fotocasa Scraper](https://apify.com/parsebird/fotocasa-scraper) | Property listings from Fotocasa.es in Spain |
| [Immobiliare.it Scraper](https://apify.com/parsebird/immobiliare-it-scraper) | Property listings from Immobiliare.it in Italy |
| [ImmoScout24 Scraper](https://apify.com/parsebird/immoscout24-scraper) | Property listings from ImmobilienScout24 in Germany |
| [Otodom.pl Scraper](https://apify.com/parsebird/otodom-scraper) | Property listings from Otodom.pl in Poland |
| [Funda.nl Scraper](https://apify.com/parsebird/funda-scraper) | Houses and apartments from Funda.nl in the Netherlands |

### FAQ

**Do I need an Imovirtual account or API key?**
No. The Actor reads the same public listings the website shows to logged-out visitors.

**Which URLs can I use?**
Search result URLs that start with `https://www.imovirtual.com/pt/resultados/`, and listing URLs that start with `https://www.imovirtual.com/pt/anuncio/`. Older URLs such as `https://www.imovirtual.com/comprar/apartamento/lisboa/` are followed to their new address. Agency profile pages aren't supported.

**Why did my URL return nothing?**
Imovirtual didn't recognise the location in the URL, and the run log says so. Location names must match Imovirtual's, for example `faro` for the Algarve. Run the search on the website and copy the URL from the address bar.

**Why does `rooms` not match the T number in the title?**
`rooms` is Imovirtual's own room count, which advertisers fill in separately from the title. A T2 apartment is often listed with three rooms, because the living room counts too.

**Are the price and area filters exact?**
Yes. Imovirtual applies them to the search, and the Actor checks every listing again, so you only get listings inside your range, ends included.

**How many listings can I get from one search?**
All of them. The Actor pages through the whole search, including searches with tens of thousands of results.

**Do I need a proxy?**
The Actor uses Apify Proxy by default. If Imovirtual refuses requests, it changes IP and moves to residential proxy by itself. Proxy costs are included in the price per listing.

**Can I run it on a schedule or connect it to other tools?**
Yes. Use [Apify schedules](https://docs.apify.com/platform/schedules), call it from the [API](https://apify.com/parsebird/imovirtual-scraper/api), or connect it to Make, Zapier, n8n, Google Sheets, Slack or a webhook through [integrations](https://apify.com/integrations).

**Something is missing or wrong. What should I do?**
Open an issue in the [Issues tab](https://apify.com/parsebird/imovirtual-scraper/issues). We read every report.

# Changelog

This Actor's version history is a separate document: https://apify.com/parsebird/imovirtual-scraper/changelog.md

# Actor input Schema

## `startUrls` (type: `array`):

Paste Imovirtual search result URLs, e.g. https://www.imovirtual.com/pt/resultados/comprar/apartamento/lisboa/lisboa. Filters you set on the website (rooms, market, sort order and others) are kept. Single listing URLs (/pt/anuncio/...) work too.

## `maxItems` (type: `integer`):

Stop after this many unique listings across all search URLs.

## `minPrice` (type: `integer`):

Keep only listings priced at or above this amount. For rentals this is the monthly rent. Listings without a visible price are left out when a price filter is set.

## `maxPrice` (type: `integer`):

Keep only listings priced at or below this amount.

## `minAreaM2` (type: `integer`):

Keep only listings with at least this usable area.

## `maxAreaM2` (type: `integer`):

Keep only listings with at most this usable area.

## `privateOwnerOnly` (type: `boolean`):

Keep only listings posted by private owners (Particular), not agencies or developers.

## `includeDetails` (type: `boolean`):

Open each listing page to add the full description, map coordinates, energy certificate, bathrooms, construction status, building type, heating and the advertiser's phone number. Slower, same price per listing.

## `maxRequestRetries` (type: `integer`):

How many times a failed request is retried before the Actor gives up on it.

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

Apify Proxy is used by default. If Imovirtual refuses requests, the Actor switches to a new IP and, when needed, to residential proxy on its own.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.imovirtual.com/pt/resultados/comprar/apartamento/lisboa/lisboa"
  ],
  "maxItems": 50,
  "privateOwnerOnly": false,
  "includeDetails": false,
  "maxRequestRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "startUrls": [
        "https://www.imovirtual.com/pt/resultados/comprar/apartamento/lisboa/lisboa"
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/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 = {
    "startUrls": ["https://www.imovirtual.com/pt/resultados/comprar/apartamento/lisboa/lisboa"],
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("parsebird/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 '{
  "startUrls": [
    "https://www.imovirtual.com/pt/resultados/comprar/apartamento/lisboa/lisboa"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call parsebird/imovirtual-scraper --silent --output-dataset

```

## MCP server setup

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