Skip to main content

Complete Guide: How to Scrape Immobiliare.it Using Python

Extract Italian sale and rent property listings from Immobiliare.it into Python with the Apify Actor, then rank rentals per square metre.

Updated 12 min readMarkdown
Complete Guide: How to Scrape Immobiliare.it Using Python

This complete guide to Immobiliare.it Scraper shows how to scrape Immobiliare.it property listings from Python through the Apify API and receive structured dictionaries: asking price or monthly rent in euros, price reduction history, surface area in square metres, rooms, bedrooms, bathrooms, floor and elevator flags, coordinates, photo URLs, and public agency and agent contact details.

Collecting Italian property listings across a city, province, or region by hand means paging through search results where each page shows 25 cards and the site stops serving pages past page 80 (2,000 listings per query). Whether you are comparing rental yields across neighbourhoods, auditing agency inventory, or building a dataset of asking prices per square metre, you need structured rows rather than HTML pages. In this tutorial you will configure the Immobiliare.it Scraper Apify Actor (reventadata/immobiliare-scraper), run a search from Python, inspect the 53-field output schema, and rank Torino rentals by monthly rent per square metre. Prerequisites are minimal: Python 3.11+, the apify-client package, and an Apify account.

This Actor is unofficial and not affiliated with Immobiliare.it.

TL;DR

In this tutorial you will learn to install apify-client, configure an Immobiliare.it search (contract, location, price/surface/room filters, and sortBy), trigger the Actor on Apify, and iterate over the resulting dataset items in Python. The Actor is available at apify.com/reventadata/immobiliare-scraper. Expected outcome: a list of 53-field JSON records, one per property listing, that we filter and sort to rank Torino rentals by monthly rent per square metre.

Prerequisites and setup

To follow this walkthrough you need Python 3.11 or newer (apify-client 3.x requires Python 3.11+), a free Apify account, and your API token. Apify Console is the web workspace where runs, datasets, tasks, and API tokens are managed; your token is located under API & Integrations in Apify Console. Official platform documentation is at docs.apify.com. Proxy is handled for you, so you do not need a separate proxy subscription on your machine.

Install the official Python client:

pip install -U "apify-client~=3.0"

Export your API token in your shell environment so it is never hardcoded in your script:

export APIFY_API_TOKEN="your_apify_token_here"

Understanding Immobiliare.it Scraper

Immobiliare.it Scraper turns an immobiliare.it search for homes for sale (vendita-case) or for rent (affitto-case) into structured dataset records. Behind the scenes, proxy is handled for you, and the Actor parses each search page into structured rows.

The Actor skips a listing whose id it has already pushed, since listing order can shift between page fetches.

Be aware of the site boundary: Immobiliare.it serves at most 80 pages (2,000 results) per search query (the site stops serving results after page 80 even when the total number of listings is larger).

Step-by-step guide to scrape Immobiliare.it with Python

Step 1: Access the Actor on Apify Store

Visit the Immobiliare.it Scraper page on Apify Store to review the input parameters and output view. Since we run the Actor through the Python SDK, we pass our configuration directly in code.

Step 2: Configure input parameters

Every filter parameter below is sent directly to immobiliare.it in the query string, so the server filters the listings before any page is returned:

Parameter Type Default Description
contract string "sale" "sale" (vendita-case) or "rent" (affitto-case).
location string "torino" Location slug from an Immobiliare.it search URL, e.g. "torino", "milano", "torino-provincia", or "lombardia".
minPrice, maxPrice integer unset Minimum and maximum price in EUR (prezzoMinimo, prezzoMassimo); monthly rent on rent searches.
minSurface integer unset Minimum floor area in m² (superficieMinima).
minRooms, maxRooms integer unset Minimum and maximum rooms (localiMinimo, localiMassimo).
sortBy string "relevance" "relevance" (site default) or "priceAscending" (criterio=prezzo&ordine=asc).
maxItems integer 1000 Maximum dataset rows to store before stopping.
maxPages integer 80 Maximum result pages to fetch (25 ads per page), capped at 80.

Both contract and sortBy are schema enums: passing any value outside their allowed options is refused before the run starts. In addition, the Actor validates location against ^[a-z0-9]+(?:-[a-z0-9]+)*$ and checks that minPrice <= maxPrice and minRooms <= maxRooms before sending any request.

