# OhneMakler Location Autocomplete

Resolve search terms to stable location ids. `term` matches city names, postal codes (PLZ), and region entries (Kreis/Bundesland) and returns stable `id`/`model` (`CITY`, `STATE`, `REGION`, `ZIPCODE`) objects with `finder_label` and `breadcrumb_label` — feed `name`/`breadcrumb_label` segments back into search `state`/`city` params using the URL slugs exactly as published (unknown slugs return a non-billable 404). `type=states` returns the 16 German Bundesländer (no `term` allowed).

- **Documentation:** [https://scrappa.co/docs/ohne-makler-api/ohne_makler_locations](https://scrappa.co/docs/ohne-makler-api/ohne_makler_locations)
- **API group:** OhneMakler API
- **Endpoint:** `GET https://scrappa.co/api/ohne-makler/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 |
| --- | --- | --- | --- |
| `term` | string | No | Search term: city name, postal code, or region (e.g. "hamburg", "97070"). |
| `type` | string | No | Set to "states" for the German Bundesländer list instead of a term search. |
| `limit` | integer | No | Maximum locations returned (1-25, default 10). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/ohne-makler/locations?term=hamburg"
```

## Example response

```json
{
    "success": true,
    "count": 1,
    "locations": [
        {
            "id": 109316,
            "model": "CITY",
            "name": "Hamburg",
            "finder_label": "Hamburg",
            "breadcrumb_label": "Hamburg"
        }
    ]
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter failed validation (for example a missing `term` without `type=states`, or `limit` outside 1-25). Non-billable. |
| 503 | Upstream Unavailable | The upstream location lookup 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)
