Current Forecast Operation
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"
]
}
'import requests
url = "https://api.iklim.co/v1/forecasts/current"
payload = {
"location": {
"lng": 32.857358,
"lat": 39.93504
},
"metrics": ["TEMPERATURE", "HUMIDITY"]
}
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']
})
};
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'
]
]),
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}")
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}")
.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}"
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"
]
}Current Forecast Operation
Returns the latest available weather metrics for the requested location.
POST
/
v1
/
forecasts
/
current
Current Forecast Operation
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"
]
}
'import requests
url = "https://api.iklim.co/v1/forecasts/current"
payload = {
"location": {
"lng": 32.857358,
"lat": 39.93504
},
"metrics": ["TEMPERATURE", "HUMIDITY"]
}
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']
})
};
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'
]
]),
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}")
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}")
.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}"
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"
]
}Body
application/json
Metrics requested for the current weather endpoint. Allowed values: WEATHER_ICON, TEMPERATURE, APPARENT_TEMPERATURE, HUMIDITY, CLOUD_COVER, WIND_SPEED, WIND_GUSTS, WIND_DIRECTION, SNOWFALL, PRECIPITATION
Minimum array length:
1Available options:
WEATHER_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 Example:
["TEMPERATURE", "HUMIDITY"]
Response
Current weather data successfully retrieved.