Skip to content
Scrappa Get API key
Hepsiemlak API 1 credit/request

Hepsiemlak Locations API Documentation

GET https://scrappa.co/api/hepsiemlak/locations

Hepsiemlak Locations API walks the location tree. Without a parameter it lists the cities with their slugs. With city_id it lists the counties of that city, with county_id the districts of that county, each with id and coordinates. The ids feed the price index route. For search slugs use the filters route.

Hepsiemlak Locations API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/hepsiemlak/locations
Auth header
x-api-key
Cost
1 credit/request
Response preview
200 OK
{
    "data": {
        "level": "counties",
        "city_id": 34,
        "counties": [
            {
                "id": 1103,
                "name": "Adalar",
                "latitude": 40.8746566772461,
                "longitude": 29.1295642852783
            },
            {
                "id": 2048,
                "name": "Arnavutk\u00f6y",
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

This endpoint has no required query parameters.

2 optional filters available.

city_id integer Optional

City id such as 34 for İstanbul. Lists its counties.

Example value 1234567890
county_id integer Optional

County id such as 1421 for Kadıköy. Lists its districts. Do not combine with city_id.

Example value 1234567890

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "level": "counties",
        "city_id": 34,
        "counties": [
            {
                "id": 1103,
                "name": "Adalar",
                "latitude": 40.8746566772461,
                "longitude": 29.1295642852783
            },
            {
                "id": 2048,
                "name": "Arnavutk\u00f6y",
                "latitude": 41.186393737793,
                "longitude": 28.7388896942139
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "locations"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A parameter is missing or outside its allowed values. This response is not billable.

{
    "errors": {
        "city_id": [
            "The city_id field is invalid."
        ]
    },
    "message": "The request validation failed"
}
404

Not Found

The city or county id does not exist. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "locations"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested resource was not found."
    },
    "success": false
}
503

Upstream Unavailable

Hepsiemlak could not be reached or capacity is busy. Retry after a short pause. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "locations"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "Hepsiemlak could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.