# Graana Agency Search API Documentation

Scrappa's `GET /api/graana/agencies` finds Graana agencies by name.

## What you get

Each agency has `id`, `name` and `url`. Graana sends about 20 agencies per request and has no paging, so narrow the result with `q` and `city_id`. Use the agency endpoint for the full profile and the search endpoint with `agency_id` for its properties.

- **Documentation:** [https://scrappa.co/docs/graana-api/graana_agencies](https://scrappa.co/docs/graana-api/graana_agencies)
- **API group:** Graana API
- **Endpoint:** `GET https://scrappa.co/api/graana/agencies`

## 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 |
| --- | --- | --- | --- |
| `q` | string | No | Part of an agency name, at least 2 characters. |
| `city_id` | integer | No | Limit the agencies to one city. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/graana/agencies?q=real&city_id=1"
```

## Example response

```json
{
    "success": true,
    "total": 2,
    "agencies": [
        {
            "id": 20614,
            "name": "Royal Realty",
            "url": "https://www.graana.com/agencies/20614"
        },
        {
            "id": 10764,
            "name": "RN Real Estate",
            "url": "https://www.graana.com/agencies/10764"
        }
    ],
    "meta": {
        "endpoint_family": "agencies",
        "billable": true,
        "attempts": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 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 | Graana could not be reached after retries, answered with an error or changed its format (`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)
