Skip to content

⚠️ Deprecated

This endpoint is deprecated and will be removed in the future. Use its API v1 equivalent for new integrations.

Deprecated

Get Cities​

GET
/city/all

Lists cities by country ID or country code; at least one of countryId and countryCode is required. No token required.

Parameters​

Header Parameters

Accept-Language

Response language: tr or en. Sets error messages and language-dependent names; tr is used when no recognized language is given.

Typestring
Examples
"tr"
"en"

Query Parameters

countryCode

Country code. Required when countryId is not given

Typestring
Example"TR"
countryId

Country ID. Required when countryCode is not given

Typeinteger
Example234
Minimum1
name

Cities whose name contains this value

Typestring
Example"ADA"
sortBy

Sort field

Typestring
Valid values
"id""name"
Default"name"
sortOrder

Sort order: ASC / DESC or asc / desc

Typestring
Valid values
"ASC""DESC"
Default"ASC"

Responses​

Cities retrieved successfully

application/json
JSON
[
{
"id": 98273,
"name": "ADANA"
}
]

Playground​

Headers
Variables
Key
Value

Samples​

cURL
JavaScript
PHP
Python