# Trovacasa Scraper

Extracts information (location, price, surface area, etc.) about properties on Trovacasa.it using URLs of the results pages.

- Template page: [https://www.octoparse.com/template/crawler-di-trovacasa](https://www.octoparse.com/template/crawler-di-trovacasa)
- Categories: Real Estate
- Status: `PUBLISHED`
- Run mode: `BOTH`

## Pricing

Free.

## What is an Octoparse template?

An Octoparse template is a ready-to-use scraping workflow with predefined inputs and structured outputs. Use the exact parameter keys below; do not invent parameters.

## Overview

This ready-to-use template collects structured data from general web pages.

## Output

The current workflow extracts 16 fields, including `Descrizione`, `Locali`, `Posizione`, `Prezzo`, `Quartiere`, `Superficie`, `Tipo_immobili`, `Titolo`, `URL_immagine`, `URL_pagina`, `tag1`, `tag2`, `tag3`, `tag4`, `tag5`, `tag6`.

## Use Cases

- Use structured results for research, comparison, and monitoring.
- Collect rows without building the extraction workflow from scratch.
- Combine results with other templates for downstream enrichment.
- Review a representative result before starting a large batch.

## Why Octoparse

- **No coding required:** complete Listing page URLs and start the template in local or cloud mode.
- **Flexible export:** review and export results as CSV, Excel, or JSON.

## Input

### Listing page URLs

Optional. Enter the listing page URLs of Trovacasa.it Constraints: minItems=1; maxItems=100; items.minLength=1; items.maxLength=100000.

## How to Use

## Trovacasa Scraper

Extracts property information (location, price, surface area, etc.) from [Trovacasa](https://www.trovacasa.it/) using listing page URLs.

### Input

- **Listing page URLs** (optional): one or more values, one per line.

### Output

- `Posizione`
- `Tipo_immobili`
- `Titolo`
- `URL_pagina`
- `Quartiere`
- `Superficie`
- `Locali`
- `Prezzo`
- `Descrizione`
- `URL_immagine`
- `tag1`
- `tag2`
- `tag3`
- `tag4`
- `tag5`
- `tag6`

### Limitations

- Collects data from search results pages only; does not add data not displayed by Trovacasa.
- Fields `tag4`, `tag5`, `tag6` may be empty.

### How to Use

1. Open the template and select **Try it** or **Start**.
2. Enter listing page URLs.
3. Choose local or cloud run.
4. Review output rows and export or process.

### Pricing

This template currently has no per-line charge. Octoparse plan or resource limits may apply. Scheduling and API access may require a paid Octoparse plan.

## Limitations

Results depend on what the source site exposes at run time. Fields may be empty when a source page does not provide a value. The template enforces the input limits shown above.

## Tips

Use specific, valid inputs and review a representative result before starting a large batch. Remove duplicate inputs when repeated records are not needed.

## FAQ

### What do I need to enter?

Use the exact inputs and limits listed above.

### What data does this template return?

See Output Schema below; availability can vary by source record.

### How is usage billed?

See the Pricing section above for current pricing and billing details.

## Related Templates

- [eBay Listing Page Scraper (by keyword)](https://www.octoparse.com/template/ebay-product-list-scraper-by-keyword)
- [eBay Scraper](https://www.octoparse.com/template/ebay-scraper)
- [Google Search Scraper](https://www.octoparse.com/template/google-search-scraper)
- [Google Maps Listings Scraper (by Keywords)](https://www.octoparse.com/template/google-maps-scraper-listing-page-by-keyword)
- [Google Maps Email Scraper & Extractor](https://www.octoparse.com/template/google-maps-contact-scraper)

## Input Schema

```json
{
  "title": "Trovacasa Scraper input",
  "description": "Input parameters configured for the current published template version.",
  "type": "object",
  "schemaVersion": 1,
  "additionalProperties": false,
  "properties": {
    "listing_page_URLs": {
      "title": "Listing page URLs",
      "description": "Enter the listing page URLs of Trovacasa.it",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100000
      },
      "minItems": 1,
      "maxItems": 100,
      "x-octoparse": {
        "apiEnabled": true
      }
    }
  },
  "required": []
}
```

## Input JSON Example

Example 1

```json
{
  "listing_page_URLs": [
    "https://www.trovacasa.it/rustici-in-vendita/provincia-di-massa-carrara/da-privati"
  ]
}
```

Example 2

```json
{
  "listing_page_URLs": [
    "https://www.trovacasa.it/rustici-in-vendita/provincia-di-massa-carrara/da-privati"
  ]
}
```

Example 3

```json
{
  "listing_page_URLs": [
    "https://www.trovacasa.it/case-in-affitto/milano"
  ]
}
```

Example 4

```json
{
  "listing_page_URLs": [
    "https://www.trovacasa.it/case-in-affitto/milano"
  ]
}
```

Example 5

```json
{
  "listing_page_URLs": [
    "https://www.trovacasa.it/case-in-affitto/milano"
  ]
}
```


## Output Schema

```json
{
  "schemaVersion": 1,
  "type": "object",
  "properties": {
    "Descrizione": {
      "type": "string",
      "description": ""
    },
    "Locali": {
      "type": "string",
      "description": ""
    },
    "Posizione": {
      "type": "string",
      "description": ""
    },
    "Prezzo": {
      "type": "string",
      "description": ""
    },
    "Quartiere": {
      "type": "string",
      "description": ""
    },
    "Superficie": {
      "type": "string",
      "description": ""
    },
    "Tipo_immobili": {
      "type": "string",
      "description": ""
    },
    "Titolo": {
      "type": "string",
      "description": ""
    },
    "URL_immagine": {
      "type": "string",
      "description": ""
    },
    "URL_pagina": {
      "type": "string",
      "description": ""
    },
    "tag1": {
      "type": "string",
      "description": ""
    },
    "tag2": {
      "type": "string",
      "description": ""
    },
    "tag3": {
      "type": "string",
      "description": ""
    },
    "tag4": {
      "type": "string",
      "description": ""
    },
    "tag5": {
      "type": "string",
      "description": ""
    },
    "tag6": {
      "type": "string",
      "description": ""
    }
  },
  "title": "Trovacasa Scraper output",
  "description": "Initial output fields derived from the current published implementation. Field descriptions are maintained by Data Center; production field names and types should be refreshed from recent successful runs.",
  "additionalProperties": false
}
```

## Output Example

Example 1

```json
{
  "Descrizione": "Caratteristica casetta in sasso – lunigiana\n\n\nNel piccolo e autentico borgo di Regnano Villa, nel comune di Casola in Lunigiana (provincia di massa-carrara), proponiamo in vendita una caratteristica casa in pietra immersa nella natura, con splendi...",
  "Locali": "3 locali",
  "Posizione": "Provincia di Massa-Carrara",
  "Prezzo": "70.000 €",
  "Quartiere": "Regnano-villa",
  "Superficie": "300 m²",
  "Tipo_immobili": "Vendita",
  "Titolo": "Rustico da privato a Casola in Lunigiana località regnano-villa, 99",
  "URL_immagine": "https://pic.trovacasa.it/image/1987029770/m-c.jpg",
  "URL_pagina": "https://www.trovacasa.it/annunci/ms-tc-3427-72791867",
  "tag1": "Da Privato",
  "tag2": "Caminetto",
  "tag3": "Panoramica",
  "tag4": "Prezzo Trattabile",
  "tag5": "Cantina",
  "tag6": "Possibilità di Ampliamento"
}
```

Example 2

```json
{
  "Descrizione": "Cottage di 50m (piano terra e primo piano) con annessa cantina e spazio orto e box autovettura a 50 m dallo stabile \nTerreno coltivabile di 160 metri e aia di pertinenza\nSi arriva attraversando 200m di paese antico o dal sentiero dalla strada dove...",
  "Locali": "2 locali",
  "Posizione": "Provincia di Massa-Carrara",
  "Prezzo": "60.000 €",
  "Quartiere": "Sassalbo",
  "Superficie": "50 m²",
  "Tipo_immobili": "Vendita",
  "Titolo": "Rustico da privato a Fivizzano via del Margine, 8",
  "URL_immagine": "https://pic.trovacasa.it/image/1109767604/m-c.jpg",
  "URL_pagina": "https://www.trovacasa.it/annunci/ms-tc-3427-53169849",
  "tag1": "Da Privato",
  "tag2": "Box",
  "tag3": "Terrazzo",
  "tag4": "Caminetto",
  "tag5": "Cantina",
  "tag6": "Soppalco"
}
```

Example 3

```json
{
  "Descrizione": "Bilocale arredato di design in affitto – Via Porpora, Milano\n\nIn via Nicola Antonio Porpora, in una zona strategica e ben servita di Milano, si propone in locazione un bilocale arredato di circa 44 m², situato al primo piano di uno stabile dotato...",
  "Locali": "2 locali",
  "Posizione": "Milano",
  "Prezzo": "1.100 €",
  "Quartiere": "Casoretto",
  "Superficie": "44 m²",
  "Tipo_immobili": "Affitto",
  "Titolo": "Appartamento da privato a Milano via Nicola Antonio Porpora, 125",
  "URL_immagine": "https://pic.trovacasa.it/image/2026813224/m-c.jpg",
  "URL_pagina": "https://www.trovacasa.it/annunci/mi-tc-3427-73596220",
  "tag1": "Arredato",
  "tag2": "Da Privato",
  "tag3": "Ascensore",
  "tag4": "Riscaldamento Centralizzato",
  "tag5": "Vicinanze negozi",
  "tag6": "Aria Condizionata"
}
```

Example 4

```json
{
  "Descrizione": "Elegante appartamento ristrutturato in Viale Corsica\n\nIn una delle zone più richieste di Milano, proponiamo in locazione luminoso appartamento situato in Viale Corsica, in posizione strategica per raggiungere rapidamente il centro città, l'aeropor...",
  "Locali": "2 locali",
  "Posizione": "Milano",
  "Prezzo": "1.200 €",
  "Quartiere": "Porta Vittoria",
  "Superficie": "60 m²",
  "Tipo_immobili": "Affitto",
  "Titolo": "Appartamento da privato a Milano viale Corsica",
  "URL_immagine": "https://pic.trovacasa.it/image/2023614930/m-c.jpg",
  "URL_pagina": "https://www.trovacasa.it/annunci/mi-tc-3427-73504065",
  "tag1": "Arredato",
  "tag2": "Da Privato",
  "tag3": "Riscaldamento Autonomo",
  "tag4": "Ristrutturato",
  "tag5": "Vicinanze negozi",
  "tag6": "Aria Condizionata"
}
```

Example 5

```json
{
  "Descrizione": "Mm Bande Nere e mm Primaticcio,  Piano rialzato,  Trilocale ristrutturato ed arredato. Soggiorno con cucina a vista, 2 camere da letto, 2 bagni finestrati, Aria condizionata, Tapparelle elettriche, Porta blindata, Riscaldamento centralizzato,  Ser...",
  "Locali": "3 locali",
  "Posizione": "Milano",
  "Prezzo": "1.350 €",
  "Quartiere": "Bande Nere",
  "Superficie": "75 m²",
  "Tipo_immobili": "Affitto",
  "Titolo": "Appartamento da privato a Milano via Ludovico Cavaleri, 5",
  "URL_immagine": "https://pic.trovacasa.it/image/2008207566/m-c.jpg",
  "URL_pagina": "https://www.trovacasa.it/annunci/mi-tc-3427-73209031",
  "tag1": "Arredato",
  "tag2": "Da Privato",
  "tag3": "Riscaldamento Centralizzato",
  "tag4": "Ristrutturato",
  "tag5": "Aria Condizionata",
  "tag6": "Tapparelle Motorizzate"
}
```

## API

`POST https://openapi.octoparse.com/api/agentTools/executeTask`

This is the OpenAPI Agent Tools `executeTask` endpoint. Authenticate with a Bearer token.

Request body:

`templateName` is the template slug; `parameters` is a JSON object string whose keys match Input Schema; `taskName`, `idempotencyKey`, and `maxCollectedRows` are optional.

Obtain a token:

```http
POST https://openapi.octoparse.com/token
Content-Type: application/json

{
  "username": "YOUR_USERNAME",
  "password": "YOUR_PASSWORD",
  "grant_type": "password"
}
```

Use `data.access_token` as `Authorization: Bearer <token>`. After starting, poll `getTaskStatus` and export with `exportData`.

```json
{
  "templateName": "crawler-di-trovacasa",
  "taskName": "Trovacasa Scraper",
  "parameters": "{\"listing_page_URLs\":[\"https://www.trovacasa.it/rustici-in-vendita/provincia-di-massa-carrara/da-privati\"]}"
}
```

## Python Example

```python
import json
import requests

OPENAPI_BASE = "https://openapi.octoparse.com"
ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"

parameters = json.loads("{\"listing_page_URLs\":[\"https://www.trovacasa.it/rustici-in-vendita/provincia-di-massa-carrara/da-privati\"]}")

response = requests.post(
    f"{OPENAPI_BASE}/api/agentTools/executeTask",
    headers={
        "Authorization": f"Bearer {ACCESS_TOKEN}",
        "Content-Type": "application/json",
    },
    json={
        "templateName": "crawler-di-trovacasa",
        "taskName": "Trovacasa Scraper",
        "parameters": json.dumps(parameters, ensure_ascii=False),
    },
    timeout=60,
)
print(response.status_code)
print(response.json())
```

## HTTP/cURL Example

```bash
curl -X POST "https://openapi.octoparse.com/api/agentTools/executeTask" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "templateName": "crawler-di-trovacasa",
  "taskName": "Trovacasa Scraper",
  "parameters": "{\"listing_page_URLs\":[\"https://www.trovacasa.it/rustici-in-vendita/provincia-di-massa-carrara/da-privati\"]}"
}
JSON
```

## MCP Setup

Connect an MCP-compatible AI client to `https://mcp.octoparse.com` using browser OAuth or an Octoparse API key. Find `crawler-di-trovacasa`, inspect its inputs, create a cloud task with the exact Input Schema keys, and export JSON results.

## Machine-readable Resources

- [Template contract](https://www.octoparse.com/templates/crawler-di-trovacasa.json)
- [Manifest](https://www.octoparse.com/templates/crawler-di-trovacasa-manifest.json)
