# Sreality Locality Geometries API

Return locality geometry for one entity type and identifier.

## Geometry data

The response includes the locality boundary and related public locality fields. Encoded geometry polylines are decoded before they are returned, so coordinate values can be consumed directly.

## Scope

Use `no_children` to omit child localities where supported. This endpoint does not return listings or map tiles.

- **Documentation:** [https://scrappa.co/docs/sreality-api/sreality_geometries](https://scrappa.co/docs/sreality-api/sreality_geometries)
- **API group:** Sreality API
- **Endpoint:** `GET https://scrappa.co/api/sreality/geometries`

## 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 |
| --- | --- | --- | --- |
| `entity_type` | string | Yes | Locality level: region, district, ward, municipality, or quarter. |
| `entity_id` | integer | Yes | Positive identifier for the selected locality. |
| `no_children` | boolean | No | Set true to exclude child localities from the result. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/sreality/geometries?entity_type=municipality&entity_id=5740&no_children=1"
```

## Example response

```json
{
    "success": true,
    "data": {
        "result": [
            {
                "entity_type": "municipality",
                "entity_id": 5740,
                "name": "Brno",
                "geometry": [
                    [
                        [
                            49.1951,
                            16.6068
                        ],
                        [
                            49.1962,
                            16.6081
                        ],
                        [
                            49.1947,
                            16.6092
                        ]
                    ]
                ]
            }
        ]
    },
    "meta": {
        "endpoint_family": "locations",
        "billable": true,
        "retryable": false
    }
}
```

## 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)
