# Emlakjet Location Autocomplete API Documentation

Scrappa's `GET /api/emlakjet/autocomplete` finds the cities, districts and neighbourhoods that the Emlakjet search accepts.

## What you get

Each item has `id`, `group`, `type` (city, district or town), `name`, `display_name`, `slug`, `city` and `district`. For places, `search_params.location` is the slug to pass as `location` to `/api/emlakjet/search`, `/api/emlakjet/agencies` and the other location based calls. Housing estates (group `site`) are listed without `search_params`.

## Notes

`q` needs at least 2 characters. A name with no match returns an empty list with status 200.

- **Documentation:** [https://scrappa.co/docs/emlakjet-api/emlakjet_autocomplete](https://scrappa.co/docs/emlakjet-api/emlakjet_autocomplete)
- **API group:** Emlakjet API
- **Endpoint:** `GET https://scrappa.co/api/emlakjet/autocomplete`

## 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 |
| --- | --- | --- | --- |
| `q` | string | Yes | Start of a place name, at least 2 characters. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/emlakjet/autocomplete?q=kadik"
```

## Example response

```json
{
    "success": true,
    "data": {
        "query": "kadik",
        "items": [
            {
                "id": 1421,
                "group": "location",
                "type": "district",
                "name": "\u0130stanbul, Kad\u0131k\u00f6y",
                "display_name": "Kad\u0131k\u00f6y",
                "slug": "istanbul-kadikoy",
                "city": {
                    "id": 34,
                    "name": "\u0130stanbul",
                    "slug": "istanbul"
                },
                "district": {
                    "id": 1421,
                    "name": "Kad\u0131k\u00f6y",
                    "slug": "istanbul-kadikoy"
                },
                "search_params": {
                    "location": "istanbul-kadikoy"
                }
            }
        ]
    },
    "meta": {
        "endpoint_family": "autocomplete",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters and unknown values are rejected before any lookup, never ignored. Non-billable. |
| 503 | Upstream Unavailable | Emlakjet could not be reached after one retry, answered with an error or changed its format (`UPSTREAM_UNAVAILABLE`). Retryable and never billed. Clients are never rate limited. |

## 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)
