Skip to content

Villages

Village endpoints expose Turkey's village records.

Base path:

http
/v2/villages

Endpoints

MethodPathDescription
GET/v2/villagesList villages
GET/v2/villages/{villageId}Get one village by ID

Village Object

FieldTypeDescription
idintegerVillage ID
namestringVillage name
slugstringURL-safe village name
provinceIdintegerParent province ID
districtIdintegerParent district ID
populationintegerVillage population
postalCodestringFive-digit village postal code
postalCodeStatusstringPostal code status: official or estimated

TIP

Despite postal codes being numeric, the postalCode field is a five-digit string because some postal codes in Turkey start with leading zeros, which would be lost if stored as integers.

Postal Code Status

Use postalCodeStatus to understand how the postal code was determined:

ValueMeaning
officialThe postal code is available in the official PTT postal code data and is used directly from that source.
estimatedThe postal code is not available in the PTT data. The value is inferred from supplementary public sources, nearby settlements, district-level postal code patterns, or documented administrative changes.

derived is used only for neighborhoods, not villages.

Clients that require strict official postal code data should check postalCodeStatus. For official-only usage, filter records where postalCodeStatus is official.

Current village status distribution:

StatusCount
official18,162
estimated21
Total18,183

Example village:

json
{
  "id": 547,
  "name": "İncebağ",
  "slug": "incebag",
  "provinceId": 2,
  "districtId": 1105,
  "population": 344,
  "postalCode": "02010",
  "postalCodeStatus": "official"
}

List Villages

http
GET /v2/villages

Returns a paginated list of villages.

Query Parameters

ParameterTypeDefaultDescription
searchstring-Filters by village name
fieldsstring-Comma-separated village fields to include
sortstringidSorts by a village field. Allowed values: id, -id, name, -name, population, -population
limitinteger100Number of records to return, from 1 to 1000
offsetinteger0Number of records to skip
minPopulationinteger-Minimum population
maxPopulationinteger-Maximum population
provinceIdinteger-Filters villages by parent province ID
districtIdinteger-Filters villages by parent district ID
postalCodestring-Filters by exact five-digit postal code
postalCodePrefixstring-Filters by one-to-five digit postal code prefix
postalCodeStatusstring-Comma-separated postal code status filter: official, estimated

If both minPopulation and maxPopulation are provided, minPopulation must be less than or equal to maxPopulation. When combining provinceId and districtId, the district must belong to the selected province.

Allowed Fields

text
id,name,slug,provinceId,districtId,population,postalCode,postalCodeStatus

Request

bash
curl "https://api.turkiyeapi.dev/v2/villages?districtId=1105&postalCodePrefix=020&limit=2&fields=id,name,provinceId,population,postalCode"

Response

json
{
  "data": [
    {
      "id": 523,
      "name": "Ahmethoca",
      "provinceId": 2,
      "population": 213
    },
    {
      "id": 524,
      "name": "Alibey",
      "provinceId": 2,
      "population": 94
    }
  ],
  "meta": {
    "count": 2,
    "total": 136,
    "limit": 2,
    "offset": 0,
    "datasetVersion": "2025",
    "lastUpdated": "2026-05-21"
  }
}

Get Village by ID

http
GET /v2/villages/{villageId}

Returns one village by numeric village ID.

Path Parameters

ParameterTypeDescription
villageIdintegerVillage ID

Query Parameters

ParameterTypeDefaultDescription
fieldsstring-Comma-separated village fields to include
includestring-Comma-separated related resources to include.

Includes

text
province,district

Request

bash
curl "https://api.turkiyeapi.dev/v2/villages/547?include=province,district"

Response

json
{
  "data": {
    "id": 547,
    "name": "İncebağ",
    "slug": "incebag",
    "provinceId": 2,
    "districtId": 1105,
    "population": 344,
    "postalCode": "02010",
    "postalCodeStatus": "official",
    "province": {
      "id": 2,
      "name": "Adıyaman",
      "slug": "adiyaman",
      "population": 617821,
      "area": {
        "value": 7337,
        "unit": "km2"
      },
      "altitude": {
        "value": 701,
        "unit": "m"
      },
      "phoneAreaCodes": [416],
      "isCoastal": false,
      "isMetropolitan": false,
      "region": {
        "tr": "Güneydoğu Anadolu",
        "en": "Southeastern Anatolia"
      },
      "coordinates": {
        "latitude": 37.7602985,
        "longitude": 38.2772986
      },
      "stats": {
        "districtCount": 9,
        "municipalityCount": 23,
        "neighborhoodCount": 175,
        "villageCount": 454
      }
    },
    "district": {
      "id": 1105,
      "name": "Merkez",
      "slug": "merkez",
      "provinceId": 2,
      "population": 296876,
      "area": {
        "value": 1814,
        "unit": "km2"
      },
      "stats": {
        "municipalityCount": 3,
        "neighborhoodCount": 49,
        "villageCount": 136
      }
    }
  },
  "meta": {
    "datasetVersion": "2025",
    "lastUpdated": "2026-05-21"
  }
}

Common Errors

StatusCodeWhen it happens
400BAD_REQUESTQuery or path parameter validation fails
400INVALID_RANGE_FILTERminPopulation is greater than maxPopulation
400INVALID_HIERARCHY_FILTERprovinceId and districtId do not describe the same hierarchy
400INVALID_FIELDSfields contains an unknown field for the requested resource
400INVALID_INCLUDEinclude contains an unsupported relation
404VILLAGE_NOT_FOUNDThe requested village does not exist
429-Rate limit exceeded
500INTERNAL_SERVER_ERRORUnexpected server error

Error response:

json
{
  "error": {
    "code": "VILLAGE_NOT_FOUND",
    "message": "Village not found.",
    "status": 404
  }
}