Skip to main content

Complete Guide: How to Scrape Subito.it Using Python and Apify

Turn Subito.it searches into JSON rows with Python and the Apify client: prices, places, seller fields and category attributes.

Updated 12 min readMarkdown
Complete Guide: How to Scrape Subito.it Using Python and Apify

Subito.it is an Italian classifieds site covering phones, apartments, cars, motorbikes and scooters. Its result pages are designed for people reading one screen at a time, which makes price comparison, market snapshots and listing alerts tedious to do by hand.

This guide shows how to get those listings as structured rows instead. We use the Apify Actor Subito.it Scraper (reventadata/subito-scraper) and drive it from Python with the official Apify client. You will configure a search, start a run, read the dataset, and learn what each column means and where the limits are.

The sample row and the observations in this guide come from one run of the Actor on 2026-11-15: keyword iphone, all of Italy, ten rows, finished in about four seconds. Every step below runs on its own, and we also cover the API side: tokens, statuses and webhooks.


TL;DR

In this tutorial you will learn to run reventadata/subito-scraper from Python with a keyword, a category and a region, and to read one row per listing: price in euros, condition, region, province and town, seller fields, posting time, photos and category attributes. Steps: install the client, set a token, define run_input, call the Actor, print the rows. The expected outcome is a list of listing rows you can filter, sort and export. The Actor page is on the Apify Store.


Prerequisites and setup

You need three things:

  1. Python 3.11 or newer. The Apify client for Python 3.x requires it.
  2. An Apify account. Sign up on apify.com and copy your API token from API & Integrations in Apify Console. The Console is Apify's web workspace for running Actors and reading their results.
  3. The Apify client for Python, installed with a version pin so that an older 2.x install moves up:
pip install -U "apify-client~=3.0"

Keep the token out of your source code:

export APIFY_API_TOKEN="your_apify_token_here"

See the Apify Python client documentation for the full client reference.


Understanding Subito.it Scraper

The Actor reads Subito.it's public search result pages, no login needed, and turns each listing into one dataset row. A result page holds up to 30 organic listings, and the site serves at most 300 pages per search, so one keyword yields at most 9,000 rows.

Key capabilities:

  • Search by keyword, category, region and province, or browse a category and place with no keyword.
  • Price limits (minPrice, maxPrice) in euros, applied after the pages are read.
  • Duplicate removal by listing id across pages and across keywords.
  • Category columns for real estate (rooms, bathrooms, area, floor, energy class, building condition) and vehicles (brand, year, mileage, fuel, gearbox), plus a features object with every attribute the listing carries.

Limitations to know before you build on it:

  • It reads search results only. It does not open detail pages and does not return phone numbers.
  • It has no text filter of its own; relevance is Subito's.
  • My run searched phones, so I have not seen the real estate or vehicle columns filled in a run of mine; they were null on all ten rows. Check them on your category before relying on them.

Step-by-step guide

Step 1: Open the Actor

Open the Subito.it Scraper page on Apify Store. It documents the input fields and the dataset columns. Here we call the Actor from code, so the Store page is the reference rather than the interface.

Step 2: Configure the input

The Actor takes these inputs:

Input Meaning
searchQueries Keywords, one search each. An empty list browses the category and place.
category usato (all categories, default), immobili, appartamenti, moto-e-scooter, telefonia, auto.
region A region slug such as lombardia; italia (default) is the whole country.
province Optional slug such as milano.
minPrice, maxPrice Optional limits in euros.
includeSponsored Keep the sponsored-looking gallery listings. Off by default.
maxPages Pages per keyword, 1 to 300.
maxItems Cap on rows across all keywords.

Copy slugs from a real Subito.it search URL. Three example configurations: a keyword across Italy (below, the input behind my sample row), a keyword inside one region (set "region": "lombardia"), and a category browse with no keyword (Step 3).

import os
from apify_client import ApifyClient

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

# 2. One keyword, all of Italy, all categories, first result page only
run_input = {
    "searchQueries": ["iphone"],
    "category": "usato",
    "region": "italia",
    "maxPages": 1,
    "maxItems": 10,
}

Step 3: Advanced configuration

Price limits trade speed for precision: the Actor reads full pages and then drops rows outside minPrice and maxPrice. While a limit is set, listings with no price are dropped as well. includeSponsored keeps the 12 gallery listings that each result page carries and that look sponsored; they are skipped by default, and kept rows have isSponsored set to true.

