# Spacious HK Agency API

<p>Without `mode` the endpoint returns the agency profile: the name, the licence number and a few current sale and rental listings. With `mode` it returns one page of all sale or rental listings of the agency, 10 per page, in the same shape as the search results, with the total. A page past the last page returns an empty list. Spacious has no page for single agents and shows no phone numbers or addresses. The name and licence of the agent come with each listing.</p>

- **Documentation:** [https://scrappa.co/docs/spacious-hk-api/spacious_hk_agency](https://scrappa.co/docs/spacious-hk-api/spacious_hk_agency)
- **API group:** Spacious HK API
- **Endpoint:** `GET https://scrappa.co/api/spacious-hk/agency`

## 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 from the agency search or from the `agency` of a listing. |
| `mode` | string | No | Leave out for the profile. `buy` or `rent` returns one page of the listings of the agency. |
| `page` | integer | No | Page of the listings, 1-based, 10 per page. Used with `mode`. |

## Example response

```json
{
    "data": {
        "id": 420,
        "url": "https://www.spacious.hk/en/c/hong-kong/agencies/420",
        "name": "Universal Property Agency (Global) Limited",
        "licence": "C-042851",
        "rent_listings": [],
        "sale_listings": [
            {
                "id": "15083275",
                "price": 12800000,
                "bedrooms": 2,
                "currency": "HKD",
                "bathrooms": 1,
                "price_text": "HK$12.8M",
                "net_area_sqft": 529,
                "quality_agent": true,
                "gross_area_sqft": 692
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "agency"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
|  | The listing, building or agency does not exist or is no longer online. This response is not billable. |  |
|  | A parameter is missing or invalid. This response is not billable. |  |
|  | Spacious HK is temporarily unavailable, or its answer did not match the request, for example another page or an ignored filter. Retry the request. This response is not billable. |  |

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