# Imovirtual Search API Documentation

Search apartments, houses, land, commercial premises, offices, warehouses and garages for sale or rent across Portugal. The request takes a `transaction` (comprar or arrendar), an `estate` type, an optional `location` slug-path from the locations endpoint, price and area filters, and `page`/`limit`. Each listing returns id, canonical url, title, estate, transaction, price with currency, price per square meter, area, rooms, floor, agency and location. The response also carries `pagination` and price `stats`. A valid empty result is a successful response.

- **Documentation:** [https://scrappa.co/docs/imovirtual-api/imovirtual_search](https://scrappa.co/docs/imovirtual-api/imovirtual_search)
- **API group:** Imovirtual API
- **Endpoint:** `GET https://scrappa.co/api/imovirtual/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 |
| --- | --- | --- | --- |
| `transaction` | string | Yes | comprar (buy) or arrendar (rent). |
| `estate` | string | Yes | Estate slug such as apartamento or moradia; comma combinations such as moradia,t3 are accepted. |
| `location` | string | No | Location slug-path from the locations endpoint, e.g. lisboa/lisboa. Defaults to todo-o-pais (whole country). |
| `page` | integer | No | Page number, 1-based. Defaults to 1. |
| `limit` | integer | No | Items per page: 24, 36, 48 or 72. Defaults to 36. |
| `priceMin` | integer | No | Minimum price in EUR. |
| `priceMax` | integer | No | Maximum price in EUR. |
| `areaMin` | integer | No | Minimum area in square meters. |
| `areaMax` | integer | No | Maximum area in square meters. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/imovirtual/search?transaction=comprar&estate=apartamento&location=lisboa%2Flisboa&page=1&limit=24"
```

## Example response

```json
{
    "success": true,
    "data": {
        "items": [
            {
                "id": 19310188,
                "url": "https://www.imovirtual.com/pt/anuncio/apartamento-t2-com-logradouro-ID1j1sE",
                "title": "Apartamento T2 com logradouro",
                "estate": "FLAT",
                "transaction": "SELL",
                "price": {
                    "value": 359900,
                    "currency": "EUR"
                },
                "areaInSquareMeters": 57,
                "roomsNumber": 3,
                "floorNumber": "ground_floor",
                "isPrivateOwner": false,
                "publishedAt": "2026-10-15T11:39:16Z"
            }
        ],
        "pagination": {
            "page": 1,
            "pageSize": 24,
            "total": 7859,
            "totalPages": 328,
            "hasMore": true
        },
        "stats": [
            {
                "type": "PRICE",
                "min": 13000,
                "max": 19500000,
                "mean": 925751.08
            }
        ]
    },
    "meta": {
        "endpoint_family": "search",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
|  | Error | The requested Imovirtual resource was not found. Not billed. |
|  | Error | Imovirtual could not be reached. Not billed. |
|  | Error | Imovirtual rejected the request. Not billed. |
|  | Error | The upstream service is temporarily unavailable. Please retry shortly. |
|  | Error | Imovirtual returned an unexpected payload shape. Not billed. |

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