# Habitaclia Publisher API Documentation

Returns the listings published by one agency, addressed by the publisher.id UUID embedded in a listing (from /search or /listing). Each item carries the same fields as /search, including the publisher block. Paginate with page and page_size; total_count and has_more come from the same response. A publisher with no matching listing returns an empty data array, which is a successful, billable response. The publisher id is taken from a listing; there is no slug-to-id resolver.

- **Documentation:** [https://scrappa.co/docs/habitaclia-api/habitaclia_publisher](https://scrappa.co/docs/habitaclia-api/habitaclia_publisher)
- **API group:** Habitaclia API
- **Endpoint:** `GET https://scrappa.co/api/habitaclia/publisher`

## 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 |
| --- | --- | --- | --- |
| `publisher_id` | string | Yes | The publisher.id UUID from a listing, for example 495e4019-af2d-43ad-a876-2a9b6be68834. |
| `page` | integer | No | 1-based page number. Defaults to 1. |
| `page_size` | integer | No | Items per page, 1 to 1000. Defaults to 20. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/habitaclia/publisher?publisher_id=495e4019-af2d-43ad-a876-2a9b6be68834&page=1&page_size=5"
```

## Example response

```json
{
    "success": true,
    "data": [
        {
            "ad_id": "78e259a3-1c2d-4f94-984d-de229e7f6d4b",
            "legacy_id": "i37637000000001",
            "url": "https://www.habitaclia.com/i37637000000001.htm",
            "property_type": "flat",
            "transaction_type": "buy",
            "price": 100000,
            "currency": "EUR",
            "publisher": {
                "id": "495e4019-af2d-43ad-a876-2a9b6be68834",
                "name": "ROQUETA INVESTMENT"
            }
        }
    ],
    "meta": {
        "endpoint_family": "publisher",
        "billable": true,
        "page": 1,
        "page_size": 5,
        "total_count": 11169,
        "has_more": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The requested listing was not found. This response is not billable. |
| 422 | Validation Error | A public parameter is invalid, including an unknown transaction_type, property_type or sort_by. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result from Habitaclia. 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)
