Skip to main content
GET
/
v1
/
alarms
/
forecasts
/
cities
List cities
curl --request GET \
  --url https://api.iklim.co/v1/alarms/forecasts/cities
import requests

url = "https://api.iklim.co/v1/alarms/forecasts/cities"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.iklim.co/v1/alarms/forecasts/cities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.iklim.co/v1/alarms/forecasts/cities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.iklim.co/v1/alarms/forecasts/cities"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.iklim.co/v1/alarms/forecasts/cities")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.iklim.co/v1/alarms/forecasts/cities")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "id": 6,
    "name": "Ankara",
    "licensePlateCode": 6,
    "polygon": {
      "exterior": [
        {
          "lng": 32.85,
          "lat": 39.93
        },
        {
          "lng": 32.86,
          "lat": 39.93
        },
        {
          "lng": 32.86,
          "lat": 39.94
        },
        {
          "lng": 32.85,
          "lat": 39.94
        },
        {
          "lng": 32.85,
          "lat": 39.93
        }
      ],
      "holes": [
        [
          {
            "lng": 32.852,
            "lat": 39.932
          },
          {
            "lng": 32.853,
            "lat": 39.932
          },
          {
            "lng": 32.853,
            "lat": 39.933
          },
          {
            "lng": 32.852,
            "lat": 39.933
          },
          {
            "lng": 32.852,
            "lat": 39.932
          }
        ]
      ]
    }
  }
]
{
"timestamp": "YYYY-mm-DDTHH:MM:SS.nnnnnnnnn",
"status": "XXX",
"error": "Error Name",
"message": "Error Message",
"path": "/endpoint/uri/here",
"messages": [
"<string>"
]
}
{
"timestamp": "YYYY-mm-DDTHH:MM:SS.nnnnnnnnn",
"status": "XXX",
"error": "Error Name",
"message": "Error Message",
"path": "/endpoint/uri/here",
"messages": [
"<string>"
]
}
{
"timestamp": "YYYY-mm-DDTHH:MM:SS.nnnnnnnnn",
"status": "XXX",
"error": "Error Name",
"message": "Error Message",
"path": "/endpoint/uri/here",
"messages": [
"<string>"
]
}
{
"timestamp": "YYYY-mm-DDTHH:MM:SS.nnnnnnnnn",
"status": "XXX",
"error": "Error Name",
"message": "Error Message",
"path": "/endpoint/uri/here",
"messages": [
"<string>"
]
}

Response

OK

id
integer<int64>

Unique city identifier.

Example:

6

name
string

Official city name.

Example:

"Ankara"

licensePlateCode
integer<int32>

Turkish licence-plate code for the city.

Example:

6

polygon
object

City boundary polygon (GeoJSON ring coordinates).