Use Cases







Unique features of Xweather's lightning API and mapping offerings

11.17.2022//Developer, Product, API & Mapping, Tutorials

Blog post banner

Data from Vaisala's National Lightning Detection Network (NDLN) and the Vaisala Global Detection Network (GLD360) is available through the Xweather API. Learn more about our favorite lightning API and mapping features.

Lee Huffman

Chief Technology Officer, AerisWeather

Vaisala has been detecting lightning within the US for over 40 years and globally for over a decade. Their network provides best-in-class lightning data, detecting over 2 billion lightning strikes a year around the world. We're happy to offer access to this lightning data through our API and mapping offerings. Read on for some of the many ways you can manipulate and visualize this data.

Maximum radius parameter

Lightning data for a singular location is available for a maximum radius of 100km (62 miles). While the default radius is 40km, you can utilize the radius parameter to set a higher value. For example:

  • /lightning/Miami,FL?radius=100km&limit=1000

Minimum radius parameter

Leverage a minimum radius parameter — minradius — in combination with the radiusparameter to fetch lightning data within a range, such as 50 to 100km from a given point:

  • /lightning/Miami,FL?radius=100km&minradius=50km&limit=1000

Time range per request

The Xweather API time range allows you to fetch up to 24 hours of lightning data per API request using the from and to parameters. The API will default to the last 5 minutes if no from and to parameters are provided.

The following will return lightning within 25 miles of Miami, FL over the past 5 minutes:

  • /lightning/Miami,FL

Lightning within 25 miles of Miami, FL over the past two hours:

  • /lightning/Miami,FL?from=-2hours&to=now&limit=1000

Past 24 hours of lightning within 100km of Miami, FL:

  • /lightning/Miami,FL?from=-24hours&to=now&limit=1000&radius=100km

If a from parameter is provided, but a to parameter is not, then the API will return lightning data within a 5-minute range starting at the requested from parameter. 

Maximum limit parameter value

The maximum number of lightning strikes/strokes available in a single lightning API request is 1000 — a threshhold helpful when requesting lightning over a more extended time range.  

Note that if the number of strikes returned matches the passed limit value, you could use the skip parameter to paginate through the lightning results.

To fetch up to 1000 lightning strikes within 100km of Miami, FL over the past 24 hours:

  • /lightning/Miami,FL?from=-24hours&to=now&limit=1000&radius=100km

Historical lightning archive

The Xweather API supports a lightning archive available from 2016 through present-day. Access to the lightning archive is perfect for verifying lightning strikes over time. The archive access allows fetching up to 24 hours of lightning data at a time.

Obtain the lightning strikes within 50km of Miami, FL on May 9, 2021:

  • /lightning/Miami,FL?from=2021-05-09&to=+24hours&limit=1000&radius=100km

Note that lightning archive requests may have a lower per-minute rate limit than lightning requests within the past few days.

Global lightning mapping

Create stunning lightning maps for anywhere on earth: Xweather Flex subscriptions provide multiplier-based access to our standard lightning strike mapping layers with Xweather Raster Maps. You can take this mapping capanbilities a step further with a subscription to our WebGL-based MapsGL

Mapping layers for lightning include options to display lightning within the last 5 or 15 minutes as circles or icons within the raster API. Within MapsGL, custom strike shaders are available for even further clarity in your visuals:

Get lightning-aware today

Test out all of our lightning API and mapping features with a free 30-day trial, which allows lightning queries for up to 20 locations. To access more than 20 locations in your trial or for assistance integrate lightning into a mobile application, contact our Accounts Team.

Lee Huffman

Chief Technology Officer, AerisWeather



Querying weather conditions along the path of totality for the solar eclipse on April 8th