# Subito Scraper — Prices, Sellers, Location & Photos (`haketa/subito-scraper`) Actor

Scrape Subito.it, Italy's #1 classifieds, by keyword or URL. Get price (EUR), location (region, city), seller type (private/business), description, attributes and photos. Cars, electronics, home and more. No login or API key. Export JSON, CSV, Excel.

- **URL**: https://apify.com/haketa/subito-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** E-commerce, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Subito Scraper 🇮🇹 — Italy Classifieds & Marketplace Intelligence

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-orange?style=flat-square\&logo=apify)](https://apify.com/haketa/subito-scraper)
[![Maintenance](https://img.shields.io/badge/Maintained-Active-brightgreen?style=flat-square)](https://apify.com/haketa/subito-scraper)
[![Data Format](https://img.shields.io/badge/Output-JSON%20%7C%20CSV%20%7C%20Excel-blue?style=flat-square)](https://apify.com/haketa/subito-scraper)
[![Deep Pagination](https://img.shields.io/badge/Pagination-1%2C000%2B%20Unlocked-success?style=flat-square)](https://apify.com/haketa/subito-scraper)
[![Anti-Bot](https://img.shields.io/badge/Anti--Bot-Auto--Rotation-purple?style=flat-square)](https://apify.com/haketa/subito-scraper)

Extract live listings, prices, seller profiles, and contact signals from [Subito.it](https://www.subito.it), Italy's premier classifieds marketplace, at scale — no login, no API token, and zero coding required. This **Subito scraper** enables high-speed extraction across all major Italian product categories: vehicles, electronics, furniture, real estate, jobs, and collectibles.

Whether you are tracking market pricing trends, sourcing profitable resale inventory, monitoring competitors, or building Italian B2B lead lists from business advertisers, this **Subito data extractor** turns millions of live marketplace ads into structured, analysis-ready datasets.

***

### ⚡ At a glance

| Feature | Specification |
|---|---|
| **Target Website** | `subito.it` (Italy's #1 Classifieds Marketplace) |
| **Supported Inputs** | Free-text search terms, direct category URLs, filtered search URLs |
| **Max Pagination** | **Unlocked 1,000+ results** with auto-pagination loop |
| **Data Enrichment** | Price (EUR), seller type (private vs business), phone/item attributes, images |
| **Rate & Speed** | ~300–600 listings per minute on standard datacenter proxies |
| **Export Formats** | JSON, CSV, XML, Excel (XLSX), RSS feed, HTML table |
| **Integration** | Apify REST API, Python, Node.js, Make, Zapier, Google Sheets, Slack |
| **Authentication** | None required (100% public marketplace data) |
| **Default Concurrency** | Automatic session cycling with proxy rotation |

***

### 🔎 Why scrape Subito.it?

**Subito.it** is Italy's largest digital marketplace, serving millions of active Italian consumers and small businesses daily. Across cars, motorcycles, smartphones, industrial equipment, home decor, and fashion, Subito represents the definitive benchmark for second-hand market valuations and merchant activity across the country.

Gathering this data manually is inefficient: listings are constantly created or sold, prices fluctuate daily, and manual copy-pasting is prone to omissions. Furthermore, Subito's dynamic architecture and bot-detection layers prevent naive crawlers from accessing deep catalog pages.

This **Subito.it scraper** solves these challenges by providing:

- 💶 **Market Price Intelligence** — Track real listing prices, price reductions, and fair market value across regional Italian markets.
- 👤 **B2B Lead Generation** — Identify and segment verified **business** sellers (dealers, boutique shops, contractors) by city and category.
- 💰 **Arbitrage & Resale Sourcing** — Spot underpriced consumer goods, electronics, and vehicles to flip across cross-border marketplaces.
- 🚗 **Automotive Intelligence** — Scrape comprehensive vehicle ads including mileage, transmission, year, engine size, and fuel type.
- 📊 **Supply & Inventory Trends** — Monitor listing velocity, category saturation, and geographic distribution across all 20 Italian regions.
- 🤖 **AI & Vector DB Pipeline** — Fuel Large Language Model (LLM) agents, retrieval-augmented generation (RAG) engines, and algorithmic pricing systems with clean market data.

***

### ✨ Core capabilities

- 🔍 **Multi-Keyword Search** — Submit single or multiple search queries (e.g., `iphone 15`, `fiat 500`, `divano pelle`). Each keyword is systematically crawled, paginated, and de-duplicated.
- 🔗 **Direct URL Crawling** — Paste complete Subito.it search or filtered category URLs. Any on-site filters (region, city, price range, condition, subcategory) are honored seamlessly.
- 📄 **Deep Pagination (1,000+ Results)** — Effortlessly paginate past initial page caps. Retrieve thousands of records per search run without premature truncation.
- 🏷️ **Seller Classification** — Differentiate instantly between **private individuals** and **commercial business sellers** (`sellerType`).
- 📍 **Granular Geographic Data** — Extract regional levels including Italian region (e.g., *Lombardia*, *Lazio*), province/city, and municipality/town.
- 📦 **Dynamic Attributes Parser** — Normalize variable category-specific attributes (fuel type, vehicle year, storage capacity, condition, delivery method) into clean key-value structures.
- 🖼️ **Full Photo Galleries** — Capture high-resolution primary photo URLs alongside complete gallery arrays and image totals.
- 🛡️ **Session Rotation** — Built-in session lifecycle management ensures consistent data extraction without IP throttling or ban waves.

***

### 🎯 Use cases & industry applications

#### 1. B2B Sales & Merchant Prospecting

Italian commercial merchants, auto dealerships, and local repair shops actively list their inventory on Subito. By filtering extraction runs to `sellerType: "business"`, sales development representatives (SDRs) and growth teams can quickly construct hyper-targeted outreach lists segmented by region and specialization.

#### 2. E-Commerce Resale & Arbitrage

Consumer flippers and professional refurbished electronics dealers monitor specific high-demand queries (e.g., camera gear, gaming consoles, Apple hardware). Automated periodic runs notify resellers of newly posted below-market deals before competitors spot them.

#### 3. Automotive Market Analysis

Dealerships, insurance adjusters, and fleet operators scrape the vehicle category to analyze real asking prices for used cars, motorbikes, and commercial vans across Italy's northern, central, and southern provinces.

#### 4. Real Estate & Rental Benchmarking

Extract apartment rentals and real estate listings to compare square-meter pricing, localized demand shifts, and landlord pricing strategies across key hubs like Milan, Rome, Turin, and Florence.

#### 5. Academic & Economic Research

Economists and policy researchers study macro consumer behavior, local inflation metrics, and used durable goods supply elasticity across Italian municipal territories.

***

### 🏛️ Supported product categories on Subito.it

This scraper extracts listings from every native Subito category and subcategory without restrictions:

| Primary Category | Subcategories Covered | Typical Extracted Attributes |
|---|---|---|
| **Motori (Vehicles)** | Auto, Moto & Scooter, Accessori Auto, Veicoli Commerciali, Nautica, Caravan & Camper | Year, Mileage (km), Fuel type, Gearbox, Euro rating, Power (CV/kW) |
| **Elettronica (Tech)** | Telefonia, Informatica, Audio/Video, Fotografia, Videogiochi & Console | Storage capacity, Model, Condition, Brand, Carrier lock status |
| **Immobili (Property)** | Appartamenti, Camere/Posti Letto, Ville, Uffici, Terreni | Surface area (sqm), Rooms, Heating type, Energy class, Floor |
| **Casa & Persona** | Arredamento, Elettrodomestici, Giardino & Fai da te, Abbigliamento, Accessori | Condition, Material, Dimensions, Brand, Delivery availability |
| **Sport & Hobby** | Biciclette, Strumenti Musicali, Collezionismo, Libri, Sport Invernali | Bike type, Frame material, Wheel size, Authenticity details |
| **Lavoro & Servizi** | Offerte di lavoro, Attrezzature da lavoro, Servizi | Job contract type, Sector, Experience required, Machinery type |

***

### 📥 Input parameters

The actor features a flexible, self-explanatory input schema designed for both non-technical users and programmatic API callers.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchTerms` | Array of strings | `["iphone"]` | One or more Italian search queries. E.g. `["macbook", "scooter 125"]`. |
| `startUrls` | Array of strings | `[]` | Direct search or category URLs copied from Subito.it. |
| `sellerType` | String (select) | `""` (Any) | Filter by seller classification: `""` (all), `"private"`, or `"business"`. |
| `priceMin` | Integer | *None* | Minimum asking price in EUR. |
| `priceMax` | Integer | *None* | Maximum asking price in EUR. |
| `maxItems` | Integer | `0` (Unlimited) | Total listings to collect. Prefilled to `100` for test runs. |
| `maxPagesPerSearch` | Integer | `0` (Unlimited) | Max result pages per search query. `0` disables limits. |
| `proxyConfiguration` | Object | `{ "useApifyProxy": true }` | Apify proxy setup. Datacenter proxies run fast and reliably out of the box. |

***

### 📋 Input configurations & recipes

#### Example 1: High-Speed Keyword Search (General)

```json
{
  "searchTerms": ["vespa 125", "honda sh"],
  "sellerType": "",
  "maxItems": 200,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

#### Example 2: B2B Commercial Seller Lead Generation

```json
{
  "searchTerms": ["trattore agricolo", "escavatore"],
  "sellerType": "business",
  "maxItems": 1000,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

#### Example 3: Filtered Resale Hunt with Price Boundaries

```json
{
  "searchTerms": ["playstation 5", "nintendo switch oled"],
  "sellerType": "private",
  "priceMin": 150,
  "priceMax": 350,
  "maxItems": 500,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

#### Example 4: Direct Filtered URL Extraction

```json
{
  "startUrls": [
    "https://www.subito.it/annunci-italia/vendita/auto/bmw/?pe=25000&ps=10000"
  ],
  "maxItems": 1500,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

***

### 📤 Output data structure

Scraped listings are saved to the default Apify Dataset. Each row provides clean, typed, and normalized fields ready for immediate analysis.

#### Sample record (JSON)

```json
{
  "id": "639565298",
  "url": "https://www.subito.it/biciclette/negozio-iphone-e-ebike-e-monopattini-padova-639565298.htm",
  "title": "Negozio iPhone e eBike e Monopattini",
  "description": "Disponibili vari modelli in pronta consegna presso il nostro punto vendita a Padova.",
  "price": 999,
  "currency": "EUR",
  "category": "Biciclette",
  "categoryId": "41",
  "sellerType": "business",
  "sellerName": "Mobility Tech Padova",
  "sellerId": "101729270",
  "region": "Veneto",
  "city": "Padova",
  "town": "Padova",
  "publishedDate": "2026-11-02 01:41:32",
  "imageUrl": "https://images.sbito.it/api/v1/sbt-ads-images-pro/images/78/78ad9cee-e388-44ca-8ae4-c8d1292edd87",
  "images": [
    "https://images.sbito.it/api/v1/sbt-ads-images-pro/images/78/78ad9cee-e388-44ca-8ae4-c8d1292edd87",
    "https://images.sbito.it/api/v1/sbt-ads-images-pro/images/d6/d6ed2f81-9b62-4f3b-a192-808cf702b894"
  ],
  "nbImages": 2,
  "attributes": {
    "item_condition": "Nuovo - mai usato in confezione originale",
    "bicycle_type": "Altre tipologie",
    "item_shipping_allowed": "Sì",
    "item_shipping_cost": "10 €"
  },
  "searchTerm": "iphone",
  "scrapedAt": "2026-11-10T13:40:00.000Z"
}
```

***

### 📊 Extracted fields & data coverage

#### 🏷️ Identity & Metadata

| Field Name | Type | Coverage | Description & Sample Values |
|---|---|---|---|
| `id` | String | 🟢 High (100%) | Unique Subito listing identifier (`"639565298"`). |
| `url` | String | 🟢 High (100%) | Direct canonical permalink to the ad. |
| `title` | String | 🟢 High (100%) | Item listing headline text. |
| `description` | String | 🟢 High (>95%) | Full listing description text provided by the advertiser. |
| `searchTerm` | String | 🟡 Conditional | Search keyword associated with the result row. |
| `scrapedAt` | String | 🟢 High (100%) | UTC ISO 8601 scrape execution timestamp. |

#### 💶 Commercial & Pricing Details

| Field Name | Type | Coverage | Description & Sample Values |
|---|---|---|---|
| `price` | Number | 🟢 High (>90%) | Asking price in EUR (integer/float, null if price on request). |
| `currency` | String | 🟢 High (100%) | Standard ISO currency symbol (`"EUR"`). |
| `category` | String | 🟢 High (100%) | Human-readable category label (e.g., `"Auto"`, `"Telefonia"`). |
| `categoryId` | String | 🟢 High (100%) | Subito internal category code. |
| `attributes` | Object | 🟢 High (>85%) | Dynamic key-value pairs (vehicle mileage, condition, size). |

#### 👤 Seller Profile & Geography

| Field Name | Type | Coverage | Description & Sample Values |
|---|---|---|---|
| `sellerType` | String | 🟢 High (100%) | Advertiser status: `"private"` or `"business"`. |
| `sellerName` | String | 🟡 Conditional (~40%) | Commercial business name or advertiser handle when disclosed. |
| `sellerId` | String | 🟢 High (>98%) | Subito unique account identifier for the advertiser. |
| `region` | String | 🟢 High (100%) | Official administrative region (e.g., `"Lombardia"`, `"Lazio"`). |
| `city` | String | 🟢 High (100%) | Province or major metro area (e.g., `"Milano"`, `"Roma"`). |
| `town` | String | 🟡 Conditional (~70%) | Specific municipality or neighborhood when specified. |
| `publishedDate` | String | 🟢 High (100%) | Timestamp when the listing was posted or updated. |

#### 🖼️ Visual Media

| Field Name | Type | Coverage | Description & Sample Values |
|---|---|---|---|
| `imageUrl` | String | 🟢 High (>95%) | High-resolution primary preview image URL. |
| `images` | Array | 🟢 High (>95%) | Array of all gallery photo URLs uploaded for the listing. |
| `nbImages` | Number | 🟢 High (100%) | Total number of uploaded product images. |

***

### 📈 Scalability, performance & deduplication

- **Automatic Deduplication** — Each record is verified against an internal set of observed listing IDs. Even when crawling dozens of overlapping keywords or regional URLs, duplicate listings are filtered out before reaching your dataset.
- **Deep Pagination Without Hard Caps** — Setting `maxPagesPerSearch: 0` removes artificial page limits, letting the scraper crawl deeply through hundreds of pages until your specified `maxItems` target is fulfilled.
- **Optimized Network Efficiency** — Requests are processed using lightweight HTTP protocol emulation, minimizing resource consumption and memory overhead. A standard 1,000-listing run typically executes in under 90 seconds.
- **Resource Sizing** — Runs reliably on lightweight memory profiles (512 MB to 1024 MB), keeping execution costs minimal.

***

### 🔄 Programmatic API & developer integration

You can trigger this actor and fetch results programmatically using Python, Node.js, or direct HTTP API calls.

#### Python Example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "searchTerms": ["ducati monster"],
    "sellerType": "private",
    "maxItems": 300,
    "maxPagesPerSearch": 0
}

## Run the actor and wait for it to finish
run = client.actor("haketa/subito-scraper").call(run_input=run_input)

## Fetch results from the run's dataset
dataset_items = client.dataset(run["defaultDatasetId"]).list_items().items
for item in dataset_items:
    print(f"{item['title']} - €{item['price']} ({item['city']}, {item['region']})")
```

#### Node.js Example

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const input = {
    searchTerms: ['bmw gs 1250'],
    maxItems: 500,
    maxPagesPerSearch: 0,
};

const run = await client.actor('haketa/subito-scraper').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();

console.log(`Collected ${items.length} listings from Subito.it`);
```

#### Direct cURL Request

```bash
curl -X POST "https://api.apify.com/v2/acts/haketa~subito-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": ["alfa romeo giulia"],
    "maxItems": 250,
    "maxPagesPerSearch": 0
  }'
```

***

### 💡 Best practices for high-yield scraping

1. **Leverage Start URLs for Complex Filtering** — If you need granular filters (such as maximum vehicle mileage, specific model years, or narrowed postal codes), configure the search on the live Subito.it website, copy the resulting URL, and paste it into `startUrls`.
2. **Segment Commercial vs Private Sellers** — For B2B lead generation, set `sellerType: "business"` to filter out individual hobby sellers and isolate commercial retailers.
3. **Use Focused Multi-Term Searches** — Rather than searching for broad terms like `"auto"`, submit specific search batches like `["golf 7 r line", "audi a3 s line", "bmw 120d"]` for higher relevance and conversion value.
4. **Schedule Periodic Batches** — Running periodic daily scrapes with moderate `maxItems` limits ensures you capture newly listed items before they sell out.
5. **Stick with Datacenter Proxies** — The actor's built-in session cycling allows datacenter proxies to extract listings smoothly at ultra-low operational costs.

***

### ❓ Frequently Asked Questions (FAQ)

##### Do I need an active Subito.it account to run this scraper?

No. The scraper operates completely unauthenticated. It collects publicly accessible marketplace listings without requiring user login credentials, cookies, or subscription keys.

##### How does this scraper handle pagination?

The actor detects Subito's pagination structure automatically (`?o=2`, `?o=3`, etc.). Setting `maxPagesPerSearch: 0` ensures unlimited pagination up to your defined `maxItems` threshold.

##### Can I export results to Excel or CSV?

Yes. From the Apify Console dataset view, you can export your scraped data with one click in CSV, Excel (XLSX), JSON, XML, or RSS formats.

##### How fast does the scraper collect listings?

The scraper processes approximately 300 to 600 listings per minute depending on proxy latency and query depth.

##### Does the scraper return full image galleries?

Yes. In addition to the primary cover thumbnail (`imageUrl`), the `images` array contains direct links to every high-resolution photo uploaded by the seller.

##### Are phone numbers or direct email addresses included?

Subito.it requires interactive human authentication and SMS verification to reveal masked seller contact numbers on the live site. However, business listings frequently display company contact info, websites, or business names within the `description` or `sellerName` fields.

##### Can I scrape specific Italian provinces or cities?

Yes. Simply filter by your target province on Subito.it, copy the URL from your browser address bar, and paste it into the `startUrls` input field.

##### What happens if a listing has no price listed?

Listings with negotiable prices or "contact for price" will return `price: null`, preserving valid numeric formatting across all standard records.

***

### 📋 Changelog

#### Version 1.2 (2026-11)

- **Deep Pagination Unlock**: Upgraded `maxPagesPerSearch` to support `0` (unlimited auto-pagination), enabling seamless 1,000+ listing extractions.
- **High-Yield Batching**: Optimized HTTP session cycling and error recovery for long-running extractions across deep catalog pages.
- **Enhanced Normalization**: Improved extraction of category-specific attributes, price normalization, and regional geographic metadata.
- **Updated Documentation**: Added visual status badges, comprehensive field coverage indicators, code integration recipes, and expanded B2B automation use cases.

#### Version 1.1

- Added support for multiple concurrent `searchTerms` and multi-URL inputs.
- Implemented robust `sellerType` classification (`private` vs `business`).
- Integrated automated deduplication by listing ID.

#### Version 1.0

- Initial release with keyword searching, price filtering, and clean JSON/CSV dataset export.

# Changelog

This Actor's version history is a separate document: https://apify.com/haketa/subito-scraper/changelog.md

# Actor input Schema

## `searchTerms` (type: `array`):

What to search for, e.g. 'iphone', 'volkswagen golf', 'divano'. Each term is searched separately. Leave empty if you use Start URLs.

## `startUrls` (type: `array`):

Optional. Paste full Subito.it search/category URLs to scrape them directly (a specific category, region, price range, etc.). When provided, Search Terms below are ignored for these URLs.

## `sellerType` (type: `string`):

Filter by private sellers or businesses (great for B2B lead generation — businesses are professional advertisers).

## `priceMin` (type: `integer`):

Only listings at or above this price.

## `priceMax` (type: `integer`):

Only listings at or below this price.

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

Maximum number of listings to collect across all searches. Set to 0 for unlimited.

## `maxPagesPerSearch` (type: `integer`):

How many result pages to scrape per search term / URL. Each page has about 30 listings. Set to 0 for unlimited pagination (governed by Max Items).

## `proxyConfiguration` (type: `object`):

The default (Apify Proxy, datacenter) works out of the box and is fast and cheap. If DataDome ever challenges the datacenter IPs, switch to Residential and country Italy.

## Actor input object example

```json
{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "sellerType": "",
  "maxItems": 100,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Open to view and export all scraped listings (JSON, CSV, Excel).

# 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 = {
    "searchTerms": [
        "iphone"
    ],
    "startUrls": [],
    "maxItems": 100,
    "maxPagesPerSearch": 0,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/subito-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 = {
    "searchTerms": ["iphone"],
    "startUrls": [],
    "maxItems": 100,
    "maxPagesPerSearch": 0,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/subito-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "maxItems": 100,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call haketa/subito-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/subito-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Tx4n2J1mvMGcftrkB/builds/17KHBgUQviGCvY85A/openapi.json
