# Immobilier Notaires Locality Details API Documentation

Scrappa's `GET /api/notaires-immo/locality` returns the name, postal code, population and coordinates of one locality id.

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

## 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 | Locality id from autocomplete. |

## Example request

```bash
#!/bin/bash

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

## Example response

```json
{
    "success": true,
    "locality": {
        "id": "30407",
        "name": "LYON 3",
        "postal_code": "69003",
        "population": 103506,
        "longitude": 4.849295,
        "latitude": 45.760198
    },
    "meta": {
        "endpoint_family": "locality_details",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | Immobilier Notaires has no locality 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)
