# ImmoScout24 CH Locations API Documentation

Resolve Swiss locations by name (autocomplete) or by a comma-separated geo tag list. Each result carries the geo tag, type, multilingual names, centre coordinates and child tags. Feed the id into the search endpoint as geo_tags. With house_pk the endpoint returns the address of a Flatfox house. Unknown ids answer a non-billable 404.

- **Documentation:** [https://scrappa.co/docs/immoscout24-ch-api/immoscout24_ch_locations](https://scrappa.co/docs/immoscout24-ch-api/immoscout24_ch_locations)
- **API group:** ImmoScout24 CH API
- **Endpoint:** `GET https://scrappa.co/api/immoscout24-ch/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 |
| --- | --- | --- | --- |
| `name` | string | No | Search term (city, district or postal code). One of name, ids or house_pk is required. Example: zurich. |
| `ids` | string | No | Comma-separated geo tags. Example: geo-city-zurich. |
| `house_pk` | integer | No | Flatfox house id (not a listing id). Returns the street, postal code and city. |
| `lang` | string | No | Result language: de, fr, it or en. Defaults to de. |
| `from` | integer | No | Offset for name results. Defaults to 0. |
| `size` | integer | No | Results per page for name lookup, 1 to 50. Defaults to 10. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/immoscout24-ch/locations?name=zurich&lang=en&size=3"
```

## Example response

```json
{
    "success": true,
    "data": {
        "query": {
            "name": "zurich"
        },
        "pagination": {
            "from": 0,
            "size": 3,
            "total": 75
        },
        "results": [
            {
                "id": "geo-city-zurich",
                "type": "place",
                "names": {
                    "de": [
                        "Z\u00fcrich"
                    ],
                    "en": [
                        "Zurich"
                    ],
                    "fr": [
                        "Zurich"
                    ],
                    "it": [
                        "Zurigo"
                    ]
                },
                "center": {
                    "lat": 47.3772,
                    "lon": 8.5393
                },
                "children": [
                    "geo-zipcode-8001",
                    "geo-zipcode-8002"
                ]
            }
        ]
    },
    "meta": {
        "endpoint_family": "locations",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable. |
| 404 | Location Not Found | The source has no matching resource. This response is not billable. |
| 503 | Source Unavailable | The source is temporarily unreachable or blocked the request. Retry later; 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)
