The lighting/summary endpoint expands on the lightning API endpoint and provides an overall summary of recent lightning strikes/pulses across the globe. Example use cases include obtaining the total number of recent lighting strikes or pulses around the world or within a geographic area, number of lightning strikes within a specified radius of a location and more. This endpoint can also provide polygons of areas with lightning activity included in the summary, great for plotting areas of concern on a map.
The lightning/summary API endpoint is available with the weather API subscriptions. This lightning data is available globally and to all clients except for our clients or their business operations in Australia, South Africa, and Taiwan. Please contact our accounts team for more information.
Use our wizard to try out this endpoint
The lightning API endpoint has the following limitations:
The following actions are supported with the lightning/summary 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 enpoint'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. |
search | The search action is used as a more general query method and expects the query to be defined with the custom query for the request. Unlike the closest action, results will not be returned in any particular order. |
within | The within action allows for returning data within a variety of different geometrical regions. Currently supported geometries include a circle (requires a center point and radius), rectangle (requires two coordinate points defining the top-left and bottom-right corners) and polygon (requires at least three coordinate points). Unlike the closest action, the results will not be returned in any particular order based on distance. |
The following parameters are optional unless otherwise noted:
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. |
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 form 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 |
p | p=:place |
Defines the location to query data for. Refer to the list of supported place value formats. |
query | query=:string |
Used to filter results based on certain fields in the data set. See Advanced Queries for more details. |
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. |
The following filters can be passed to the filter parameter to reduce the results that are returned:
cg | Filter based on cloud to ground strikes. This is the default if no filter or query provided. |
ic | Filter based on intracloud lightning pulses. Intracloud strikes are only available with a Premium subscription |
all | Filter based on all lightning pulses, cloud to ground and intracloud. Intracloud strikes are only available with a Premium subscription |
negative | Returns negative lightning strikes only. |
positive | Returns positive lightning strikes only. |
Use the following supported property keys when creating custom queries for your requests:
dt | The date/time of the lightning pulse |
type | The type of lightning pulse: cg = cloud to ground ic = intracloud |
peakamp | The estimated peak amperage of the lightning pulse. Note that the polarity of the pulse is defined by the sign peak amp value. Negative has a peak amp value less than zero. |
height | Query based on the height of the intracloud lightning pulse |
numsensors | Query 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 a summary of all lightning strikes worldwide/lightning/summary?
Return a summary of all cloud to ground lightning strikes within a 20 mile radius of Atlanta, GA/lightning/summary/atlanta,ga?radius=20miles&filter=cg&
Return a summary of all cloud to ground lightning strikes within a 20 miles radius of Atlanta, GA that occurred within the last 5 minutes./lightning/summary/atlanta,ga?radius=20miles&filter=cg&from=-5minutes&to=now&
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": [{
"summary": {
"range": {
"count": 76,
"fromTimestamp": 1528308484,
"fromDateTimeISO": "2018-06-06T18:08:04+00:00",
"toTimestamp": 1528308784,
"toDateTimeISO": "2018-06-06T18:13:04+00:00",
"maxTimestamp": 1528308765,
"maxDateTimeISO": "2018-06-06T18:12:45+00:00",
"minTimestamp": 1528308484,
"minDateTimeISO": "2018-06-06T18:08:04+00:00"
},
"pulse": {
"count": 76,
"cg": 76,
"ic": 0,
"negative": 76,
"positive": 0
},
"peakAmp": {
"count": 76,
"all": {
"min": 3905,
"max": 30174,
"avg": 8982
},
"positive": {
"min": null,
"max": null,
"avg": 0
},
"negative": {
"min": 3905,
"max": 30174,
"avg": 8982
}
},
"icHeight": {
"count": 76,
"min": 0,
"max": 0,
"avg": 0
},
"numSensors": {
"count": 76,
"min": 5,
"max": 19,
"avg": 11
}
}
}]
}
The following properties will be provided in every response object:
Last modified: June 18, 2019