# Tecnocasa Agency Listings API Documentation

<p><strong>Tecnocasa Agency Listings API</strong> lists the ads of one agency with the same cards, filters, sort and paging as the search route.</p><p>Notes: Take <code>agency_id</code>, <code>city_id</code> and <code>province</code> from <code>agency.id</code> and <code>agency.search</code> of the agency route. 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_agency_listings](https://scrappa.co/docs/tecnocasa-api/tecnocasa_agency_listings)
- **API group:** Tecnocasa API
- **Endpoint:** `GET https://scrappa.co/api/tecnocasa/v1/agency/listings`

## 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 |
| --- | --- | --- | --- |
| `agency_id` | string | Yes | Agency id, for example mice0. |
| `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. |
| `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",
            "agency_id": "mice0",
            "max_price": 800000,
            "min_price": 200000,
            "listing_type": "sale"
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "agency_listings"
    },
    "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)
