Lightning Flash
https://data.api.xweather.com/lightning/flash/
The lightning/flash API endpoint provides access to Vaisala Xweather’s global lightning flash data. Lightning/flash data provides global consolidated access to individual cloud-to-ground strikes and cloud-to-cloud pulses. Multiple lightning strikes within a 10km area and cloud-to-cloud pulses within a 20km area, within split seconds of each other, may be combined as an individual lightning flash. This consolidated data set is helpful for many lightning-related applications without requiring individual strike information. If you require information on individual cloud-to-ground and cloud-to-cloud strikes, the Lightning endpoint (opens in a new tab) is recommended.
The lightning/flash API endpoint is available with all API subscriptions and implements the following limitations:
-
The maximum radius value that may be utilized is 40km (~25 miles)
-
Lightning flash data is available for the past 5 minutes.
-
Up to 1000 lightning flashes can be retrieved in a single query. Please note using the skip parameter will pull the next 1000 flashes.
Requests
Every request to the endpoint must include one of the supported actions in the url.
https://data.api.xweather.com/lightning/flash/{action}?client_id={client_id}&client_secret={client_secret}&{params}
Supported Actions
The following actions are supported with the /lightning/flash endpoint:
Action | Description |
---|---|
:id | Type: stringTypically used for passing a geographical location name or identifier such as city name, lat/long, or even US and Canadian postal codes. Learn more. |
closest | Type: stringBased on a location search, the results will be returned in order from closest to farthest. Learn more. |
route | Type: stringAllows you to pass several coordinates along a custom route to return data points at each location. Learn more. |
Response
The following is an example of what each object in the response will consist of. Depending on your requested action, the response may contain multiple instances of this object within an array.
Properties
id (string)
The unique identifier for the lightning record.
loc (object)
The location of the record.
loc.long (number)
The place or nearest place to the record.
loc.lat (number)
The latitude coordinate of the record.
ob (object)
The lightning flash observation.
ob.timestamp (number)
Unix timestamp of the lightning flash.
ob.dateTimeISO (string)
The date and time of the lightning flash in ISO 8601 format.
ob.age (number)
The age of the lightning flash in seconds.
recTimesatmp (number)
Unix timestamp when the lightning flash was received.
recDateTimeISO (string)
The date and time when the lightning flash was received in ISO 8601 format
[
{
"id": "657b5fbf4dee10e9fa4f8865",
"loc": {
"long": 97.7199,
"lat": 1.2666
},
"ob": {
"timestamp": 1702584194,
"dateTimeISO": "2023-12-14T20:03:14+00:00",
"age": 61
},
"recTimesatmp": 1702584260,
"recDateTimeISO": "2023-12-14T20:04:20+00:00"
}
]