# InfoCasas Agency Profile API Documentation

Scrappa's `GET /api/infocasas/agency` returns the public profile of one real-estate agency: name, type, logo, description, address, website, opening hours, listing count, premium flag, branch offices and a masked phone. The agency id is `owner.id` on any listing.

Only masked contact data is published. Direct phone, WhatsApp and e-mail details are never returned. An unknown id returns a non-billable `404`.

- **Documentation:** [https://scrappa.co/docs/infocasas-api/infocasas_agency](https://scrappa.co/docs/infocasas-api/infocasas_agency)
- **API group:** InfoCasas API
- **Endpoint:** `GET https://scrappa.co/api/infocasas/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 | Numeric agency id, from owner.id on a listing. |
| `country` | string | No | uy (default), py or bo. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/infocasas/agency?id=210&country=uy"
```

## Example response

```json
{
    "success": true,
    "country": "uy",
    "agency": {
        "id": "210",
        "name": "Example Inmobiliaria",
        "type": "inmobiliaria",
        "logo": "https://cdn1.infocasas.com.uy/repo/img/logo.jpg",
        "profile_url": "/inmobiliarias/210-example/propiedades",
        "description": "Agency description.",
        "address": "Avenida de las Americas 8332",
        "website": "http://www.example.com",
        "schedule": "10 a 18",
        "masked_phone": "+5989",
        "property_count": 2263,
        "premium_agent": false,
        "subsidiaries": [
            {
                "id": "255",
                "name": "Casa central",
                "address": "Rambla Williman",
                "masked_phone": "+5989",
                "office_hours": "Lunes a Viernes 10 a 19"
            }
        ],
        "location": null
    },
    "meta": {
        "billable": true,
        "endpoint_family": "agency",
        "attempts": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | Nothing exists with that id or code in the chosen country (`not_found`). Non-billable. |
| 422 | Validation Error | A query parameter failed validation. Non-billable. |
| 503 | Upstream Unavailable | InfoCasas could not be reached after retries, or answered with a body this API cannot read (`upstream_unavailable`, `upstream_blocked`, `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)
