# Boligsiden Locations API Documentation

<p><strong>Boligsiden Locations API Documentation</strong> Autocomplete cities, municipalities, roads, zip codes, provinces, places and addresses from a text, with the number of matching listings. Use the returned city name in the cities filter and the municipality slug in the municipalities filter of the search endpoint. Each address has the case id of its listing.</p>

- **Documentation:** [https://scrappa.co/docs/boligsiden-api/boligsiden_locations](https://scrappa.co/docs/boligsiden-api/boligsiden_locations)
- **API group:** Boligsiden API
- **Endpoint:** `GET https://scrappa.co/api/boligsiden/locations`

## 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 |
| --- | --- | --- | --- |
| `q` | string | Yes | Text to complete, at least 2 characters. Example: aarh. |
| `listing_type` | string | No | sale (default) or rent. Counts follow the listing type. |
| `address_types` | string | No | Comma separated address types to count, for example villa,condo. |

## Example response

```json
{
    "data": {
        "locations": {
            "roads": [
                {
                    "name": "\u00c5rhusvej, 8940 Randers SV",
                    "slug": "aarhusvej,-8940-randers-sv",
                    "count": 5
                },
                {
                    "name": "\u00c5rhusvej, 8660 Skanderborg",
                    "slug": "aarhusvej,-8660-skanderborg",
                    "count": 4
                },
                {
                    "name": "\u00c5rhusgade, 2100 K\u00f8benhavn \u00d8",
                    "slug": "aarhusgade,-2100-koebenhavn-oe",
                    "count": 2
                }
            ],
            "cities": [
                {
                    "name": "Aarhus C",
                    "slug": "aarhus-c",
                    "count": 215
                },
                {
                    "name": "Aarhus N",
                    "slug": "aarhus-n",
                    "count": 64
                },
                {
                    "name": "Aarhus V",
                    "slug": "aarhus-v",
                    "count": 31
                }
            ],
            "places": [],
            "addresses": [
                {
                    "name": "\u00c5rhusvej 37, 8883 Gjern",
                    "case_id": "42f3c176-5624-488c-860c-b5a915d94cb6"
                },
                {
                    "name": "\u00c5rhus Plads 2, 5. tv., 2100 K\u00f8benhavn \u00d8",
                    "case_id": "2d113c09-f689-43f4-a703-0a4f8d66a393"
                },
                {
                    "name": "\u00c5rhusvej 68, 8500 Grenaa",
                    "case_id": "16132c28-db3a-40e6-a538-9303a84b35a9"
                }
            ],
            "provinces": [],
            "zip_codes": [],
            "custom_areas": [],
            "municipalities": [
                {
                    "name": "Aarhus",
                    "slug": "aarhus",
                    "count": 1096
                }
            ]
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "locations_cases"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing or invalid. No upstream request is made. This response is not billable. |
| 503 | Service Unavailable | Boligsiden could not be reached, blocked or rate limited every attempt, or answered with a shape that no longer matches the documented contract. Retry shortly. This response is not billable. |

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