# Imovirtual Agency Listings API Documentation

List the current listings shown on an Imovirtual agency page, using the same card shape as the search endpoint, with the same `pagination` and `stats` blocks. The upstream agency page only serves its first page, so `page` is limited to 1; any other value is rejected as a validation error. An unknown agency returns a non-billable 404.

- **Documentation:** [https://scrappa.co/docs/imovirtual-api/imovirtual_agency_listings](https://scrappa.co/docs/imovirtual-api/imovirtual_agency_listings)
- **API group:** Imovirtual API
- **Endpoint:** `GET https://scrappa.co/api/imovirtual/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` | string | Yes | Agency slug with its numeric id, e.g. trimovel-ID2872714. |
| `page` | integer | No | Page number. Only 1 is supported. Defaults to 1. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/imovirtual/agency-listings?agency=trimovel-ID2872714&page=1"
```

## Example response

```json
{
    "success": true,
    "data": {
        "items": [
            {
                "id": 19086405,
                "url": "https://www.imovirtual.com/pt/anuncio/apartamento-t3-lisboa-ID1j4aB",
                "title": "Apartamento T3",
                "estate": "FLAT",
                "transaction": "SELL",
                "price": {
                    "value": 250000,
                    "currency": "EUR"
                }
            }
        ],
        "pagination": {
            "page": 1,
            "pageSize": 6,
            "total": 82,
            "totalPages": 14,
            "hasMore": true
        },
        "stats": []
    },
    "meta": {
        "endpoint_family": "agency_listings",
        "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)