Here is the setup in Python for a rental search in Torino (500 to 900 EUR/month, at least 2 rooms):

import os
from apify_client import ApifyClient

# 1. Initialize the client with your token from the environment
client = ApifyClient(os.environ["APIFY_API_TOKEN"])

# 2. Describe the search: rent in Torino, 500 to 900 EUR/month, at least 2 rooms
run_input = {
    "contract": "rent",
    "location": "torino",
    "minPrice": 500,
    "maxPrice": 900,
    "minRooms": 2,
    "sortBy": "relevance",
    "maxItems": 20,
    "maxPages": 1,
}

Step 3: Run the Actor and retrieve dataset items

Calling .call(run_input=run_input) starts the Actor container on Apify, waits for the run to finish, and returns a typed Run object. Always verify run.status == "SUCCEEDED" before reading items from run.default_dataset_id:

# 3. Start the Actor and wait for it to finish
run = client.actor("reventadata/immobiliare-scraper").call(run_input=run_input)
if run is None or run.status != "SUCCEEDED":
    status = run.status if run else "unknown"
    raise SystemExit(f"Run did not succeed (status: {status}).")

# 4. Read the rows from the run's default dataset
items = client.dataset(run.default_dataset_id).list_items().items
print(f"Retrieved {len(items)} listings.")

Step 4: Print the first rows

Each item in items is a Python dictionary matching the 53-field dataset schema. Because priceText, surfaceText, or agencyName can be None (for example on private-seller listings or unpriced properties), use fallbacks when formatting output:

for item in items[:3]:
    price_text = item["priceText"] or "price on request"
    surface_text = item["surfaceText"] or "surface n/a"
    seller = item["agencyName"] or item["agentType"] or "seller n/a"
    print(item["title"])
    print(f'  {price_text} | {surface_text} | rooms: {item["rooms"]} | floor: {item["floor"]}')
    print(f'  {item["neighbourhood"]}, {item["city"]} | {seller} ({item["agencyPhone"] or "no phone"})')
    print(f'  {item["url"]}')

Step 5: Inspect a sample record

Below is a record from the sample rows from a run on 2026-11-10 using the Torino rental input above (photos is shortened here from 44 thumbnail URLs to the first two):

{
  "id": "122075776",
  "url": "https://www.immobiliare.it/annunci/122075776/",
  "title": "Trilocale via Francesco Cigna 44, Aurora, Torino",
  "contract": "rent",
  "adType": "ad",
  "price": 800,
  "priceText": "€ 800/mese",
  "priceVisible": true,
  "priceOriginalText": "€ 1.010",
  "priceReductionPercent": 20.8,
  "priceReducedOn": "29/10/2026",
  "typology": "Trilocale",
  "category": "Residenziale",
  "isProject": false,
  "projectUnits": null,
  "isNew": false,
  "isLuxury": false,
  "rooms": "3",
  "bedrooms": 2,
  "bathrooms": "1",
  "surfaceText": "85 m²",
  "surfaceM2": 85,
  "floor": "3",
  "floorText": "3°",
  "hasElevator": null,
  "condition": "Ottimo / Ristrutturato",
  "heating": "Centralizzato",
  "features": [
    "fibra ottica",
    "porta blindata",
    "balcone",
    "impianto tv centralizzato",
    "arredato",
    "esposizione doppia"
  ],
  "caption": "AFFITTASI TRILOCALE RISTRUTTURATO VICINO AL CENTRO DI TORINO",
  "description": null,
  "address": "Via Francesco Cigna",
  "zone": "Aurora, Barriera di Milano, Rebaudengo",
  "neighbourhood": "Aurora",
  "city": "Torino",
  "province": "Torino",
  "region": "Piemonte",
  "latitude": 45.0836,
  "longitude": 7.6796,
  "imageUrl": "https://pwm.im-cdn.it/image/1754187330/xxl.jpg",
  "photoCount": 44,
  "photos": [
    "https://pwm.im-cdn.it/image/1754187330/xxs-c.jpg",
    "https://pwm.im-cdn.it/image/1754187342/xxs-c.jpg"
  ],
  "agencyId": 197355,
  "agencyName": "Studiocasa",
  "agencyType": "agenzia",
  "agencyPhone": "011 1980 1344",
  "agencyPhones": [
    "011 1980 1344"
  ],
  "agencyUrl": "https://www.immobiliare.it/agenzie-immobiliari/197355/studio-casa-torino/",
  "agentName": "Guglielmo Marino",
  "agentType": "agente immobiliare",
  "agentPhone": "011 1980 1344",
  "agentPhones": [
    "011 1980 1344"
  ],
  "transactionDate": null,
  "searchUrl": "https://www.immobiliare.it/affitto-case/torino/?prezzoMinimo=500&prezzoMassimo=900&localiMinimo=2"
}

