# Immobiliare.it Scraper (`one-api/immobiliare-scraper`) Actor

Scrape Immobiliare.it, Italy's #1 property marketplace. Look up listings by id or URL, search for sale or rent by city/comune or URL with filters, resolve locations via autocomplete, and pull agencies (by area, profile, listings).

- **URL**: https://apify.com/one-api/immobiliare-scraper.md
- **Developed by:** [ONE API](https://apify.com/one-api) (community)
- **Categories:** Lead generation, Real estate
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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 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

## Immobiliare.it Scraper

Scrape **Immobiliare.it**, Italy's #1 real-estate marketplace. Look up listings by property id or URL, search for sale (*vendita*) or rent (*affitto*) by city / comune / region or an immobiliare.it results URL with full filters, resolve locations via autocomplete, and pull real-estate agencies (by area, full profile, and their active listings).

### What it does

- **🏠 Property Details** — auto-detects each input as a numeric property id (`/details/byid`) or an `immobiliare.it` listing URL (`/details/byurl`); returns the full record: price, surface, rooms, energy class, features, photos, description, and agency contact.
- **🔎 Search Listings** — auto-detects a free-text location (`/search/bylocation`) or an immobiliare.it results URL (`/search/byurl`). Contract, category, typology, price / surface / rooms ranges, bathrooms, condition, features, exclude-auctions and sort all apply.
- **🔍 Location Autocomplete** — resolve free text to comune / province / region / zone ids (`/autocomplete`) you can feed back into a search.
- **🏢 Agencies by area** — real-estate agencies operating in a municipality (`/agent/search`).
- **👤 Agency profile & listings** — for each agency id: one profile row (`/agent/details`) plus one row per active listing (`/agent/listings`).

### Output

- **One flat dataset row per listing / agency / suggestion** — sortable, filterable, CSV / Excel / JSON exportable.
- Columns: `Mode`, `Input Given`, `ID`, `Title`, `Contract`, `Property Type`, `Price`, `Price Formatted`, `Surface m²`, `Rooms`, `Bathrooms`, `Floor`, `Address`, `City`, `Province`, `Region`, `Zip`, `Latitude`, `Longitude`, `Agency Name`, `Agency Phone`, `Cover Photo`, `Listing URL`.
- The complete upstream JSON for each row is kept in the `Raw` column for power users.

### Inputs

- Each section is independent — fill only the ones you need; multiple inputs per section, one per line.
- The Search filters (contract, category, ranges, sort, pages, results-per-page) apply to every `/search/bylocation` query and cap the pages of agency listings.

### Pricing

- Pay per result: **$3 per 1,000 dataset items** — the same rate on every Apify plan tier.
- Apify start fee: $0.00005 per run.

### Notes

- Immobiliare serves **20 listings per page** — raise *Pages per search* to fetch more.
- Search is **administrative-area based** (city / comune / province / region / zone), not radius or bounding-box.
- Prices are in **EUR (€)**; surfaces in **m²**. `Rooms` can be a range (e.g. `2-4`) for new-construction projects.

### Errors

- Failures land in the dataset as rows with `Mode = "ERROR"` and the upstream message in `Title` — nothing is silently dropped.

# Actor input Schema

## `property_inputs` (type: `array`):

Auto-detects each entry and calls the right endpoint:
• Digits only (e.g. `116128813`) → `/details/byid`
• `https://www.immobiliare.it/annunci/...` → `/details/byurl`

Each row = one full property record (price, surface, rooms, energy class, features, photos, agency contact).

## `search_inputs` (type: `array`):

Auto-detects each entry and routes to the right `/search/*` endpoint:
• `https://www.immobiliare.it/vendita-case/milano/` (a results URL) → `/search/byurl` (its location, contract and filters are applied automatically)
• Anything else (city / comune / province / region, e.g. `Milano`, `Roma`) → `/search/bylocation`

The filters below apply to every `bylocation` query. Each hit returns one row per listing.

## `searchType` (type: `string`):

Sale (vendita) or rent (affitto). Applies to `/search/bylocation`.

## `propertyCategory` (type: `string`):

Top-level category to search.

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

Only when category = Residential. Comma-separate for multiple; leave empty for all types.
Values: `apartment`, `villa`, `townhouse`, `detached`, `loft`, `penthouse`, `farmhouse`.

## `priceRange` (type: `string`):

Format: `min:200000,max:500000` — or just `min:200000` / `max:500000`.

## `surfaceRange` (type: `string`):

Format: `min:80,max:150` — or just `min:80` / `max:150`.

## `roomsRange` (type: `string`):

Format: `min:3,max:5` — or just `min:3` / `max:5`.

## `bathrooms` (type: `string`):

Minimum number of bathrooms (upstream buckets 1–4, where 4 means 4+). Leave empty for any.

## `condition` (type: `string`):

Property state. Leave as Any for no filter.

## `features` (type: `string`):

Comma-separate for multiple; leave empty for any.
Values: `balcony`, `terrace`, `garden`, `elevator`, `garage`, `pool`, `cellar`, `furnished`.

## `excludeAuctions` (type: `boolean`):

Turn on to drop auction listings from search results.

## `sortOrder` (type: `string`):

Result ordering for `/search/bylocation`.

## `pages` (type: `integer`):

How many pages to fetch for each search query (20 listings per page). Also caps pages of agency listings.

## `resultCount` (type: `integer`):

Listings per page, 1–20 (upstream page size is fixed at 20).

## `autocomplete_inputs` (type: `array`):

Free text resolved to comune / province / region / zone ids via `/autocomplete`. Feed the returned ids back into a search if you want an exact scope. Each suggestion = one row.

## `agency_area_inputs` (type: `array`):

Real-estate agencies operating in a municipality, via `/agent/search`. Accepts a city name (e.g. `Milano`) or a numeric comune id. Each agency = one row.

## `agency_ids` (type: `array`):

For each numeric agency id the actor fetches `/agent/details` (one profile row) plus `/agent/listings` (one row per active listing, up to `Pages per search` pages). Agency ids come from the Agencies-by-area section or a listing's agency block.

## Actor input object example

```json
{
  "property_inputs": [
    "116128813",
    "https://www.immobiliare.it/annunci/116128813/"
  ],
  "search_inputs": [
    "Milano"
  ],
  "searchType": "For_Sale",
  "propertyCategory": "residential",
  "propertyType": "",
  "priceRange": "",
  "surfaceRange": "",
  "roomsRange": "",
  "bathrooms": "",
  "condition": "",
  "features": "",
  "excludeAuctions": false,
  "sortOrder": "relevance",
  "pages": 1,
  "resultCount": 20,
  "autocomplete_inputs": [
    "Milano"
  ],
  "agency_area_inputs": [
    "Milano"
  ],
  "agency_ids": [
    "439495"
  ]
}
```

# 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 = {
    "property_inputs": [
        "116128813",
        "https://www.immobiliare.it/annunci/116128813/"
    ],
    "search_inputs": [
        "Milano"
    ],
    "autocomplete_inputs": [
        "Milano"
    ],
    "agency_area_inputs": [
        "Milano"
    ],
    "agency_ids": [
        "439495"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("one-api/immobiliare-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 = {
    "property_inputs": [
        "116128813",
        "https://www.immobiliare.it/annunci/116128813/",
    ],
    "search_inputs": ["Milano"],
    "autocomplete_inputs": ["Milano"],
    "agency_area_inputs": ["Milano"],
    "agency_ids": ["439495"],
}

# Run the Actor and wait for it to finish
run = client.actor("one-api/immobiliare-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 '{
  "property_inputs": [
    "116128813",
    "https://www.immobiliare.it/annunci/116128813/"
  ],
  "search_inputs": [
    "Milano"
  ],
  "autocomplete_inputs": [
    "Milano"
  ],
  "agency_area_inputs": [
    "Milano"
  ],
  "agency_ids": [
    "439495"
  ]
}' |
apify call one-api/immobiliare-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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