# OhneMakler Mietspiegel API

Returns the Mietspiegel page for one city: per-year and per-area comparison tables (city vs district vs state vs country) plus the inline Chart.js series, including error-bar points `{y, y_min, y_max}` — upstream omits error bars for some regions, which is returned as `null`, never invented. Slugs are transliterated (ü→u, ß→ss); an unknown slug is a non-billable 404.

- **Documentation:** [https://scrappa.co/docs/ohne-makler-api/ohne_makler_mietspiegel](https://scrappa.co/docs/ohne-makler-api/ohne_makler_mietspiegel)
- **API group:** OhneMakler API
- **Endpoint:** `GET https://scrappa.co/api/ohne-makler/market/mietspiegel`

## 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 |
| --- | --- | --- | --- |
| `state` | string | Yes | Bundesland slug (e.g. baden-wurttemberg). |
| `city` | string | Yes | City slug (e.g. abtsgmund). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/ohne-makler/market/mietspiegel?state=baden-wurttemberg&city=abtsgmund"
```

## Example response

```json
{
    "success": true,
    "market": "mietspiegel",
    "title": "Mietspiegel Abtsgm\u00fcnd 2026",
    "sections": [
        {
            "heading": "Entwicklung der Mietpreise f\u00fcr Wohnungen",
            "tables": [],
            "charts": [
                {
                    "id": "chart-WHNG-current-bar",
                    "type": "barWithErrorBars",
                    "labels": [
                        "Abtsgm\u00fcnd"
                    ],
                    "datasets": [
                        {
                            "label": "",
                            "data": [
                                {
                                    "y": 9.58,
                                    "y_min": 8.47,
                                    "y_max": 10.24
                                }
                            ]
                        }
                    ]
                }
            ],
            "regions": []
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | No Market Page | No Mietspiegel page exists for that state/city combination (`not_found`). Non-billable. |
| 422 | Validation Error | A query parameter failed validation (for example a missing `state` or `city`). Non-billable. |
| 503 | Upstream Unavailable | The upstream Mietspiegel page failed or could not be parsed after retries. `error.code` is one of `upstream_unavailable`, `parser_drift`, `upstream_blocked`, or `transport_error`. Retryable and 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)
