Endpoint: lightning

The lightning endpoint provides access to global lightning strike data.  The lightning data includes information on the type of strike, location, polarity, and amperage. Options are available for both cloud to ground and intracloud (cloud to cloud) pulse types.  Data is available globally, with the exception of Australia.

The lightning endpoint is available via the Lighting API add-on to the Aeris Weather API. Contact us for free developer trial access.

https://api.aerisapi.com/lightning/

Data CoverageGlobal (Except Australia)

Included With API - Lightning Developer,  API - Lightning Basic,  API - Lightning Premium

The lightning endpoint has the following limitations:

  • The maximum radius value that may be utilized is 25 miles.
  • Lighting strike/pulse information is available for the last 5 minutes.
  • API Lightning Basic is limited to cloud to ground strikes only.
  • API Lightning Premium allows access to both cloud to ground and intracloud pulses.

Supported Actions

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 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.

Supported Parameters

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.
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 form the value specified.

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=7/10/2011
from=2011/07/10
from=+2hours
from=2017-02-27 5:00 PM
to to=:string Returns the results between now and the value specified. 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=7/10/2011
to=2011/07/10
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.
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


callback callback=:functionName Used with JSONP implementation.

Defines the callback function to use for the response. The response will be enclosed as C(response), where C is the callback function provided.
query query=:string Used to filter results based on certain fields in the data set. See Advanced Queries for more details.

Supported Filters

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 (Requires Lightning Premium)
all Both Cloud to ground and intracloud lightning (Requires Lightning Premium)

Supported Query Properties

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 (Requires Lightning Premium)
peakamp Query lightning based on the estimated peak amperage of the strike.
height Query based on lightning height. Useful for intracloud lightning
numsensors Query based on the number of sensors that detected the lightning

Sortable Fields

You can use the following fields to sort the data returned in your response:

dt Allows sorting the output by the date / time of the lightning (default)
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.
height Sort based on the lightning height
numsensors Sort based on the number of sensors that detected the lightning.

Examples

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. (Requires Lightning Premium)
/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. (Requires Lightning Premium)
/lightning/minneapolis,mn?filter=all&limit=100&radius=25miles&

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.

Default
GeoJSON

{
   "id":"59c27289a93c7071270a5b84",
   "loc":{
      "long":-94.23056,
      "lat":29.7563
   },
   "ob":{
      "timestamp":1505915518,
      "dateTimeISO":"2017-09-20T13:51:58+00:00",
      "age":130,
      "pulse":{
         "type":"cg",
         "peakamp":-20392,
         "numSensors":19,
         "icHeightM":0,
         "icHeightFT":0
      }
   },
   "recTimestamp":1505915529,
   "recISO":"2017-09-20T13:52:09+00:00",
   "age":130,
   "relativeTo":{
      "lat":29.76328,
      "long":-95.36327,
      "bearing":91,
      "bearingENG":"E",
      "distanceKM":109.343,
      "distanceMI":67.943
   }
}
								

{
   "type":"FeatureCollection",
   "features":[
      {
         "type":"Feature",
         "id":"59c27289a93c7071270a5b84",
         "geometry":{
            "type":"Point",
            "coordinates":[
               -94.23056,
               29.7563
            ]
         },
         "properties":{
            "id":"59c27289a93c7071270a5b84",
            "loc":{
               "long":-94.23056,
               "lat":29.7563
            },
            "ob":{
               "timestamp":1505915518,
               "dateTimeISO":"2017-09-20T13:51:58+00:00",
               "age":162,
               "pulse":{
                  "type":"cg",
                  "peakamp":-20392,
                  "numSensors":19,
                  "icHeightM":0,
                  "icHeightFT":0
               }
            },
            "recTimestamp":1505915529,
            "recISO":"2017-09-20T13:52:09+00:00",
            "age":162,
            "relativeTo":{
               "lat":29.76328,
               "long":-95.36327,
               "bearing":91,
               "bearingENG":"E",
               "distanceKM":109.343,
               "distanceMI":67.943
            }
         }
      }
   ]
}
								

Response Properties

The following properties will be provided in every response object:

id (string) The ID of the lightning strike.
ob (object) Object containing information about the lightning strike.
ob.timestamp (number) Unix timestamp of the lightning strike.
ob.dateTimeISO (string) ISO 8601 date of the lightning strike.
ob.pulse (object) Object containing the type and peak amp of the lightning strike.
ob.pulse.type (string) One of the three types of lightning strikes.
- IC: IntraCloud
- CG: Cloud to ground
ob.pulse.peakamp (number) The peak electric current in amperes.
ob.pulse.numsensors (number) The number of sensors that detected the lightning pulse
ob.pulse.icHeightFT (number) The height in feet of the intracloud lightning pulse
ob.pulse.icHeightM (number) The height in meters of the intracloud lightning pulse
recTimestamp (number) Unix timestamp of the time the lightning strike information was received
recISO (string) ISO 8601 date of the time the lightning strike information was received.
loc.long (number) The longitude coordinate of the record.
loc.lat (number) The latitude coordinate of the record.