# ImmoScout24 CH Price Statistics API Documentation

Market price statistics for a Swiss municipality or canton, as shown on the ImmoScout24 price pages: price value with median and range, price by number of rooms, the price distribution and the quarterly price evolution. The level_id is the numeric id of the place on the ImmoScout24 price pages. Rent figures are offered at municipality level only.

- **Documentation:** [https://scrappa.co/docs/immoscout24-ch-api/immoscout24_ch_price_statistics](https://scrappa.co/docs/immoscout24-ch-api/immoscout24_ch_price_statistics)
- **API group:** ImmoScout24 CH API
- **Endpoint:** `GET https://scrappa.co/api/immoscout24-ch/price-statistics`

## 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 |
| --- | --- | --- | --- |
| `level_id` | integer | Yes | Numeric id of the municipality or canton on the ImmoScout24 price pages. Example: 131. |
| `level` | string | No | municipality or canton. Defaults to municipality. |
| `operation` | string | No | price_value, room_distribution, value_distribution or evolution. Defaults to price_value. |
| `kpi_type` | string | No | For price_value: price, price_per_square_meter, rent or rent_per_square_meter. Defaults to price_per_square_meter. |
| `category` | string | No | For value_distribution: apartment or house. Defaults to apartment. |
| `years` | integer | No | For evolution: number of years back, 1 to 10. Defaults to 4. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/immoscout24-ch/price-statistics?level_id=131&level=municipality&operation=price_value"
```

## Example response

```json
{
    "success": true,
    "data": {
        "query": {
            "operation": "price_value",
            "kpi_type": "price_per_square_meter",
            "level": "municipality",
            "level_id": 131
        },
        "statistics": {
            "results": {
                "apartment": [
                    {
                        "price_value": 13646,
                        "price_value_median": 13200,
                        "price_range_min": 8900,
                        "price_range_max": 18400,
                        "price_date": 20261019
                    }
                ]
            }
        }
    },
    "meta": {
        "endpoint_family": "price-statistics",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable. |
| 404 | Statistics 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)
