# Mioaffitto Rental Scraper (`rainminer/mioaffitto-it-scraper`) Actor

Scrape rental listings from mioaffitto.it — Italy’s rental-only portal outside Immobiliare and Idealista. Collect monthly EUR rent, rooms, area, bathrooms, neighborhood, photos and listing URLs from search pages. Export JSON/CSV and automate relocation or agency monitoring on Apify.

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

## Pricing

from $1.49 / 1,000 listing scrapeds

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

### What does Mioaffitto.it Scraper do?

**Mioaffitto.it Scraper** extracts **rental listings** from [mioaffitto.it](https://www.mioaffitto.it/) — Italy's rental specialist portal focused on apartments, rooms, and houses for rent. Provide a city search URL or an individual listing page and export structured rental data to JSON or CSV without writing code.

### Why scrape mioaffitto.it?

- **Italian rental market research** — Track monthly rents, room counts, and sizes across Italian cities.
- **Tenant lead lists** — Collect active rental ads with location, price, photos, and direct listing URLs.
- **Portfolio monitoring** — Watch new listings in target cities and neighbourhoods on a schedule.
- **Apify platform** — Schedule runs, export JSON/CSV/Excel, and integrate via API or webhooks.

### What data can you extract?

| Field     | Description                                           |
| --------- | ----------------------------------------------------- |
| listingId | Unique listing ID on mioaffitto.it                    |
| title     | Rental ad headline                                    |
| price     | Monthly rent formatted in EUR                         |
| currency  | Currency code (EUR)                                   |
| rooms     | Number of rooms (e.g. 3 Loc)                          |
| area      | Living area in square metres                          |
| bathrooms | Number of bathrooms (e.g. 2 Bagni)                    |
| location  | Street and neighbourhood in the listing city          |
| imageUrl  | Primary listing photo URL                             |
| url       | Public listing page on mioaffitto.it                  |
| searchUrl | Source search URL when found via a search page        |

### How to scrape mioaffitto.it

1. Open **Mioaffitto.it Scraper** in Apify Console.
2. Add one or more **start URLs** under **Start URLs**, for example:
   - `https://www.mioaffitto.it/appartamenti-affitto-milano-50-3-0-67355.html`
   - `https://www.mioaffitto.it/affitto_appartamento_milano/appartamento-arredato-garibaldi-isola-maciachini-monumentale_8543293.html`
3. Set **Maximum items** to control how many listings are extracted per start URL (default 3).
4. Leave **Proxy configuration** set to no proxy unless you need one.
5. Click **Start** and download results from the **Dataset** tab.

Pagination is handled automatically from search result pages until `maxItems` is reached.

### Is it legal to scrape mioaffitto.it?

This scraper only collects publicly visible rental listings shown on mioaffitto.it without logging in. It does not access private account data or bypass authentication. Ensure your use complies with applicable laws (including GDPR) and the site's Terms of Service.

### Output example

```json
{
  "listingId": "8543293",
  "title": "Appartamento arredato Garibaldi, isola, maciachini, monumentale",
  "price": "2.300 EUR",
  "currency": "EUR",
  "rooms": "3 Loc",
  "area": "103m²",
  "bathrooms": "2 Bagni",
  "location": "Via Garigliano, Garibaldi, Isola, Maciachini, Monumentale, Milano",
  "imageUrl": "https://images.mioaffitto.it/viviendas/315/341/8543293-315341276_no.jpg",
  "url": "https://www.mioaffitto.it/affitto_appartamento_milano/appartamento-arredato-garibaldi-isola-maciachini-monumentale_8543293.html",
  "searchUrl": "https://www.mioaffitto.it/appartamenti-affitto-milano-50-3-0-67355.html"
}
```

### Image Credit

Image credit: [mioaffitto.it](https://www.mioaffitto.it/)

# Actor input Schema

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

mioaffitto.it search URLs (e.g. https://www.mioaffitto.it/appartamenti-affitto-milano-50-3-0-67355.html) or individual listing pages.

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

Maximum number of listings to return per start URL.

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

Optional proxy settings. Defaults to no proxy.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.mioaffitto.it/appartamenti-affitto-milano-50-3-0-67355.html"
    }
  ],
  "maxItems": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://www.mioaffitto.it/appartamenti-affitto-milano-50-3-0-67355.html"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rainminer/mioaffitto-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 = {
    "startUrls": [{ "url": "https://www.mioaffitto.it/appartamenti-affitto-milano-50-3-0-67355.html" }],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("rainminer/mioaffitto-it-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 '{
  "startUrls": [
    {
      "url": "https://www.mioaffitto.it/appartamenti-affitto-milano-50-3-0-67355.html"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call rainminer/mioaffitto-it-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rainminer/mioaffitto-it-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/iC63OwCCJVRc6OdZi/builds/eRxdkkfaR3feSRqfr/openapi.json
