# Tecnocasa Property Search API Documentation

<p><strong>Tecnocasa Property Search API</strong> returns residential property for sale or rent in Italy and Spain as JSON. Filter by city, district, price, area, rooms, exact bathrooms, property type and agency, sort by price, area or rooms, and page through the results with up to 50 listings per page. Each listing carries the id, title, address line, price, previous price and discount, area, rooms, bathrooms, agency id, detail link, photos and virtual tour. The response also returns the total result count and the real page.</p><p>Notes: Get <code>city_id</code>, <code>province</code> and <code>district_ids</code> from the locations route. Every returned item satisfies every filter you set. Bathrooms is an exact count, there is no minimum bathrooms filter. There is no recency sort. A page number past the last page returns an empty list with the true totals and <code>page_out_of_range: true</code>, never data of another page. Prices, areas and counts are numbers and the original text is kept in raw or label fields. A hidden price (for example Informazioni in agenzia) is <code>null</code>, never 0. A valid empty result is a successful, billable response; failed requests are never billed.</p>

- **Documentation:** [https://scrappa.co/docs/tecnocasa-api/tecnocasa_search](https://scrappa.co/docs/tecnocasa-api/tecnocasa_search)
- **API group:** Tecnocasa API
- **Endpoint:** `GET https://scrappa.co/api/tecnocasa/v1/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `country` | string | No | it (default) for Tecnocasa Italy or es for Tecnocasa Spain. Example: es. |
| `listing_type` | string | No | sale (default) or rent. Example: rent. |
| `city_id` | integer | Yes | City id from the locations route (cities[].city_id). Example: 13800324507779. |
| `province` | string | Yes | Province code from the locations route (cities[].province). Example: MI. |
| `region` | string | No | Optional region code. The province decides it when omitted. Example: lom. |
| `min_price` | integer | No | Minimum price in EUR. For rent this is the monthly rent. Example: 200000. |
| `max_price` | integer | No | Maximum price in EUR. Example: 300000. |
| `min_surface` | integer | No | Minimum area in m2. Example: 80. |
| `max_surface` | integer | No | Maximum area in m2. Example: 120. |
| `min_rooms` | integer | No | Minimum number of rooms (Spain: bedrooms). Example: 3. |
| `max_rooms` | integer | No | Maximum number of rooms. Example: 4. |
| `bathrooms` | integer | No | Exact number of bathrooms. There is no minimum filter because the source ignores it. Example: 2. |
| `property_type` | string | No | app (apartment), vil (villa), cas (house), box (garage or parking space) or ter (land). Example: app. |
| `district_ids` | string | No | One or more district ids from the locations route or the geo route. Repeat district_ids[] or comma-separate. Example: 10068,10072. |
| `agency_id` | string | No | Only ads of this agency. Example: mice0. |
| `sort` | string | No | price_asc, price_desc, area_asc, area_desc, rooms_asc or rooms_desc. Default: promoted ads first, then source order. Example: price_asc. |
| `page` | integer | No | One-based page number (default 1). A page past the last page returns an empty list with the real totals. Example: 2. |
| `limit` | integer | No | Results per page, 1 to 50 (default 15). Example: 15. |

## Example response

```json
{
    "data": {
        "listings": [
            {
                "id": 61290658,
                "top": true,
                "price": {
                    "raw": "\u20ac 730.000",
                    "amount": 730000,
                    "period": null,
                    "currency": "EUR"
                },
                "rooms": 4,
                "title": "Quadrilocale in vendita",
                "images": [
                    {
                        "id": 66921819,
                        "large": "https://cdn-media.medialabtc.it/it/agencies/mice0/estates/61290658/images/66921819/gallery.jpeg",
                        "order": 1,
                        "medium": "https://cdn-media.medialabtc.it/it/agencies/mice0/estates/61290658/images/66921819/detail.jpeg",
                        "thumbnail": "https://cdn-media.medialabtc.it/it/agencies/mice0/estates/61290658/images/66921819/card.jpeg"
                    }
                ],
                "surface": {
                    "m2": 141,
                    "raw": "141 Mq"
                },
                "discount": null,
                "subtitle": "Milano, Via Giovanni Battista Boeri - Meda Tibaldi",
                "agency_id": "mice0",
                "bathrooms": 2,
                "exclusive": false,
                "detail_url": "https://www.tecnocasa.it/vendita/appartamenti/milano/milano/61290658.html",
                "rooms_label": "4 locali",
                "virtual_tour": "https://www.smartvt360.it/pss/0af4aaed-e58e-455f-85a4-45db0406fbda",
                "previous_price": null,
                "bathrooms_label": "2 bagni"
            },
            {
                "id": 61219041,
                "top": true,
                "price": {
                    "raw": "\u20ac 450.000",
                    "amount": 450000,
                    "period": null,
                    "currency": "EUR"
                },
                "rooms": 3,
                "title": "Trilocale in vendita",
                "images": [
                    {
                        "id": 66851144,
                        "large": "https://cdn-media.medialabtc.it/it/agencies/mick0/estates/61219041/images/66851144/gallery.jpeg",
                        "order": 1,
                        "medium": "https://cdn-media.medialabtc.it/it/agencies/mick0/estates/61219041/images/66851144/detail.jpeg",
                        "thumbnail": "https://cdn-media.medialabtc.it/it/agencies/mick0/estates/61219041/images/66851144/card.jpeg"
                    }
                ],
                "surface": {
                    "m2": 80,
                    "raw": "80 Mq"
                },
                "discount": "\u20ac 20.000",
                "subtitle": "Milano, Via Casoretto - Casoretto",
                "agency_id": "mick0",
                "bathrooms": 1,
                "exclusive": false,
                "detail_url": "https://www.tecnocasa.it/vendita/appartamenti/milano/milano/61219041.html",
                "rooms_label": "3 locali",
                "virtual_tour": "https://www.smartvt360.it/pss/51e59c1e-a06a-4e88-844f-c33199a0a3a7",
                "previous_price": {
                    "raw": "\u20ac 470.000",
                    "amount": 470000,
                    "period": null,
                    "currency": "EUR"
                },
                "bathrooms_label": "1 bagno"
            }
        ],
        "search_metadata": {
            "page": 1,
            "limit": 15,
            "country": "it",
            "total_pages": 71,
            "filtered_out": 1,
            "listing_type": "sale",
            "has_next_page": true,
            "total_results": 1064,
            "page_out_of_range": false
        },
        "search_parameters": {
            "page": 1,
            "limit": 15,
            "region": "lom",
            "city_id": 13800324507779,
            "country": "it",
            "province": "MI",
            "max_price": 800000,
            "min_price": 200000,
            "listing_type": "sale"
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter or a value is invalid. This response is not billable. |
| 404 | Not Found | The requested page does not exist. This response is not billable. |
| 503 | Upstream Unavailable | Tecnocasa could not be reached. This response is not billable and is retryable. |
| 503 | Unexpected Upstream Data | Tecnocasa returned data in an unexpected shape. This response is not billable and is retryable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
