# Casa.it Scraper - Italy Real Estate (`benthepythondev/casa-it-scraper`) Actor

Scrape Casa.it Italy property listings, for sale or to rent: price, surface, rooms, bathrooms, floor, full address, coordinates, energy class, agency name, phone and photos. Search by Italian city or paste a search URL.

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

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## 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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## 🏠 Casa.it Scraper - Italy Real Estate Data

Extract property listings from **Casa.it**, one of Italy's largest real-estate portals, in clean structured data. Get every listing's price, surface, rooms, bathrooms, floor, full address, GPS coordinates, energy class, photos, and the **listing agency's name, phone number and office address** — perfect for market research, price analysis and real-estate lead generation. Search any Italian city for sale (*vendita*) or to rent (*affitto*). Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

### 🔎 What is the Casa.it Scraper?

This actor collects real-estate listings from Casa.it's search results and returns them as flat, ready-to-use records. Give it one or more Italian city names (or paste a Casa.it search URL with your own filters) and it paginates through the results, returning rich data for each property — including the contact details of the agency that posted it.

It is fast and reliable: it talks to Casa.it the way a real browser does and reads the data Casa.it itself loads into the page, so you get the same listings you'd see on the site, structured and deduplicated.

#### What data does it extract?

- **Listing identity** — listing id, full Casa.it URL, title, channel (sale/rent).
- **Price** — clean numeric price, formatted price, min/max range, monthly rent flag, and the site's mortgage estimate.
- **Property details** — property type (appartamento, villa, attico…), property group, surface in m², number of rooms, bathrooms, parking spaces, floor/level, energy class, availability.
- **Location** — street, district, zone/quarter, city, province, region, plus **latitude & longitude**.
- **Agency / lead data** — agency name, agency type, **phone number**, office address and city, agency profile URL and website.
- **Media & extras** — main image URL, number of photos, has-video / has-3D-tour flags, highlight labels and the listing description.

### ⬇️ Input

| Field | Type | Description |
|---|---|---|
| `locations` | array | Italian city/town names to search, e.g. `["milano", "roma"]`. |
| `channel` | string | `sale` (vendita) or `rent` (affitto). Default `sale`. |
| `searchUrls` | array | Optional. Paste full Casa.it search URLs to apply your own filters (price, rooms, zone). Pagination is automatic. |
| `maxResults` | integer | Max listings per city / URL. Default `50`. |

#### Example input