A category browse with no keyword, for apartments in the province of Milan up to 300000 EUR:

# Browse a category and place without a keyword:
# apartments in the province of Milan, up to 300000 EUR
run_input = {
    "searchQueries": [],
    "category": "appartamenti",
    "region": "lombardia",
    "province": "milano",
    "maxPrice": 300000,
    "maxItems": 20,
}

Step 4: Run the Actor

The client starts the Actor in Apify's cloud and waits for the run to finish. Check the run status before you read the dataset:

# 3. Start the Actor and wait for the run to finish
run = client.actor("reventadata/subito-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
dataset = client.dataset(run.default_dataset_id).list_items().items
print(f"Retrieved {len(dataset)} listings.\n")

A run moves from running to succeeded or failed, and a call from code simply blocks until it ends. You can follow the run in Apify Console while it works.

Step 5: Examine the results

Print the fields most readers need. Category columns such as rooms are null outside their category, so read them with .get():

for item in dataset:
    title = item.get("title")
    price = item.get("price")
    town = item.get("town")
    province = item.get("province")
    condition = item.get("condition")
    posted_at = item.get("postedAt")

    print(f"Listing: {title}")
    if price is None:
        print("  Price: not listed")
    else:
        print(f"  Price: {price:.0f} EUR")
    print(f"  Place: {town} ({province})")
    if condition:
        print(f"  Condition: {condition}")
    if item.get("rooms"):
        print(f"  Rooms: {item['rooms']}, area: {item.get('areaM2')} m2")
    print(f"  Posted: {posted_at}")
    print(f"  URL: {item.get('url')}")
    print("-" * 50)

A row from the 2026-11-15 run, with imageUrls cut to its first entry:

{
  "id": "668513970",
  "url": "https://www.subito.it/telefonia/iphone-13-pro-256-gb-trapani-668513970.htm",
  "title": "IPhone 13 Pro 256 GB",
  "description": "Telefono perfetto tutto originale \n",
  "price": 400,
  "currency": "EUR",
  "category": "Telefonia",
  "categoryId": "12",
  "parentCategoryId": "9",
  "categorySlug": "telefonia",
  "listingType": "In vendita",
  "condition": "Come nuovo - perfetto o ricondizionato",
  "region": "Sicilia",
  "province": "Trapani",
  "provinceCode": "TP",
  "town": "Petrosino",
  "sellerName": null,
  "sellerId": "4565054",
  "isCompany": false,
  "postedAt": "2026-11-15T20:17:54",
  "shippable": false,
  "shippingCost": null,
  "imageUrls": [
    "https://images.sbito.it/api/v1/sbt-ads-images-pro/images/b2/b2d78f8f-b810-4d1c-8d37-bc7c239a37f7?rule=gallery-desktop-2x-auto"
  ],
  "imageCount": 4,
  "rooms": null,
  "bathrooms": null,
  "areaM2": null,
  "floor": null,
  "energyClass": null,
  "buildingCondition": null,
  "vehicleBrand": null,
  "vehicleYear": null,
  "mileageKm": null,
  "fuel": null,
  "gearbox": null,
  "features": {
    "item_shippable": "No",
    "item_condition": "Come nuovo - perfetto o ricondizionato",
    "price": "400 €",
    "phone_type": "Cellulari e Smartphone"
  },
  "isSponsored": false,
  "searchQuery": "iphone",
  "searchUrl": "https://www.subito.it/annunci-italia/vendita/usato/?q=iphone"
}

Step 6: Export the data

The dataset can be exported as JSON, CSV or Excel from Apify Console, or read through the client as above.


Working with the API

Tokens: the client sends your token with every call, so keep it in an environment variable as above and rotate it in API & Integrations if it leaks.

Statuses: call() returns the finished run, and run.status is SUCCEEDED or a failure status. A search that loads normally but matches nothing also ends SUCCEEDED, with a status message saying so and an empty dataset, so check the row count as well as the status.

Webhooks: to react to a finished run without waiting in a script, add a webhook. Its payload resource is the run object, so it carries defaultDatasetId (Apify docs), and your application can fetch the rows by itself.


Advanced usage patterns

Several keywords in one run. Put them all in searchQueries. The Actor walks them in order, removes duplicate ids between them and stops at maxItems, which counts rows across all keywords, so a first keyword with many results can use the whole cap.

Sweeps past 9,000 rows. Split one broad search into several runs by region, province or category. Each is its own search with its own 9,000-row ceiling.

Scheduled runs. Save the input as a task and add an Apify schedule, which starts Actor and task runs on a cron expression. On each run, de-duplicate on id in your own storage and compare price to spot changes.

One category per run. Real estate and phone listings carry different features keys, so run them as separate inputs and keep each category's columns in its own table.

Region by region. For a country-wide sweep of one category, loop over region slugs in Python, start one run per region and merge the rows on id afterwards.

Monitoring. postedAt is the date and time the site gives, without a time zone, so store it as is and compare it only with other values from Subito.


Understanding your data

Rows are flat, with one nested object. The identifying columns are id, url, title and description (the ad text). price is a number in euros and currency is EUR when a price is present. All 10 rows of my run had a price; a listing without one has price null.

Place is split into region, province, provinceCode and town. My ten rows came from six regions: Campania (3 rows), Trentino-Alto Adige (2), Sicilia (2), Calabria, Emilia-Romagna and Abruzzo (1 each). condition is the item condition label where the category has one: "Buono - usato ma ben conservato" on 4 rows, "Ottimo - poco usato e ben conservato" on 3 and "Come nuovo - perfetto o ricondizionato" on 3.

Seller data is sellerId, isCompany and sellerName. In my run sellerName was null and isCompany false on every row, and sellerId was filled on every row.

imageUrls holds photo links and imageCount the count; mine ranged from 3 to 6. features keeps every attribute under the site's own key. On my rows the keys were item_shippable, item_condition, price and phone_type on every row, and, on the four shippable rows, item_shipping_allowed, item_shipping_package_size, item_shipping_cost_tuttosubito, item_shipping_type and shipping_carriers.

Here are the ten rows of the run, sorted by price (taken from title, price, condition, province and shippable):

Title Price (EUR) Condition Province Shippable
iPhone 5s 50 Buono - usato ma ben conservato Trento no
iPhone 5 50 Buono - usato ma ben conservato Trento no
Iphone 12 blue 128gb apple 120 Buono - usato ma ben conservato Cosenza yes
iPhone 11 64GB Product (RED) 150 Buono - usato ma ben conservato Pescara no
IPhone 13 Pro 256 GB 400 Come nuovo - perfetto o ricondizionato Trapani no
Apple iPhone 15 Pro Max 256 550 Ottimo - poco usato e ben conservato Salerno yes
iPhone 15 Pro Max 256 Gb 650 Ottimo - poco usato e ben conservato Avellino yes
Iphone 16pro max 256 giga 740 Come nuovo - perfetto o ricondizionato Reggio Emilia no
iPhone 17 pro 256 Italia indistinguibile al nuovo 900 Come nuovo - perfetto o ricondizionato Caserta no
Oppo find n5 Oppo X2 e Oppo enco 4pro 1050 Ottimo - poco usato e ben conservato Catania yes

One pattern worth seeing: the Actor has no text filter, and the most expensive row, an Oppo listing at 1050 EUR, is the only title without "iPhone". Filter on title in your own code if you need one brand.


Troubleshooting guide

A slug error. A region, category or province with characters other than letters, digits and single hyphens, or one Subito does not know, ends the run FAILED with a message naming it.

Zero rows. If the pages loaded normally and nothing matched, or a price limit removed everything, the run ends SUCCEEDED with a status message. If the pages could not be read, the run ends FAILED with a status message saying the pages could not be read.

Reading logs. Open the run's log in Apify Console. The Actor logs the search it ran and the reason when rows were left out.

Help. Use the Actor's Store page.


Best practices

  • Keep caps tight. Use maxPages and maxItems while you develop, and raise them for production runs.
  • Be considerate. Keep your own schedules sensible; a daily or hourly search is rarely a reason for more.
  • Mind the cap. A run stops at maxItems, so it is also your ceiling on output size.
  • Check freshness. Rows are what the site showed at run time. Rerun on a schedule and key on id.
  • Use the data responsibly. The rows are public listing data; check Subito's terms and the law that applies to you before you use it.

For current pricing and details, see the Store page.


Conclusion and next steps

You now have a script that turns a Subito.it search into rows and a map of what each column holds. Start with maxPages: 1, read the rows, then widen the search. Questions are welcome in the comments, and the Actor page is the place to report an input that misbehaves.

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.