# WG-Gesucht Districts

List every district of a WG-Gesucht city. Berlin returns 102 districts. Pass the district ids to search as ot to scope results to them, which is exact and additive. The offers_count on each district is not reliable — it disagrees with what search returns for the same district — so use it only to decide whether a district is worth querying, never to size a crawl.

- **Documentation:** [https://scrappa.co/docs/wg-gesucht-api/wg_gesucht_districts](https://scrappa.co/docs/wg-gesucht-api/wg_gesucht_districts)
- **API group:** WG-Gesucht API
- **Endpoint:** `GET https://scrappa.co/api/wg-gesucht/districts`

## 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 |
| --- | --- | --- | --- |
| `city_id` | integer | Yes | City id from the locations endpoint. Required. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/wg-gesucht/districts?city_id=8"
```

## Example response

```json
{
    "success": true,
    "data": {
        "city_id": 8,
        "districts": [
            {
                "district_id": 114,
                "district_name": "Prenzlauer Berg",
                "offers_count": 7
            }
        ],
        "districts_count": 102,
        "offers_count_is_reliable": false
    },
    "meta": {
        "duration_ms": 96,
        "endpoint_family": "districts"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The requested query combination is not served. This response is not billable. |
| 422 | Validation Error | A public parameter is invalid, including a missing scope field or a category and rent type the platform does not serve. This response is not billable. |
| 503 | Service Unavailable | The service could not obtain a complete result. 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)
