# Nepremicnine.net Settlements API Documentation

Scrappa's `GET /api/nepremicnine/settlements` returns the settlements (naselja) of one administrative unit.

Search has no settlement filter. Use the returned `unit_id` in search and the settlement name to read the `location.settlement` of results. An unknown `unit_id` returns `422`.

- **Documentation:** [https://scrappa.co/docs/nepremicnine-api/nepremicnine_settlements](https://scrappa.co/docs/nepremicnine-api/nepremicnine_settlements)
- **API group:** Nepremicnine.net API
- **Endpoint:** `GET https://scrappa.co/api/nepremicnine/settlements`

## 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 |
| --- | --- | --- | --- |
| `unit_id` | integer | Yes | Administrative unit id from the administrative-units endpoint, for example 68. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/nepremicnine/settlements?unit_id=68"
```

## Example response

```json
{
    "success": true,
    "unit": {
        "id": 68,
        "name": "Kranj"
    },
    "total": 1,
    "settlements": [
        {
            "id": 1681,
            "name": "Adergas",
            "unit_id": 68,
            "municipality_id": 16
        }
    ],
    "meta": {
        "endpoint_family": "settlements",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Unknown Id | The `unit_id` is not an administrative unit (`unknown_unit`). Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | Nepremicnine.net could not be reached after retries or answered with an error (`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)
