Skip to main content
POST
/
v1
/
thunderstorms
/
within
Thunderstorm List (Within Radius)
curl --request POST \
  --url https://api.iklim.co/v1/thunderstorms/within \
  --header 'Content-Type: application/json' \
  --data '
{
  "latitude": 39.869847,
  "longitude": 32.745468,
  "radius": 1000,
  "backwardInterval": 600,
  "endTimeEpoch": 1746454091000,
  "pageNumber": 0,
  "pageSize": 10,
  "intersectsWith": "AFFECTED_POLYGON"
}
'
import requests

url = "https://api.iklim.co/v1/thunderstorms/within"

payload = {
"latitude": 39.869847,
"longitude": 32.745468,
"radius": 1000,
"backwardInterval": 600,
"endTimeEpoch": 1746454091000,
"pageNumber": 0,
"pageSize": 10,
"intersectsWith": "AFFECTED_POLYGON"
}
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({
latitude: 39.869847,
longitude: 32.745468,
radius: 1000,
backwardInterval: 600,
endTimeEpoch: 1746454091000,
pageNumber: 0,
pageSize: 10,
intersectsWith: 'AFFECTED_POLYGON'
})
};

fetch('https://api.iklim.co/v1/thunderstorms/within', 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/thunderstorms/within",
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([
'latitude' => 39.869847,
'longitude' => 32.745468,
'radius' => 1000,
'backwardInterval' => 600,
'endTimeEpoch' => 1746454091000,
'pageNumber' => 0,
'pageSize' => 10,
'intersectsWith' => 'AFFECTED_POLYGON'
]),
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/thunderstorms/within"

payload := strings.NewReader("{\n \"latitude\": 39.869847,\n \"longitude\": 32.745468,\n \"radius\": 1000,\n \"backwardInterval\": 600,\n \"endTimeEpoch\": 1746454091000,\n \"pageNumber\": 0,\n \"pageSize\": 10,\n \"intersectsWith\": \"AFFECTED_POLYGON\"\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/thunderstorms/within")
.header("Content-Type", "application/json")
.body("{\n \"latitude\": 39.869847,\n \"longitude\": 32.745468,\n \"radius\": 1000,\n \"backwardInterval\": 600,\n \"endTimeEpoch\": 1746454091000,\n \"pageNumber\": 0,\n \"pageSize\": 10,\n \"intersectsWith\": \"AFFECTED_POLYGON\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.iklim.co/v1/thunderstorms/within")

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 \"latitude\": 39.869847,\n \"longitude\": 32.745468,\n \"radius\": 1000,\n \"backwardInterval\": 600,\n \"endTimeEpoch\": 1746454091000,\n \"pageNumber\": 0,\n \"pageSize\": 10,\n \"intersectsWith\": \"AFFECTED_POLYGON\"\n}"

response = http.request(request)
puts response.read_body
{
  "thunderstorms": [
    {
      "eventId": "EVT20240413001",
      "insertedAtEpoch": 1746454091000,
      "eventStartUtcEpoch": 1746453091000,
      "eventEndUtcEpoch": 1746454091000,
      "severity": "Low/Normal/High",
      "threshold": 7,
      "meta": {
        "country": "Türkiye",
        "state": "Ankara",
        "city": "Çankaya",
        "speedUnit": "mph",
        "speed": 35.4
      },
      "cell": {
        "area": 23.5,
        "speed": 44.8,
        "direction": 270,
        "flashRates": {
          "inCloud": 1.3,
          "cloudToGround": 0.8,
          "total": 2.1
        },
        "centroid": {
          "lng": 32.857358,
          "lat": 39.93504
        },
        "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
              }
            ]
          ]
        }
      },
      "threatPolygon": {
        "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
            }
          ]
        ]
      }
    }
  ],
  "totalRecords": 100,
  "pageNumber": 0,
  "pageSize": 10
}

Body

application/json
latitude
number<double>
required

Latitude of the center point.

Required range: -90 <= x <= 90
Example:

39.869847

longitude
number<double>
required

Longitude of the center point.

Required range: -180 <= x <= 180
Example:

32.745468

radius
number<double>
required

Search radius in meters.

Required range: 0 <= x <= 50000
Example:

1000

backwardInterval
integer<int64>
required

Query time range in seconds (backward from endTimeEpoch).

Required range: 60 <= x <= 2592000
Example:

600

endTimeEpoch
integer<int64>
required

End time for the query, in epoch milliseconds.

Required range: x >= 0
Example:

1746454091000

pageNumber
integer<int32>
required

Page number for pagination.

Required range: x >= 0
Example:

0

pageSize
integer<int32>
required

Page size for pagination.

Required range: x <= 100
Example:

10

intersectsWith
enum<string>

Which polygon to intersect with. Allowed values: AFFECTED_POLYGON, CELL_POLYGON.

Available options:
THREAT_POLYGON,
CELL_POLYGON
Example:

"AFFECTED_POLYGON"

Response

Thunderstorm list within radius successfully returned.

thunderstorms
object[]
required

Thunderstorm event list.

totalRecords
integer<int32>
required

Total number of records.

Example:

100

pageNumber
integer<int32>
required

Page number.

Example:

0

pageSize
integer<int32>
required

Page size.

Example:

10