OpenWeather Lightning API
OpenWeather Lightning API
The OpenWeather Lightning API provides observed lightning events detected by a global sensor network.
The data is derived from the ERA5 reanalysis model, offering global coverage and a historical archive starting from 2023-06-26.
Each record represents an individual lightning discharge with geographic coordinates, timestamp, and an estimated positional uncertainty.
Every request requires an API key.
Historical Lightning Data
HTTP
https://demo.openweathermap.org/lightning/1.0/data?lat={LATITUDE}&lon={LONGITUDE}&radius={RADIUS}&start_date={START_DATE}&end_date={END_DATE}
&apikey={YOUR_API_KEY}All parameters are required.
Name | Type | Description |
lat | number | Latitude in decimal degrees (−90…90). Global coverage (±90). |
lon | number | Longitude in decimal degrees (−180…180). Global coverage (±180). |
radius | number | Search radius in kilometres (0–50, decimal values allowed). |
start_date | string (ISO-8601 UTC or with timezone offset) | Start of the requested time window. |
end_date | string (ISO-8601 UTC or with timezone offset) | End of the requested time window (maximum 7 days 23:59:59 after start_date). |
apikey | string | OpenWeather API key. |
Date & Time Rules
start_date must be less than or equal to end_dateSupported formats:
Z), e.g. 2023-09-08T21:00:00Z2023-09-08T21:00:00+02:00Important:
Z and +02:00)https://demo.openweathermap.org/lightning/1.0/data?lat=34.360371&lon=22.617449&radius=20&start_date=2023-09-08T21:00:00Z&end_date=2023-09-08T21:10:00Z&apik
ey={YOUR_API_KEY}{
"lat": 34.360371,
"lon": 22.617449,
"radius": 20.0,
"start_date": "2023-09-08T21:00:00Z",
"end_date": "2023-09-08T21:10:00Z",
"lightnings": [
{
"id": "9db73abd-a064-4cd5-8086-ba1053e49e6b",
"datetime": "2023-09-08T21:03:54+00:00",
"lat": 34.362811,
"lon": 22.614233,
"quality": "good",
"error": 4.5
},
{
"id": "91b5581a-4005-44a9-9d01-0c6daf2567f9",
"datetime": "2023-09-08T21:07:21+00:00",
"lat": 34.359114,
"lon": 22.619822,
"quality": "medium",
"error": 12.5
}
]
}Field | Type | Description |
id | string (UUID) | Unique record identifier. |
datetime | string (UTC, ISO-8601) | Detection time of lightning strike (always returned in UTC). |
lat, lon | number | Location of detected discharge. |
quality | string | Quality level of detection (good, medium, bad, undefined). |
error | number (km) | Estimated horizontal location uncertainty. |
HTTP | Meaning | Example Payload |
400 | Validation error (missing/invalid parameters) | {"code":"400","message": "Invalid parameter format","parameters":["lat"]} |
401 | Unauthorized (invalid API key) | {"code":"401","message": Unauthorized"} |
403 | Forbidden | {"code":"403","message":"Forbidden"} |
404 | Not found | {"code":"404","message":"Not Found"} |
429 | Rate limited | {"code":"429","message":"Too many requests"} |
500 | Internal server error | {"code":"500","message":"Internal server error"} |