curl --request POST \
--url https://api.iklim.co/v1/forecasts/current \
--header 'Content-Type: application/json' \
--data '
{
"location": {
"lng": 32.857358,
"lat": 39.93504
},
"metrics": [
"TEMPERATURE",
"HUMIDITY"
],
"forecastDays": 7,
"startTime": 1746454091000
}
'import requests
url = "https://api.iklim.co/v1/forecasts/current"
payload = {
"location": {
"lng": 32.857358,
"lat": 39.93504
},
"metrics": ["TEMPERATURE", "HUMIDITY"],
"forecastDays": 7,
"startTime": 1746454091000
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
location: {lng: 32.857358, lat: 39.93504},
metrics: ['TEMPERATURE', 'HUMIDITY'],
forecastDays: 7,
startTime: 1746454091000
})
};
fetch('https://api.iklim.co/v1/forecasts/current', 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/forecasts/current",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'location' => [
'lng' => 32.857358,
'lat' => 39.93504
],
'metrics' => [
'TEMPERATURE',
'HUMIDITY'
],
'forecastDays' => 7,
'startTime' => 1746454091000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.iklim.co/v1/forecasts/current"
payload := strings.NewReader("{\n \"location\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"metrics\": [\n \"TEMPERATURE\",\n \"HUMIDITY\"\n ],\n \"forecastDays\": 7,\n \"startTime\": 1746454091000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.iklim.co/v1/forecasts/current")
.header("Content-Type", "application/json")
.body("{\n \"location\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"metrics\": [\n \"TEMPERATURE\",\n \"HUMIDITY\"\n ],\n \"forecastDays\": 7,\n \"startTime\": 1746454091000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.iklim.co/v1/forecasts/current")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"location\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"metrics\": [\n \"TEMPERATURE\",\n \"HUMIDITY\"\n ],\n \"forecastDays\": 7,\n \"startTime\": 1746454091000\n}"
response = http.request(request)
puts response.read_body{
"location": {
"lng": 32.857358,
"lat": 39.93504
},
"timezone": "Europe/Istanbul",
"elevation": 897.5,
"weatherIconUrlBase": "https://api-test.iklim.co/v1/weather-icons",
"metricForecasts": [
{
"metric": "TEMPERATURE",
"unit": "°C",
"forecasts": [
{
"time": "2025-04-14T16:58:22Z",
"isDay": true,
"value": 23.5,
"icon": "sunny"
}
]
}
],
"warnings": [
"The provided metric is not valid for this request: TEMPERATURE_SUM"
]
}Güncel Tahmin İşlemi
Talep edilen konum için en güncel hava durumu metriklerini döner.
curl --request POST \
--url https://api.iklim.co/v1/forecasts/current \
--header 'Content-Type: application/json' \
--data '
{
"location": {
"lng": 32.857358,
"lat": 39.93504
},
"metrics": [
"TEMPERATURE",
"HUMIDITY"
],
"forecastDays": 7,
"startTime": 1746454091000
}
'import requests
url = "https://api.iklim.co/v1/forecasts/current"
payload = {
"location": {
"lng": 32.857358,
"lat": 39.93504
},
"metrics": ["TEMPERATURE", "HUMIDITY"],
"forecastDays": 7,
"startTime": 1746454091000
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
location: {lng: 32.857358, lat: 39.93504},
metrics: ['TEMPERATURE', 'HUMIDITY'],
forecastDays: 7,
startTime: 1746454091000
})
};
fetch('https://api.iklim.co/v1/forecasts/current', 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/forecasts/current",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'location' => [
'lng' => 32.857358,
'lat' => 39.93504
],
'metrics' => [
'TEMPERATURE',
'HUMIDITY'
],
'forecastDays' => 7,
'startTime' => 1746454091000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.iklim.co/v1/forecasts/current"
payload := strings.NewReader("{\n \"location\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"metrics\": [\n \"TEMPERATURE\",\n \"HUMIDITY\"\n ],\n \"forecastDays\": 7,\n \"startTime\": 1746454091000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.iklim.co/v1/forecasts/current")
.header("Content-Type", "application/json")
.body("{\n \"location\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"metrics\": [\n \"TEMPERATURE\",\n \"HUMIDITY\"\n ],\n \"forecastDays\": 7,\n \"startTime\": 1746454091000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.iklim.co/v1/forecasts/current")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"location\": {\n \"lng\": 32.857358,\n \"lat\": 39.93504\n },\n \"metrics\": [\n \"TEMPERATURE\",\n \"HUMIDITY\"\n ],\n \"forecastDays\": 7,\n \"startTime\": 1746454091000\n}"
response = http.request(request)
puts response.read_body{
"location": {
"lng": 32.857358,
"lat": 39.93504
},
"timezone": "Europe/Istanbul",
"elevation": 897.5,
"weatherIconUrlBase": "https://api-test.iklim.co/v1/weather-icons",
"metricForecasts": [
{
"metric": "TEMPERATURE",
"unit": "°C",
"forecasts": [
{
"time": "2025-04-14T16:58:22Z",
"isDay": true,
"value": 23.5,
"icon": "sunny"
}
]
}
],
"warnings": [
"The provided metric is not valid for this request: TEMPERATURE_SUM"
]
}Gövde
Hava tahmini sorgusunun yapılacağı coğrafi nokta
Show child attributes
Show child attributes
Anlık hava durumu uç noktası için talep edilen metrikler. İzin verilen değerler: WEATHER_ICON, TEMPERATURE, APPARENT_TEMPERATURE, HUMIDITY, CLOUD_COVER, WIND_SPEED, WIND_GUSTS, WIND_DIRECTION, SNOWFALL, PRECIPITATION
1WEATHER_ICON, TEMPERATURE, TEMPERATURE_AVG, TEMPERATURE_MIN, TEMPERATURE_MAX, APPARENT_TEMPERATURE, APPARENT_TEMPERATURE_AVG, APPARENT_TEMPERATURE_MIN, APPARENT_TEMPERATURE_MAX, HUMIDITY, HUMIDITY_AVG, HUMIDITY_MIN, HUMIDITY_MAX, CLOUD_COVER, CLOUD_COVER_AVG, CLOUD_COVER_MIN, CLOUD_COVER_MAX, WIND_SPEED, WIND_SPEED_AVG, WIND_SPEED_MIN, WIND_SPEED_MAX, WIND_GUSTS, WIND_GUSTS_AVG, WIND_GUSTS_MIN, WIND_GUSTS_MAX, WIND_DIRECTION, SNOWFALL, PRECIPITATION, PRECIPITATION_PROBABILITY, PRECIPITATION_PROBABILITY_AVG, PRECIPITATION_PROBABILITY_MIN, PRECIPITATION_PROBABILITY_MAX, REF_EVAPORATION_TRANSPIRATION_ET0, REF_EVAPORATION_TRANSPIRATION_ET0_SUM, DEW_POINT, DEW_POINT_AVG, DEW_POINT_MIN, DEW_POINT_MAX, SOIL_TEMPERATURE, SOIL_MOISTURE, GLOBAL_TILTED_RADIATION_GTI, DIRECT_NORMAL_IRRADIANCE_DNI, SHORTWAVE_SOLAR_RADIATION_GHI, SHORTWAVE_RADIATION_SUM, VISIBILITY, VISIBILITY_AVG, VISIBILITY_MIN, VISIBILITY_MAX ["TEMPERATURE", "HUMIDITY"]
Döndürülecek maksimum gün sayısı (1-14)
1 <= x <= 147
Talep ufkunun başlangıcını belirleyen isteğe bağlı epoch milisaniyesi
1746454091000
Yanıt
Güncel hava durumu verileri başarıyla getirildi.
Tahminin üretildiği konum
Show child attributes
Show child attributes
Zaman damgalarında kullanılan IANA zaman dilimi kimliği
"Europe/Istanbul"
Talep edilen konumun metre cinsinden rakımı
897.5
Hava durumu simgelerini almak için kullanılabilecek temel URL
"https://api-test.iklim.co/v1/weather-icons"
Cevapta döndürülen metrik tahminleri
Show child attributes
Show child attributes
İstek için döndürülen bilgilendirici uyarılar
[
"The provided metric is not valid for this request: TEMPERATURE_SUM"
]