# Casa.it Property Discovery Scraper (`trovevault/casa-it-property-discovery-scraper`) Actor

Discover public Casa.it property listings by location, sale or rent, and property type. Extract prices, descriptions, areas, rooms, images, agents, and URLs.

- **URL**: https://apify.com/trovevault/casa-it-property-discovery-scraper.md
- **Developed by:** [Trove Vault](https://apify.com/trovevault) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.85 / 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/platform/actors/running/actors-in-store#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

## Casa.it Property Discovery Scraper

Discover public Casa.it real estate listings by Italian city, sale or rent, and property type. The actor returns normalized property rows with prices, price per square meter, areas, rooms, descriptions, features, agencies, images, and listing URLs, so you can compare market supply without manually collecting search result links.

### Why Use This Actor

Casa.it is one of Italy's major property portals, but its listings are designed for browsing one city at a time. This actor turns those public search and detail pages into a clean Apify dataset for:

- tracking available apartments or houses in a target Italian city;
- collecting comparable sale or rental listings for market research;
- building lead lists for agencies, investors, relocation teams, and property analysts;
- feeding TroveVault or Apify workflows that combine multiple real estate portals into one dataset.

The input is intentionally simple. You provide the market and business filters. The actor resolves Casa.it routes internally and does not ask for `searchUrls`.

### What It Extracts

For each valid public listing, the actor can save:

- listing identity: `platform`, `listingId`, `title`, `url`;
- search context: `operation`, `propertyType`;
- pricing: `price`, `currency`, `priceText`, `pricePerM2`;
- property facts: `areaM2`, `bedrooms`, `bathrooms`;
- location: `address`, `city`, `country`;
- listing content: `description`, `features`;
- seller and media: `sellerName`, `mainImage`, `images`;
- workflow metadata: `listedAtText`, `scrapedAt`, `runId`.

Rows missing a public title, description, price text, or main image are skipped rather than saved as empty records.

### Input

```json
{
  "location": "Rome",
  "operation": "sale",
  "propertyType": "apartment",
  "maxItems": 50
}
```

#### Input Fields

| Field | Type | Description |
| --- | --- | --- |
| `location` | string | Italian city to discover. Use English names where common, for example `Rome`, `Milan`, `Turin`, `Naples`, `Florence`, `Bologna`, `Palermo`, or `Genoa`. |
| `operation` | select | `sale` or `rent`. |
| `propertyType` | select | `any`, `apartment`, `house`, `land`, or `commercial`. |
| `maxItems` | integer | Maximum number of valid listings to save. Use small values for tests and larger values for market discovery. |
| `datasetId` | string | Optional Apify dataset ID. When supplied, rows are appended there as well as to the run's default dataset. |
| `runId` | string | Optional workflow ID copied into each output row and run summary. |

Stable city examples include Rome, Milan, Turin, Naples, Florence, Bologna, Palermo, Genoa, Venice, Verona, Padua, Bari, and Catania. City-level discovery is used because it is more stable than broad country-level discovery for daily Store tests.

### Output Example

```json
{
  "platform": "Casa.it",
  "listingId": "52817249",
  "title": "Trilocale in Vendita in Via Prospero Santacroce 154 a Roma - 95mq - Casa.it",
  "url": "https://www.casa.it/immobili/52817249/",
  "operation": "sale",
  "propertyType": "apartment",
  "price": 298000,
  "currency": "EUR",
  "priceText": "EUR 298000",
  "pricePerM2": 3137,
  "areaM2": 95,
  "bedrooms": 2,
  "bathrooms": 1,
  "address": "Via Prospero Santacroce 154, Roma, RM",
  "city": "Roma",
  "country": "Italy",
  "description": "Three-room apartment for sale...",
  "features": ["95 m2", "2 bedrooms", "1 bathrooms"],
  "sellerName": "ASSO PROGRAMMA CASA SRL U.",
  "mainImage": "https://images-1.casa.it/...",
  "images": ["https://images-1.casa.it/..."],
  "scrapedAt": "2026-07-29T11:28:20.470Z",
  "runId": "optional-parent-run"
}
```

`pricePerM2` is calculated only when both numeric `price` and `areaM2` are visible. If Casa.it shows a private negotiation price, the actor keeps `priceText` as `Price on request` and omits numeric price fields.

### API Usage

```bash
curl -X POST "https://api.apify.com/v2/acts/trovevault~casa-it-property-discovery-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"location":"Rome","operation":"sale","propertyType":"apartment","maxItems":50}'
```

After the run finishes, download the dataset items:

```bash
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?clean=true" \
  -H "Authorization: Bearer $APIFY_TOKEN"
```

### Practical Workflows

- **Market research:** collect current sale listings in Rome, Milan, or Naples and compare prices per square meter.
- **Rental monitoring:** run scheduled rent discovery for target cities and append rows to a shared dataset.
- **Lead generation:** collect listing URLs, agencies, descriptions, and images for sales outreach or enrichment.
- **Portfolio coverage:** combine this actor with other TroveVault real estate discovery actors to compare supply across countries.

### Troubleshooting

If the actor saves fewer rows than `maxItems`, the most common reasons are duplicate listings, listings filtered out by `propertyType`, or pages missing required public fields such as a usable main image.

If a city is rejected, use a supported city name in English where possible. For example, use `Rome` instead of a full search URL.

If `pricePerM2` is missing, Casa.it did not expose either a numeric price or a usable area for that listing.

### Limitations

- This actor discovers listings from public Casa.it pages. It does not log in or access private user data.
- Country-wide discovery is not exposed because city routes are more reliable.
- Listing availability can change quickly on real estate portals.
- Some listings use private negotiation pricing. Those rows preserve `priceText` but omit numeric price calculations.
- The actor normalizes output fields in English, while some source labels remain visible inside `features`.

### FAQ

**Can I pass Casa.it search result URLs?**\
No. This is a discovery actor. Use `location`, `operation`, and `propertyType`.

**Does it support sale and rent?**\
Yes. Use `operation: "sale"` or `operation: "rent"`.

**Can it append to my own dataset?**\
Yes. Pass `datasetId` to append every saved row to a shared Apify dataset.

**Is this suitable for scheduled runs?**\
Yes. Keep the default input small for smoke tests, or schedule larger runs for monitored cities.

### Changelog

- `0.1` - Initial TroveVault discovery actor for Casa.it public property listings.

# Actor input Schema

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

Italian city to search. Use English names, for example Rome, Milan, Turin, Naples, Florence, Bologna, Palermo, or Genoa. City-level searches are more stable than broad country searches.

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

Choose whether to discover Casa.it properties offered for sale or for rent.

## `propertyType` (type: `string`):

Choose the type of property to discover. Use Any to return the broadest listing set supported by Casa.it.

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

Maximum number of property listings to return. Use smaller values for quick checks and higher values for broader market discovery.

## `datasetId` (type: `string`):

Optional Apify dataset ID to append each saved listing to, in addition to this run's default dataset. Use this when chaining multiple discovery actors into one shared dataset.

## `runId` (type: `string`):

Optional external or Apify run ID copied into each output row and RUN\_SUMMARY. Use this to trace listings back to a parent workflow run.

## Actor input object example

```json
{
  "location": "Rome",
  "operation": "sale",
  "propertyType": "apartment",
  "maxItems": 3
}
```

# Actor output Schema

## `datasetUrl` (type: `string`):

No description

## `savedListings` (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 = {
    "location": "Rome"
};

// Run the Actor and wait for it to finish
const run = await client.actor("trovevault/casa-it-property-discovery-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 = { "location": "Rome" }

# Run the Actor and wait for it to finish
run = client.actor("trovevault/casa-it-property-discovery-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 '{
  "location": "Rome"
}' |
apify call trovevault/casa-it-property-discovery-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/X7vDNtUulHE1OqV1g/builds/D3PBT1isEoWZCaYIu/openapi.json