Step 6: Rank rentals by monthly rent per square metre

Because price and surfaceM2 are parsed as integers whenever a listing states a single numeric value, we can rank standard listings by monthly rent per square metre (price / surfaceM2), excluding multi-unit project tiles (isProject):

# 5. Rank rentals by monthly rent per square metre (EUR/m2)
ranked = [
    item for item in items
    if item["price"] is not None and item["surfaceM2"] and not item["isProject"]
]
ranked.sort(key=lambda i: i["price"] / i["surfaceM2"])
print("Cheapest per m2:")
for item in ranked[:5]:
    per_m2 = item["price"] / item["surfaceM2"]
    seller = item["agencyName"] or item["agentType"] or "n/a"
    print(
        f'{per_m2:5.1f} EUR/m2 | {item["price"]:4d} EUR | '
        f'{item["surfaceM2"]:3d} m2 | rooms: {item["rooms"]} | '
        f'{item["neighbourhood"]} | {seller}'
    )

Running this snippet over the sample rows from a run on 2026-11-10 produces:

Cheapest per m2:
  9.4 EUR/m2 |  800 EUR |  85 m2 | rooms: 3 | Aurora | Studiocasa
 10.0 EUR/m2 |  600 EUR |  60 m2 | rooms: 2 | Don Bosco | Studiocasa
 10.0 EUR/m2 |  750 EUR |  75 m2 | rooms: 3 | Aurora | Studiocasa
 13.3 EUR/m2 |  600 EUR |  45 m2 | rooms: 2 | Parella | Immobiliare Michielin
 13.5 EUR/m2 |  850 EUR |  63 m2 | rooms: 3 | Cittadella | RE/MAX Vivere

Working with the API

The Apify Python client wraps the Apify platform API. When you invoke client.actor("reventadata/immobiliare-scraper").call(run_input=run_input), the client starts the Actor and blocks until the run reaches a terminal state, returning a typed Run object with run.status and run.default_dataset_id. In apify-client 3.x, call() is typed Run | None, which is why our script checks if run is None or run.status != "SUCCEEDED" before reading any dataset items. For long multi-page sweeps where holding a synchronous connection open is undesirable, invoke .start(run_input=run_input) instead to launch the container asynchronously and return immediately.

To process results without loading an entire dataset into memory at once, replace list_items().items with client.dataset(run.default_dataset_id).iterate_items(), which streams dictionaries page by page. You can also attach an Apify webhook when starting a run through the API so that Apify sends an HTTP POST to your URL on a run event, with a payload that includes a resource object describing the run.

To automate recurring collection, save your input configuration as a reusable Actor task and attach an Apify schedule using a cron expression. If you need to inspect execution details programmatically, client.log(run.id).get() retrieves the run log text, which reports page progress, any duplicate IDs skipped across pages, and the final Pushed N row(s). count.

Advanced usage patterns

Sharding searches past the 80-page ceiling. Immobiliare.it serves at most 80 pages (2,000 ads) per query; the site stops serving results after page 80 even when the total number of ads is larger (for example, 8,662 ads on Torino sale searches and 133,213 on Lombardia in checks on 2026-11-07). When total ads exceed 2,000, the Actor logs a ceiling warning. To capture a large city or region completely, split your sweep into non-overlapping price bands (minPrice and maxPrice), surface thresholds (minSurface), or room counts (minRooms and maxRooms), run each slice sequentially from Python, and deduplicate the combined rows by id.

