Lightning
https://data.api.xweather.com/lightning/
The lightning API endpoint provides access to Vaisala Xweather’s global lightning data. The lightning data is available for the last 5 minutes and includes the type of strike/pulse, location, polarity, and amperage. Options are available for both cloud-to-ground and intracloud (cloud-to-cloud) pulse types.
The standard lightning API endpoint access has the following limitations:
-
The maximum radius value is 100km (~62 miles).
-
Lightning data is available for the past 5 minutes.
-
A single query can retrieve up to 1000 lightning strikes. Please note that using the
skip
parameter will pull the next 1000 strikes. -
The
within
andclosest
actions are unavailable with the standard lightning API endpoint access.
The Lightning Enterprise add-on expands the lightning endpoint capabilities to include the following features:
-
Can perform within queries, allowing queries by polygon and bounding box (rectangle) for client-defined areas.
-
Can perform
within
andclosest
queries for circles with a maximum radius of 500km (~311 miles). -
Request up to 24 hours of data per API query.
-
Access to archive lightning data from 2016 to the present day.
-
A single query can retrieve up to 50000 lightning strikes. Please note that using the
skip
parameter will pull the next 50000 strikes.
Contact us (opens in a new tab)if you are interested in the Lightning Enterprise Add-on.
Requests
Every request to the endpoint must include one of the supported actions in the url.
https://data.api.xweather.com/lightning/{action}?client_id={client_id}&client_secret={client_secret}&{params}
Supported Actions
The following actions are supported with the /lightning 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. |
within | Type: stringUses a circle or polygon, define an area to search for results. 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)
Object containing the lightning observation.
ob.timestamp (number)
Unix timestamp of the lightning pulse.
ob.dateTimeISO (string)
ISO 8601 date of the lightning pulse.
ob.age (number)
Seconds since the lightning pulse.
ob.pulse (object)
Object containing the lightning pulse information.
ob.pulse.type (string)
One of the two types of lightning pulses.
- IC: Intracloud
- CG: Cloud-to-ground (Strike)
ob.pulse.peakamp (number)
The peak amplitude of the lightning pulse. Polarity is determined by a negative or positive value.
ob.pulse.peakAmp (number)
DEPRECATED Use `ob.pulse.peakamp` instead.
ob.pulse.numSensors (number)
The number of sensors that detected the lightning pulse.
ob.pulse.icHeightM (number)
Deprecated
ob.pulse.icHeightFT (number)
Deprecated
recTimestamp (number)
The Unix timestamp of the time the lightning strike information was received.
recISO (string)
The ISO 8601 date of the time the lightning strike information was received.
age (number)
DEPRECATED Use `ob.age` instead.
[
{
"id": "657b5eb77f026f06ce601022",
"loc": {
"long": -54.5823,
"lat": -29.124
},
"ob": {
"timestamp": 1702583931,
"dateTimeISO": "2023-12-14T19:58:51+00:00",
"age": 60,
"pulse": {
"type": "ic",
"peakamp": 26000,
"numSensors": 8,
"icHeightM": 0,
"icHeightFT": 0
}
},
"recTimestamp": 1702583991,
"recISO": "2023-12-14T19:59:51+00:00",
"age": 60
}
]