# Immobilier Notaires Locality Group API Documentation

Scrappa's `GET /api/notaires-immo/locality-group` resolves an "all postal codes" place to its locality ids.

Take the `id` from `autocomplete` with `kind=group`. Send the returned `locality` value (comma-separated ids) to `search`.

- **Documentation:** [https://scrappa.co/docs/notaires-immo-api/notaires_immo_locality_group](https://scrappa.co/docs/notaires-immo-api/notaires_immo_locality_group)
- **API group:** Immobilier Notaires API
- **Endpoint:** `GET https://scrappa.co/api/notaires-immo/locality-group`

## 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` | integer | Yes | Group id from autocomplete with kind=group. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/notaires-immo/locality-group?id=12693"
```

## Example response

```json
{
    "success": true,
    "group": {
        "id": "12693",
        "name": "LYON",
        "label": "LYON (69), tous codes postaux",
        "label_en": "LYON (69), all postal codes",
        "department_code": "69",
        "population": 1000000,
        "locality_ids": [
            "30411",
            "30408",
            "30409"
        ],
        "locality": "30411,30408,30409"
    },
    "meta": {
        "endpoint_family": "locality_group",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | Immobilier Notaires has no group for this id (`not_found`). The listing may be sold or removed. Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters are rejected with `unsupported_filter`, never ignored. There is no bathroom or new-build filter. Non-billable. |
| 503 | Upstream Unavailable | Immobilier Notaires could not be reached after retries, blocked the request, returned another page than asked for, or returned data this API could not read (`upstream_unavailable`, `upstream_blocked`, `page_mismatch`, `parser_drift`, `no_exit_available`). 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)
