# Trovacasa Scraper (`lexis-solutions/trovacasa-scraper`) Actor

Scrape real estate listings from Trovacasa.it on Apify, extracting titles, prices, full descriptions, addresses, features, agency info, and images from search results with automatic pagination and configurable max items.

- **URL**: https://apify.com/lexis-solutions/trovacasa-scraper.md
- **Developed by:** [Lexis Solutions](https://apify.com/lexis-solutions) (community)
- **Categories:** Real estate, Automation, AI
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$35.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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

## Trovacasa.it Scraper

***

![banner](https://i.ibb.co/tMczC8hQ/Screenshot-2026-01-21-at-10-00-24-PM.png)

***

The Trovacasa.it Scraper is an Apify actor designed to extract property listing information from **Trovacasa.it**, one of Italy's prominent real estate portals. It efficiently navigates through property search results, handles pagination, and extracts comprehensive details from each listing.

### Features

- **Search Results Scraping**: Automatically traverses search results for any given search URL.
- **Detailed Property Data**: Extracts title, price, description, address, size, agency details, and more.
- **Rich Feature Extraction**: Captures structured features like building type, number of rooms, bathrooms, energy class, and various amenities.
- **High-Resolution Images**: Collects all available high-quality images for each property.
- **Pagination**: Supports automatic scrolling/pagination to scrape deep into search results.
- **Configurable Limits**: Set a `maxItems` limit to control the scope of your crawl.

### Input

The actor accepts the following input parameters:

- **`startUrls`** (Array): A list of URLs to start scraping from. These can be search results pages or direct listing URLs.
- **`maxItems`** (Number): The maximum number of property listings to scrape.
- **`proxyConfiguration`** (Object): Configuration for the Apify Proxy. Using residential proxies is recommended for better reliability.

#### Example Input

```json
{
  "startUrls": [
    { "url": "https://www.trovacasa.it/immobili-commerciali-in-affitto/milano" }
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

### Output

Each item in the dataset contains detailed information about a property.

#### Example Output

```json
{
  "title": "Ufficio in affitto a Milano via Gaetano De Castillia, 8",
  "price": "1.100 €",
  "description": "Nel cuore pulsante di Porta Nuova, uno dei distretti direzionali più iconici...",
  "address": "Milano, Via Gaetano De Castillia, 8",
  "size": "40 m²",
  "agencyName": "Sarpi agenzia 2 - Servizi Immobiliari",
  "referenceId": "Castillia uff",
  "features": {
    "Tipologia": "Ufficio",
    "Contratto": "Affitto",
    "Comune": "Milano",
    "Indirizzo": "Via Gaetano De Castillia, 8",
    "Codice annuncio": "TC69949447",
    "Riferimento": "Castillia uff",
    "Prezzo": "1.100 €",
    "Superficie": "40 m²",
    "Numero locali": "",
    "Numero bagni": "1",
    "Classe energetica": "G",
    "Altre caratteristiche": "Arredato",
    "Arredato": true
  },
  "images": [
    "https://pic.trovacasa.it/image/1850836811/m-c.jpg",
    "https://pic.trovacasa.it/image/1850836543/m-c.jpg"
    ...
  ],
  "url": "https://www.trovacasa.it/annunci/mi-tc-66752-69949447"
}
```

***

👀 p.s.

Got feedback or need an extension?

Lexis Solutions is a [certified Apify Partner](https://apify.com/partners/find). We can help you with custom solutions or data extraction projects.

Contact us over [Email](mailto:scraping@lexis.solutions) or [LinkedIn](https://www.linkedin.com/company/lexis-solutions)

### Support Our Work 💝

If you're happy with our work and scrapers, you're welcome to leave us a company review [here](https://apify.com/partners/find/lexis-solutions/review) and leave a review for the scrapers you're subscribed to. It will take you less than a minute but it will mean a lot to us!

Image Credit: https://www.trovacasa.it

# Actor input Schema

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

A list of URLs to start scraping from. Supports search result pages and detail pages.

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

Maximum number of items to scrape.

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

Specifies the proxy that will be used. Using a proxy is highly recommended.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.trovacasa.it/immobili-commerciali-in-affitto/milano"
    }
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.trovacasa.it/immobili-commerciali-in-affitto/milano"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("lexis-solutions/trovacasa-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": [{ "url": "https://www.trovacasa.it/immobili-commerciali-in-affitto/milano" }],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("lexis-solutions/trovacasa-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 '{
  "startUrls": [
    {
      "url": "https://www.trovacasa.it/immobili-commerciali-in-affitto/milano"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call lexis-solutions/trovacasa-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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