Our subscriptions have changed. To add lightning to your active subscription, select our Lightning Add-On.. Legacy plans will continue to have access to the select lightning endpoints and layers included in their original plans, but will not have access to historical lightning data, expanded radii, or the lightning threats features included with the Lightning Add-On.
The lightning API endpoint provides access to Vaisala Xweather’s global lightning data. The lightning data 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. Please contact our Accounts Team for more information.
Use our wizard to try out this endpoint
The lightning API endpoint has the following limitations:
skip
parameter will pull the next 1000 strikes.The following actions are supported with the lightning endpoint:
:id | Requesting data by using the :id action is used for returning data for a particular item that has an ID associated with it. This is the primary method for requesting general weather information for a single location (observations, forecasts, advisories, etc.) as the location's name or a zip code serves as the id. Other endpoints may expect a certain value for the ID, such as storm cells whose ID value is a combination of the radar site identifier and unique identifier assigned to every storm cell. Refer to an endpoint's detailed documentation for specific information regarding how to use the :id action. |
closest | The closest action will query the API for data that is closest to the requested place and return the results, if any, in order from closest to farthest. If no limit is provided in the request, then only the closest single result will be returned. If your request does not return results, you may try setting or increasing the radius being used. |
route | The route action returns data for points along a given route. This can be useful to obtain weather information along a transportation route, trails and more. The route is a series of locations, usually latitude/longitudes provided via the p query parameter or for longer routes via GeoJSON within a POST request. The route will return an array of GeoJSON points with the requested data for each point. |
The following parameters are optional unless otherwise noted:
p | p=:place |
Defines the location to query data for. Refer to the list of supported place value formats. |
limit | limit=:total |
The total number of results to return as an integer. Each endpoint may have a set maximum for this value depending on usage. The default limit is 1 if not specified. The maximum limit for this endpoint is 1000. |
skip | skip=:number |
Used to skip over a specific number of results in the data set. |
sort | sort=:string |
Used to sort results based on certain fields in the data set. See Sorting for more details. |
filter | filter=:string |
Predefined filters for limiting the results. The filter value can be a single, comma-delimited or a semicolon delimited string of filter names. |
from | from=:string |
Returns the results starting from the value specified. For best practices we recommend using the to parameter as well to define a specific time frame.Supports a UNIX timestamp or a specific date string. Alternatively, common date formats supported by the PHP strtotime() function will be accepted; however, commas are not accepted. Examples: from=tomorrow from=friday from=1302883980 from=MM/DD/YYYY from=YYYY/MM/DD from=+2hours from=2017-02-27 5:00 PM The maximum from offset for this endpoint is -5minutes. |
to | to=:string |
Returns the results between now and the value specified. For best practices we recommend using the from parameter as well to define a specific time frame. When used in conjunction with the from parameter, the value of to will be relative to the value of from, not relative to the current time. Supports a UNIX timestamp or a specific date string. Alternatively, common date formats supported by the PHP strtotime() function will be accepted; however, commas are not accepted. Examples: to=+6hours to=+5days to=1302883980 to=MM/DD/YYYY to=YYYY/MM/DD to=2017-02-27 5:00 PM |
fields | fields=:string |
Provides a comma separated list of values for the API to return. This parameter is often used to limit the amount of data returned. See Reducing Output. |
radius | radius=:distance:unit |
When requesting the closest results within a circle, the radius determines how far from the specified location to search. A valid unit value must be included in your radius value, e.g., "5mi", "10km", "25miles". If no unit is provided, your value is assumed to be in meters by default. Most endpoints utilize a default radius of 50 miles, though some endpoints, such as lightning, may have tighter restrictions specified. |
minradius | minradius=:distance:unit |
When requesting the closest results within a circle, the minradius determines how far from the specified location to search to begin searching results. A valid unit value must be included in your minimum radius value, e.g., "5mi", "10km", or "25miles". If no unit is provided, your value is assumed to be in meters by default. When combined with the radius parameter, donut style queries can be made for point data, such as lightning. |
format | format=:string |
Defines the API output format. The available options include:format=json - Standard JSON output. This is the default.format=geojson - API will output GeoJSON.If obtaining GeoJSON and using the fields parameter, be sure to include loc to ensure geographical references are available in the response.
|
query | query=:string |
Used to filter results based on certain fields in the data set. See Advanced Queries for more details. |
The following filters can be passed to the filter parameter to reduce the results that are returned:
cg | Limit to cloud-to-ground strikes (default) |
ic | Intracloud/cloud-to-cloud lightning |
all | Both cloud-to-ground and intracloud lightning |
negative | Returns negative lightning strikes only. Polarity is determined by a negative or positive value in ob.pulse.peakamp |
positive | Returns positive lightning strikes only. Polarity is determined by a negative or positive value in ob.pulse.peakamp |
Use the following supported property keys when creating custom queries for your requests:
type | Query by type of lightning pulse: cg = cloud-to-ground strikes ic = intracloud/cloud-to-cloud |
peakamp | Query lightning based on the estimated peak amperage of the strike. |
numsensors | Query based on the number of sensors that detected the lightning |
Default Sort: distance from closest to farthest
You can use the following fields to sort data. Review the sorting docs page for more information on the sort functionality.
dt | Allows sorting the output by the date/time of the lightning. |
type | Allows sorting the output based on the type of lightning pulse. |
peakamp | Allows sorting the output based on the estimated peak amperage of the strike. |
numsensors | Sort based on the number of sensors that detected the lightning. |
The /[:endpoint]/[:action]?
portion within the query template below can be exchanged with any of the examples. Also, please note you will need to input your client credentials in the [ID]
and [SECRET]
fields which can be found under the Apps section of the members area.
https://api.aerisapi.com/[:endpoint]/[:action]?client_id=[ID]&client_secret=[SECRET]
Return up to 100 recent cloud-to-ground lightning strikes within 25 miles of Minneapolis./lightning/minneapolis,mn?radius=25miles&limit=100&
Return up to 100 recent cloud-to-ground lightning strikes within 25 miles of Minneapolis, sorting the results so newer strikes are first./lightning/minneapolis,mn?radius=25miles&limit=100&sort=dt:-1&
Return up to 100 cloud-to-ground lightning strikes within 25 miles of Minneapolis that have occurred within the last 5 minutes./lightning/minneapolis,mn?radius=25miles&limit=100&from=-5minutes&
Return up to 100 intracloud (cloud-to-cloud) lighting pulses within 25 miles of Minneapolis./lightning/minneapolis,mn?filter=ic&limit=100&radius=25miles&
Return up to 100 lightning pulses (cloud-to-ground and intracloud) within 25 miles of Minneapolis./lightning/minneapolis,mn?filter=all&limit=100&radius=25miles&
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.
{
"success": true,
"error": null,
"response": [{
"id": "5b1822d21788b069374ac73d",
"loc": {
"long": 78.27729,
"lat": 18.63607
},
"ob": {
"timestamp": 1528308421,
"dateTimeISO": "2018-06-06T18:07:01+00:00",
"age": 263,
"pulse": {
"type": "cg",
"peakamp": -41306,
"numSensors": 10,
"icHeightM": 0,
"icHeightFT": 0
}
},
"recTimestamp": 1528308434,
"recISO": "2018-06-06T18:07:14+00:00",
"age": 263,
"relativeTo": {
"lat": 18.75,
"long": 78.25,
"bearing": 167,
"bearingENG": "SSE",
"distanceKM": 12.99,
"distanceMI": 8.072
}
}]
}
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"id": "5b1822d21788b069374ac73d",
"geometry": {
"type": "Point",
"coordinates": [78.27729, 18.63607]
},
"properties": {
"id": "5b1822d21788b069374ac73d",
"loc": {
"long": 78.27729,
"lat": 18.63607
},
"ob": {
"timestamp": 1528308421,
"dateTimeISO": "2018-06-06T18:07:01+00:00",
"age": 284,
"pulse": {
"type": "cg",
"peakamp": -41306,
"numSensors": 10,
"icHeightM": 0,
"icHeightFT": 0
}
},
"recTimestamp": 1528308434,
"recISO": "2018-06-06T18:07:14+00:00",
"age": 284,
"relativeTo": {
"lat": 18.75,
"long": 78.25,
"bearing": 167,
"bearingENG": "SSE",
"distanceKM": 12.99,
"distanceMI": 8.072
}
}
}]
}
The following properties will be provided in every response object:
Last modified: November 18, 2022