```json
{
  "locations": ["milano", "roma"],
  "channel": "sale",
  "maxResults": 50
}
````

Or drive it entirely with a filtered Casa.it URL:

```json
{
  "searchUrls": ["https://www.casa.it/affitto/residenziale/torino/"],
  "maxResults": 100
}
```

### ⬆️ Output

Each result is one property listing. Example:

```json
{
  "id": 54312892,
  "url": "https://www.casa.it/immobili/54312892/",
  "channel": "sale",
  "title": "Bilocale in Via Carlo Dolci 38",
  "property_type": "appartamento",
  "property_type_group": "case",
  "category": "residenziale",
  "price": 269000,
  "price_formatted": "269.000",
  "price_min": 269000,
  "price_max": 269000,
  "price_period": null,
  "currency": "EUR",
  "mortgage_estimate": "779",
  "area_sqm": 52,
  "rooms": 2,
  "bathrooms": 1,
  "parkings": null,
  "floor": "piano rialzato",
  "energy_class": null,
  "availability": "libero",
  "is_auction": false,
  "depth": "platinum",
  "labels": ["PER INVESTIMENTO"],
  "street": "Via Carlo Dolci 38",
  "district": "San Siro, San Carlo",
  "zone": "Selinunte",
  "city": "Milano",
  "province": "MI",
  "province_full": "Milano",
  "region": "Lombardia",
  "latitude": 45.473593,
  "longitude": 9.141392,
  "agency": "Fonte Immobiliare Città Studi 2",
  "agency_type": "Agency",
  "agency_phone": "0289744981",
  "agency_address": "Milano, Via Giovanni Briosi 10",
  "agency_city": "Milano",
  "agency_url": "https://www.casa.it/agenzie/fonte-immobiliare-citta-studi-2-66091/",
  "agency_website": null,
  "description": "Bilocale ristrutturato e arredato Milano San Siro...",
  "image": "https://images-1.casa.it/listing/0/a9/1e/3a/816113986.jpg",
  "num_images": 26,
  "has_video": false,
  "has_3d_tour": false,
  "search": "milano"
}
```

### 💡 Use cases

- 🏷️ **Price & market analysis** — track asking prices, €/m² and inventory across Italian cities and zones over time.
- 📇 **Real-estate lead generation** — build lists of active agencies with their phone numbers and office addresses for outreach.
- 📊 **Comps & valuation** — pull comparable listings by city, surface, rooms and energy class to support valuations.
- 🔁 **Feeds & aggregators** — keep a property portal, CRM or alerting bot in sync by running on a schedule and pushing to your database.

### ❓ FAQ

**Which listings does it return?** The same residential listings you see on Casa.it search results for the city/URL you provide — for sale or to rent — paginated up to your `maxResults`.

**Can I use my own filters (price, rooms, zone)?** Yes. Set up the search on Casa.it, copy the resulting URL into `searchUrls`, and the actor will scrape exactly that filtered result set, page by page.

**Does it return the agency phone number?** Yes, when the listing exposes it. You get the agency name, phone, office address, profile URL and (when present) website.

**How many results can I get?** Casa.it shows thousands of listings per major city. You can page through them; set `maxResults` to control how many you collect per search.

**Do I need to configure a proxy?** No. The actor handles anti-bot for you, routing through Apify's residential Italian IPs automatically — just run it.

**How fresh is the data?** It is scraped live each run, so results reflect what's on Casa.it at that moment. Schedule the actor to keep your dataset current.

**What format can I export?** JSON, CSV, Excel, HTML or via the API — and you can connect it to Make, Zapier or n8n.

**Does it support rent and sale?** Yes — set `channel` to `sale` or `rent`, or paste either a *vendita* or *affitto* search URL.

**Is it legal?** This actor collects only publicly available listing data. You are responsible for using the output in compliance with Casa.it's terms, GDPR and any applicable local laws — for example, marketing outreach to agencies must respect GDPR and Italian e-marketing rules. Do not use personal data for unsolicited spam.

### 🔗 You might also like

- 🇮🇹 Immobiliare.it Scraper — Italy's #1 portal
- 🇮🇹 Subito.it Scraper — Italian classifieds & rentals
- 🇪🇸 Idealista Scraper — Spain real estate
- 🇩🇪 ImmobilienScout24 Scraper — Germany real estate
- 🇳🇱 Funda Scraper — Netherlands real estate

### ⚙️ How it works

The actor loads Casa.it's search-results pages in a real, stealth browser through residential Italian IPs (clearing the site's anti-bot protection), then reads the structured listing data Casa.it embeds in the page (its `__INITIAL_STATE__` application state). Each property is normalized into the flat schema above, deduplicated by listing id, and pushed to your dataset. Pagination follows Casa.it's own paginator until your `maxResults` is reached or there are no more pages.

**Keywords:** casa.it scraper, casa.it api, italy real estate scraper, italian property data, scrape casa.it, immobili italia, case in vendita, case in affitto, real estate lead generation italy, property listings italy, agenzie immobiliari, milano roma property data, apartment scraper italy, rent scraper italy, €/m² analysis, real estate comps italy, property dataset, casa.it listings export.

# Actor input Schema

## `locations` (type: `array`):

Italian city or town names to search, e.g. 'Milano', 'Roma', 'Torino'. Each is turned into a Casa.it location automatically.

## `channel` (type: `string`):

Whether to scrape listings for sale (vendita) or to rent (affitto).

## `searchUrls` (type: `array`):

Optional: paste full Casa.it search-results URLs (e.g. https://www.casa.it/vendita/residenziale/roma/). Pagination is handled automatically. Use this to apply Casa.it filters (price, rooms, zone) directly on the site.

## `maxResults` (type: `integer`):

Maximum number of listings to return per city or search URL.

## Actor input object example

```json
{
  "locations": [
    "milano"
  ],
  "channel": "sale",
  "searchUrls": [],
  "maxResults": 10
}
```

# 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 = {
    "locations": [
        "milano"
    ],
    "channel": "sale",
    "searchUrls": [],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/casa-it-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 = {
    "locations": ["milano"],
    "channel": "sale",
    "searchUrls": [],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/casa-it-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 '{
  "locations": [
    "milano"
  ],
  "channel": "sale",
  "searchUrls": [],
  "maxResults": 10
}' |
apify call benthepythondev/casa-it-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Casa.it Scraper - Italy Real Estate",
        "description": "Scrape Casa.it Italy property listings, for sale or to rent: price, surface, rooms, bathrooms, floor, full address, coordinates, energy class, agency name, phone and photos. Search by Italian city or paste a search URL.",
        "version": "1.0",
        "x-build-id": "jlMG2RqE7pPmIrYDP"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~casa-it-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-casa-it-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/benthepythondev~casa-it-scraper/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-casa-it-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/benthepythondev~casa-it-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-casa-it-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": {
                    "locations": {
                        "title": "Cities / towns",
                        "type": "array",
                        "description": "Italian city or town names to search, e.g. 'Milano', 'Roma', 'Torino'. Each is turned into a Casa.it location automatically.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "channel": {
                        "title": "For sale or to rent",
                        "enum": [
                            "sale",
                            "rent"
                        ],
                        "type": "string",
                        "description": "Whether to scrape listings for sale (vendita) or to rent (affitto).",
                        "default": "sale"
                    },
                    "searchUrls": {
                        "title": "Search URLs (optional)",
                        "type": "array",
                        "description": "Optional: paste full Casa.it search-results URLs (e.g. https://www.casa.it/vendita/residenziale/roma/). Pagination is handled automatically. Use this to apply Casa.it filters (price, rooms, zone) directly on the site.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results per search",
                        "minimum": 1,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Maximum number of listings to return per city or search URL.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
