# Hepsiemlak Autocomplete API Documentation

<p><strong>Hepsiemlak Autocomplete API</strong> turns a place or agency name into ready values. Locations return the <code>slug</code> to use in search, its level (county or district) and coordinates. Agencies return the <code>id</code> to use in the agency routes. Turkish letters work, for example <code>şişli</code>.</p>

- **Documentation:** [https://scrappa.co/docs/hepsiemlak-api/hepsiemlak_autocomplete](https://scrappa.co/docs/hepsiemlak-api/hepsiemlak_autocomplete)
- **API group:** Hepsiemlak API
- **Endpoint:** `GET https://scrappa.co/api/hepsiemlak/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 |
| --- | --- | --- | --- |
| `query` | string | Yes | Place or agency name, 2 to 100 characters. Example: şişli. |
| `types` | array | No | location, agency or both (default). |
| `limit` | integer | No | Number of results, 1 to 25, default 10. |

## Example response

```json
{
    "data": {
        "query": "\u015fi\u015fli",
        "results": [
            {
                "id": 1663,
                "name": "\u0130stanbul, \u015ei\u015fli",
                "slug": "sisli",
                "type": "location",
                "level": "\u0130l\u00e7e",
                "latitude": 41.0586929321289,
                "longitude": 28.9879035949707
            },
            {
                "id": 121697,
                "name": "\u015eanl\u0131urfa, Siverek, Belde, Sislice",
                "slug": "sislice",
                "type": "location",
                "level": "Mahalle",
                "latitude": 37.860426,
                "longitude": 39.217725
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or outside its allowed values. This response is not billable. |
| 503 | Upstream Unavailable | Hepsiemlak could not be reached or capacity is busy. Retry after a short pause. 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)
