# Goplaceit Agency Listings API Documentation

Scrappa's `GET /api/goplaceit/agency-listings` returns the properties of one agency in the same row shape as search. Send the agency `id`.

## Pagination

`page` is 1-based and `per_page` is 1-50 (default 30). `pagination` is computed by Scrappa. A page past the last one returns an empty `listings` list with the correct totals, never another page's data. An agency without listings returns an empty list.

- **Documentation:** [https://scrappa.co/docs/goplaceit-api/goplaceit_agency_listings](https://scrappa.co/docs/goplaceit-api/goplaceit_agency_listings)
- **API group:** Goplaceit API
- **Endpoint:** `GET https://scrappa.co/api/goplaceit/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 |
| --- | --- | --- | --- |
| `id` | string | Yes | Agency id, for example 70429. |
| `page` | integer | No | Result page, 1-based. |
| `per_page` | integer | No | Listings per page, 1-50 (default 30). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/goplaceit/agency-listings?id=70429&per_page=30"
```

## Example response

```json
{
    "success": true,
    "total_results": 11826,
    "returned": 1,
    "filtered_out_count": 0,
    "pagination": {
        "page": 1,
        "per_page": 30,
        "total_pages": 395,
        "has_next_page": true
    },
    "applied_filters": {
        "agency_id": 70429
    },
    "listings": [
        {
            "id": 13248055,
            "entity_type": "property",
            "title": "Departamento en Arriendo en Estoril",
            "price": 90,
            "price_from": null,
            "currency": {
                "id": 2,
                "code": "UF",
                "symbol": "UF",
                "name": "Unidad de Fomento",
                "iso_code": "CLF"
            },
            "mode": "rent",
            "type": "apartment",
            "type_label": "Departamento",
            "country": "cl",
            "commune": {
                "id": 288,
                "name": "Las Condes"
            },
            "bedrooms": 4,
            "bedrooms_min": null,
            "bedrooms_max": null,
            "bathrooms": 3,
            "bathrooms_min": null,
            "bathrooms_max": null,
            "area_m2": 160,
            "area_m2_min": null,
            "area_m2_max": null,
            "image": "https://example.com/photo-220x220.jpg",
            "url": "https://www.goplaceit.com/cl/propiedad/arriendo/departamento/las-condes/13248055-departamento-en-arriendo-en-estoril"
        }
    ],
    "meta": {
        "endpoint_family": "agency-listings",
        "billable": true,
        "attempts": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | No agency exists with that id (`not_found`). Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters and unknown sort or type values are rejected, never ignored. Non-billable. |
| 503 | Source Unavailable | Goplaceit could not be reached in time, refused the request, or its answer changed shape (`upstream_unavailable`, `request_blocked`, `deadline_exhausted`, `parser_drift`). Retryable and never billed. Clients are never rate limited. |

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