Sorting by lowest price first. Setting sortBy: "priceAscending" adds criterio=prezzo&ordine=asc to the Immobiliare.it URL. In a check on 2026-11-07 on Torino rentals with minPrice: 500, maxPrice: 900, and minRooms: 2, the site reported 775 matching ads on 31 pages and returned prices ordered from 500 EUR upward.

Comparing neighbourhoods and seller types. Every row carries zone (macrozone), neighbourhood (microzone), city, province, and region alongside latitude and longitude. Grouping rows by neighbourhood in Python lets you compare median asking prices per square metre across city districts and identify discounted stock (priceReductionPercent), while checking agentType == "privato" vs agencyType == "agenzia" separates private-owner rentals from agency-managed stock.

Understanding your data

Each record contains 53 fields. The parser keeps both the raw display strings and normalized numeric values where available:

  • Prices and discounts: price is an integer in EUR (null when priceVisible is false, where priceText is "prezzo su richiesta"). Discounted listings populate priceOriginalText, priceReductionPercent (converted from the site's decimal comma, such as "8,3" to 8.3), and priceReducedOn (dd/mm/yyyy).
  • Special listing types: Searches can include property auctions (contract: "auction", adType: "auction"), closed ads (transactionDate set to dd/mm/yyyy), and multi-unit new developments (isProject: true, projectUnits set to the unit count, and price set to the lowest unit price).

Here is an excerpt of a project tile from a capture of Torino sale listings dated 2026-11-07:

{
  "id": "97492960",
  "title": "Appartamenti e Attici di nuova costruzione a Torino",
  "contract": "sale",
  "price": 298000,
  "priceText": "€ 298.000 - € 1.009.000",
  "typology": "Progetto",
  "category": "Nuove costruzioni",
  "isProject": true,
  "projectUnits": 10,
  "rooms": "2 - 5+",
  "bedrooms": null,
  "surfaceText": "66 m²",
  "surfaceM2": 66,
  "agencyName": "Residenza PARCO SUL PO",
  "agencyType": "Impresa Edile",
  "agencyPhones": [
    "011 771 5000",
    "366 509 2054"
  ]
}

Troubleshooting guide

  • Run succeeded with an empty dataset: When nothing matched on immobiliare.it, the run finishes SUCCEEDED with a status message; broaden minPrice, maxPrice, minSurface, or minRooms.
  • Run failed with a location error on page 1: If the location slug does not exist on immobiliare.it, the run ends FAILED naming the location slug. Copy the exact slug after /vendita-case/ or /affitto-case/ from a real search URL.
  • Run failed before fetching any page: Passing minPrice > maxPrice, minRooms > maxRooms, negative numbers, or a malformed slug fails input validation up front. Values outside the schema enums for contract or sortBy are refused before the run starts.
  • Run stopped early or failed: If three pages in a row cannot be read or the run clock is nearly out, the Actor stops and keeps the pushed rows; a 0-row run with failed pages ends FAILED with a status message. Check client.log(run.id).get() or the Store page.

Best practices

  • Test with maxPages: 1 and maxItems: 20: Verify your downstream field mappings on a single page before running deep pagination.
  • Set a run timeout that matches your page cap: A run with many pages takes longer; raise the run timeout when you request many pages.
  • Filter out isProject and adType == "auction" for unit-price metrics: Project tiles report a range in priceText and the minimum unit price in price, while auctions (contract: "auction") are a different kind of sale.
  • Respect null values: Private listings (agentType: "privato") have null agency and agent names and phones, and "prezzo su richiesta" listings have price: null.

Conclusion and next steps

You now have a complete Python workflow to configure Immobiliare.it Scraper, fetch structured 53-field property records from Italy's real-estate portal, handle project tiles and price reductions, and rank listings per square metre. For current pricing and details, see the Store page.

Resources:

Try Immobiliare.it Scraper yourself and let me know what you build!

About the author: reventadata builds and maintains marketplace scrapers on the Apify Store.

About the author

  • Hi, I'm the engineer behind ReventaData. I build pay-per-event Apify Actors that turn public marketplace, classifieds, jobs and real-estate sites into clean, reliable datasets. Here on Hashnode, I share practical tutorials on collecting structured web data with Python and Apify, and on putting it to work: price tracking, lead lists and market analysis. Explore our turnkey scrapers: https://apify.com/reventadata

No comments yet. Be the first to comment.