# Location Autocomplete

Search for locations (cities, districts, postal codes) and get geocodes that can be used in property search.

- **Documentation:** [https://scrappa.co/docs/immobilienscout24-api/immobilienscout24_locations](https://scrappa.co/docs/immobilienscout24-api/immobilienscout24_locations)
- **API group:** Immobilienscout24 API
- **Endpoint:** `GET https://scrappa.co/api/immobilienscout24/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 |
| --- | --- | --- | --- |
| `query` | string | Yes | Search term (city, district, or postal code) |
| `limit` | integer | No | Maximum results to return (default: 10) |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/immobilienscout24/locations?query=Berlin"
```

## Example response

```json
{
    "success": true,
    "locations": [
        {
            "geocode": "1276003001",
            "name": "Berlin",
            "type": "city"
        },
        {
            "geocode": "1276003001013",
            "name": "Berlin Mitte",
            "type": "district"
        }
    ]
}
```

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