# Green-Acres Agency Profile API Documentation

Scrappa's `GET /api/green-acres/agency` returns the public profile of one Green-Acres agency and its latest listings.

## What you get

`name`, `city`, `languages`, the `parent` company (name, type, address, `agency_key`, `slug`, logo) and `latest_listings`, up to 6 items in the same shape as the search items.

## Latest 6 listings only

Green-Acres shows the latest 6 listings on the agency page. The full list is not available through this API. `listings_limit_note` repeats this in every response. To list more of an agency's property, search by location and filter the `agency` of the items.

## How to find an agency

Use `agency.agency_key` and `agency.slug` of a listing result. The `slug` is optional.

- **Documentation:** [https://scrappa.co/docs/green-acres-api/green_acres_agency](https://scrappa.co/docs/green-acres-api/green_acres_agency)
- **API group:** Green-Acres API
- **Endpoint:** `GET https://scrappa.co/api/green-acres/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 |
| --- | --- | --- | --- |
| `agency_key` | string | No | agency_key from a listing result, for example QFm252w5k7VL. Required unless url is given. |
| `slug` | string | No | Optional agency slug from a listing result, for example said-el-marrahi-barjac. |
| `url` | string | No | Agency address on green-acres.fr. Required unless agency_key is given. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/green-acres/agency?agency_key=QFm252w5k7VL&slug=said-el-marrahi-barjac"
```

## Example response

```json
{
    "success": true,
    "data": {
        "agency_key": "QFm252w5k7VL",
        "slug": "said-el-marrahi-barjac",
        "name": "Said El marrahi",
        "city": "barjac",
        "languages": [
            "Fran\u00e7ais",
            "Anglais"
        ],
        "parent": {
            "name": "Renaissance Immobilier",
            "type": "Agence immobili\u00e8re",
            "address": "AVENUE CHAILLOT, 30430 barjac",
            "agency_key": "59zEZGtck8Je",
            "slug": "renaissance-immobilier-barjac",
            "logo": "https://lb1.green-acres.com/ClientLogos/386262.png"
        },
        "listings_limit_note": "Green-Acres shows the latest 6 listings of an agency. The full list is not available.",
        "latest_listings": [
            {
                "listing_id": "A3nj6wezmd7cep29",
                "url": "https://www.green-acres.fr/fr/properties/immobilier/chassiers/A3nj6wezmd7cep29.htm",
                "title": "Sud Ardeche-Chassiers 07110",
                "price": 233000,
                "currency": "EUR",
                "price_on_request": false,
                "price_from": false,
                "price_per_m2": 3107,
                "price_drop_percent": null,
                "city": "Chassiers",
                "department": "Ard\u00e8che",
                "property_type": "Mas proven\u00e7al",
                "is_new_build": false,
                "is_exclusive": true,
                "rooms": 4,
                "rooms_max": null,
                "bedrooms": 2,
                "bedrooms_max": null,
                "living_area_m2": 75,
                "living_area_max_m2": null,
                "land_area_m2": 4160,
                "lots": null,
                "description_snippet": "Mas en pierre avec vue d\u00e9gag\u00e9e Chassiers (07110)...",
                "photo_count": 12,
                "thumbnails": [
                    "https://lb1.green-acres.com/1140632a/A3nj6wezmd7cep29/miniPhotos/A3nj6wezmd7cep29_1.jpg"
                ],
                "agency": {
                    "name": "Said El marrahi",
                    "parent": "Renaissance Immobilier",
                    "logo": "https://lb1.green-acres.com/ClientLogos/386262.png",
                    "account_id": "1140632a"
                }
            }
        ]
    },
    "meta": {
        "endpoint_family": "agency",
        "billable": true,
        "attempts": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | No agency with that key exists on Green-Acres (`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 | Green-Acres 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)
