# Pisos.com Agency Profile API Documentation

Scrappa's `GET /api/pisos/agency` returns the public profile of one Pisos.com agency.

## What you get

`name`, `client_since`, `logo`, `description`, `address`, `phone` as the public page shows it, `website`, `opening_hours` per day and `listing_count`, the number of properties the agency has online.

## How to find an agency

Use `agency.slug` of a search or listing result. Call `/api/pisos/agency/listings` for the agency's properties.

- **Documentation:** [https://scrappa.co/docs/pisos-api/pisos_agency](https://scrappa.co/docs/pisos-api/pisos_agency)
- **API group:** Pisos.com API
- **Endpoint:** `GET https://scrappa.co/api/pisos/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 |
| --- | --- | --- | --- |
| `slug` | string | Yes | Agency slug from a search or listing result, for example princess_homes. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/pisos/agency?slug=princess_homes"
```

## Example response

```json
{
    "success": true,
    "data": {
        "slug": "princess_homes",
        "url": "https://www.pisos.com/inmobiliaria-princess_homes/",
        "name": "Princess Homes",
        "client_since": 2019,
        "logo": "https://fotos.imghs.net/prof-wp/logos/logo.jpg",
        "description": "Inmobiliaria de alta gama en Madrid.",
        "address": "C/ Tutor, 54 , 28008, Madrid Capital (Madrid)",
        "phone": "34919384534",
        "website": "https://www.example.com",
        "opening_hours": [
            {
                "day": "Lunes",
                "hours": "09:30 - 13:30, 16:30 - 19:30",
                "schema": "Mo 09:30-13:30 16:30-19:30"
            },
            {
                "day": "Domingo",
                "hours": "Cerrado",
                "schema": null
            }
        ],
        "listing_count": 14
    },
    "meta": {
        "endpoint_family": "agency",
        "billable": true,
        "attempts": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | No agency with that slug exists on Pisos.com (`NOT_FOUND`). Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters and unknown values are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | Pisos.com could not be reached, refused the request or answered with a page this API could not read (`UPSTREAM_UNAVAILABLE`). 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)
