Skip to content

Schemas

This page summarizes the shared v2 response envelopes and resource schemas. Field-level details for settlement resources are also documented on their dedicated reference pages.

Response Envelopes

Data Response

Single-resource endpoints return:

json
{
  "data": {},
  "meta": {
    "datasetVersion": "2025",
    "lastUpdated": "2026-05-21"
  }
}

List Response

List endpoints return:

json
{
  "data": [],
  "meta": {
    "count": 0,
    "total": 0,
    "limit": 100,
    "offset": 0,
    "datasetVersion": "2025",
    "lastUpdated": "2026-05-21"
  }
}
FieldTypeDescription
meta.countintegerNumber of records in the current response
meta.totalintegerNumber of records matching the filters
meta.limitintegerRequested page size
meta.offsetintegerRequested offset
meta.datasetVersionstringDataset version used by the response
meta.lastUpdatedstringDataset update date

Resource Schemas

SchemaDescriptionReference
ProvinceProvince record with geography, region, coordinates, and aggregate countsProvinces
DistrictDistrict record with parent province, area, population, and aggregate countsDistricts
MunicipalityMunicipality record with type, parent IDs, population, and neighborhood countMunicipalities
NeighborhoodNeighborhood record with parent IDs, population, postal code, and postal code statusNeighborhoods
VillageVillage record with parent IDs, population, postal code, and postal code statusVillages

Shared Field Types

Field patternTypeNotes
idintegerPositive resource ID
namestringHuman-readable Turkish name
slugstringURL-safe resource name
populationintegerNon-negative population
area.valuenumberArea value
area.unitstringAlways km2
altitude.valuenumberAltitude value
altitude.unitstringAlways m
postalCodestringFive-digit postal code
postalCodeStatusstringPostal code status. Neighborhoods use official, derived, or estimated; villages use official or estimated
stats.*CountintegerNon-negative aggregate count

postalCodeStatus distinguishes values used directly from official PTT postal code data (official), neighborhood-only values derived from a previous settlement with a known PTT postal code (derived), and values inferred from supplementary public sources, nearby settlements, district-level patterns, or administrative-change records (estimated). Clients that require strict official postal code data should filter records where postalCodeStatus is official.

stats.*Count values are derived from the indexed relationships in the loaded dataset. They match the child records served by the corresponding nested collection endpoints.

Municipality Types

ValueMeaning
province_centerProvince center municipality
district_centerDistrict center municipality
townTown municipality

Meta Schema

GET /v2/meta returns:

FieldTypeDescription
apiVersionstringAPI version
datasetVersionstringDataset version
lastUpdatedstringDataset update date
sourcesarrayDataset source list
counts.provincesintegerProvince count
counts.districtsintegerDistrict count
counts.municipalitiesintegerMunicipality count
counts.neighborhoodsintegerNeighborhood count
counts.villagesintegerVillage count

The counts.* values are derived from the loaded dataset records.

Error Schema

Error responses use:

json
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Error message.",
    "status": 400
  }
}

See Errors for error codes and examples.