# Immoweb Location Autocomplete API Documentation

Scrappa's `GET /api/immoweb/locations` endpoint resolves Belgian place names into the exact filters the search endpoint accepts.

## Filter bootstrap, not just typeahead

This is more than a name lookup. Every hit carries a `query` object naming the filter parameter and a ready value. Typing a locality name returns hits whose `query.param` is `postalCodes` with a full comma-separated list; typing a district name returns hits whose `query.param` is `districts`. You can feed either value straight into [Immoweb Search](/docs/immoweb-api/immoweb_search).

## Languages

Pass `language` as `nl`, `fr` or `en`. Bare two-letter codes only — regional variants fall back to English silently upstream, so they are rejected here. Belgian coverage means French queries work: Gand resolves in French, Gent in Dutch and Ghent in English.

## Scope

Belgium only, which matches how the underlying data source scopes itself.

## Related endpoints

Use [Immoweb Geo](/docs/immoweb-api/immoweb_geo) to enumerate provinces and districts with their boundaries.

- **Documentation:** [https://scrappa.co/docs/immoweb-api/immoweb_locations](https://scrappa.co/docs/immoweb-api/immoweb_locations)
- **API group:** Immoweb API
- **Endpoint:** `GET https://scrappa.co/api/immoweb/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 |
| --- | --- | --- | --- |
| `input` | string | Yes | Place name fragment to resolve, for example Gent, Gand or Ghent. |
| `language` | string | No | nl, fr or en. Bare two-letter codes only; defaults to nl. |
| `maxResults` | integer | No | Maximum results per group, 1 to 50. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/immoweb/locations?input=Gent&language=nl"
```

## Example response

```json
{
    "success": true,
    "results": [
        {
            "type": "DISTRICT",
            "results": [
                {
                    "districtName": "Gent",
                    "query": {
                        "param": "districts",
                        "value": "GENT"
                    }
                }
            ]
        },
        {
            "type": "LOCALITY_NAME",
            "results": [
                {
                    "localityName": "Gent",
                    "countryCode": "BE",
                    "query": {
                        "param": "postalCodes",
                        "value": "BE-9000,BE-9030,BE-9050"
                    }
                }
            ]
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | One or more query parameters failed validation. No credits are charged. |
| 503 | Upstream Unavailable | One upstream lookup per request. A failed lookup is never billed. |

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