# Severe Weather API - Xweather Lightning, Alerts, Storms, Fires (`nabeelbaghoor/severe-weather-lightning-alerts-api`) Actor

Severe weather data from the Xweather Weather API: real-time lightning strikes, NWS and global weather alerts, tornado and hail storm reports, radar storm cells, hurricanes and tropical cyclones, active wildfires and air quality index by place or US state. Bring your own key.

- **URL**: https://apify.com/nabeelbaghoor/severe-weather-lightning-alerts-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Developer tools, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 lightning strike returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Severe Weather API - Xweather Lightning, Alerts, Storms, Fires

Pull real-time lightning strikes, official weather alerts, tornado and hail storm reports, radar storm cells, hurricanes, wildfires and air quality from the Xweather Weather API with your own credentials, as clean dataset rows.

Works with the official Xweather Weather API (formerly AerisWeather, by Vaisala) on data.api.xweather.com. The actor turns places, US states or ocean basins into deduplicated rows you can download as JSON, CSV or Excel, schedule every few minutes, or feed into storm alerting, field operations, insurance and claims triage, outdoor event safety, logistics, Google Sheets and AI agents. Bring your own API key.

BYOK, not live-tested: every endpoint, action, parameter and filter comes from Xweather's public Weather API documentation, and the host and authentication scheme were confirmed against data.api.xweather.com, but the actor has not been run against a live Xweather account.

### What it does

- **Weather alerts**: active warnings, watches and advisories for any place from the US National Weather Service, Environment Canada, MeteoAlarm (Europe), the UK Met Office, the Japan Meteorological Agency, the Australian Bureau of Meteorology and more, with type code, priority, begin and expiry times, full text, affected counties, zones and zip codes. Filter by group (severe, tornado, flood, winter, tropical, fire...) or VTEC code (TO.W, SV.W, FF.W).
- **Lightning strikes**: recent cloud-to-ground strikes or intracloud pulses around a place, from the Vaisala global lightning network, with time, coordinates, peak amperage and polarity, sensor count, and distance and bearing from your place.
- **Storm reports**: local storm reports for tornadoes, hail, wind damage, floods, snow, ice and more, around a place or across a US state, with magnitude (hail size, wind speed, rain or snow amount), reporter and comments.
- **Radar storm cells**: live storm cells with hail probability and maximum hail size, rotation (MDA), tornadic vortex signature, movement and forecast track.
- **Tropical cyclones**: every active hurricane, typhoon, tropical storm and invest worldwide, or per basin, with position, category, sustained wind, pressure, movement, historical track and forecast track.
- **Active wildfires**: fires around a place or in a US state, with area, containment, cause and perimeter when available.
- **Air quality**: current AQI, category, dominant pollutant and per-pollutant readings for any place, on the US AirNow scale or the European, UK, German, Chinese, Indian or Korean index.
- **Pay only for results**: refused and empty lookups are recorded as a free row that says why, never charged. Overlapping search areas are deduplicated by record id.

### How to get an API key

Sign up on xweather.com (a free developer plan with a monthly access allowance is offered, then paid Weather API plans), open your account, register an app, and copy its **client ID** and **client secret**. Paste them into the Client ID and Client secret fields, or put `client_id:client_secret` in the Client ID field alone, or set the `DATA_API_KEY` environment secret to `client_id:client_secret`. Both values are stored as secrets, sent only to data.api.xweather.com as the documented `client_id` and `client_secret` parameters, and never logged.

Xweather ties each app to a namespace (a domain or bundle id). If the API answers `unauthorized_namespace`, register an app meant for server side requests and use its credentials. Lightning beyond the last 5 minutes or 100 km needs the Lightning Enterprise add-on, and some endpoints are only on higher plans; a refusal ends the run cleanly with Xweather's own words.

### Input

| Field | Modes | Description |
| --- | --- | --- |
| `mode` | all | `alerts`, `lightning`, `stormReports`, `stormCells`, `tropicalCyclones`, `fires` or `airQuality` |
| `locations` | all but tropical cyclones | minneapolis,mn, paris,fr, 55403, MSP, MNZ029 or 32.97,-87.28 |
| `states` | storm reports, storm cells, wildfires | Two letter US state codes |
| `radius`, `radiusUnit` | lightning, storm reports, storm cells, wildfires | Search radius in miles or km (max 500 km) |
| `fromTime`, `toTime` | lightning (from), storm reports | -5minutes, -24hours, -7days, now, or a date such as 2026-10-01 |
| `lightningType` | lightning | cg (default), ic or all |
| `alertFilters`, `alertTypeCodes` | alerts | Alert groups, VTEC codes such as TO.W |
| `stormReportTypes` | storm reports | tornado, hail, wind, flood, snow... |
| `stormCellTypes` | storm cells | hail, rotating, tornado, threat... |
| `basin` | tropical cyclones | atlantic, eastpacific, westpacific, indian, southern, invests... |
| `perimeterOnly` | wildfires | Only fires with a mapped perimeter |
| `aqiStandard` | air quality | airnow (default), eaqi, caqi, uk, germany, china, india, cai |
| `maxResults` | all | Row ceiling for the run (default 100) |
| `requestsPerMinute` | all | Pacing, default 60 |
| `clientId`, `clientSecret` | all | Your Xweather app credentials |

Example: tornado and severe thunderstorm warnings for two places.

```json
{
    "mode": "alerts",
    "locations": ["minneapolis,mn", "oklahoma city,ok"],
    "alertFilters": ["severe"]
}
```

### Example output

An illustrative lightning row, shaped like Xweather's documented /lightning response (values are an example, not real data). Every field Xweather returns is kept.

```json
{
    "mode": "lightning",
    "recordType": "lightning",
    "identifier": "32.97,-87.28",
    "found": true,
    "recordId": "6835db25f31314afcf8bb8c5",
    "eventTime": "2026-10-15T15:32:14+00:00",
    "eventType": "cg",
    "headline": "Cloud-to-ground lightning, -7000 A",
    "magnitude": -7000,
    "magnitudeUnit": "peak amperes",
    "latitude": 32.9001,
    "longitude": -87.3311,
    "distanceKm": 9.119,
    "loc": { "long": -87.3311, "lat": 32.9001 },
    "ob": {
        "timestamp": 1792078334,
        "dateTimeISO": "2026-10-15T15:32:14+00:00",
        "age": 113,
        "pulse": { "type": "cg", "peakamp": -7000, "numSensors": 5, "chiSquare": 11.82 }
    },
    "relativeTo": { "lat": 32.97, "long": -87.28, "bearing": 212, "bearingENG": "SSW", "distanceKM": 9.119, "distanceMI": 5.666 },
    "retrievedAt": "2026-10-15T15:34:07.000Z",
    "note": null
}
```

Alert rows carry `details` (type, name, priority, body text), `timestamps` and `includes` (counties, zones, zip codes); storm report rows carry `report`; storm cell rows carry `ob`, `forecast` and `traits`; cyclone rows carry `profile`, `position`, `track` and `forecast`; fire rows carry `report` and `perimeter`; air quality rows carry `periods` with `pollutants`.

### FAQ

#### What is the Xweather Weather API?

Xweather is the weather data business of Vaisala, formerly AerisWeather. Its Weather API on data.api.xweather.com serves conditions, forecasts, lightning from the Vaisala global lightning network, official alerts, storm reports, radar storm cells, tropical cyclones, wildfires, air quality and more, authenticated with a client ID and client secret.

#### Do I need my own Xweather account?

Yes. This is a bring-your-own-key actor: it calls Xweather with your credentials, under your Xweather plan and terms. Missing, rejected or exhausted credentials end the run cleanly with a status message that explains what to change, and nothing is charged.

#### How do I get lightning strikes near a location?

Use Lightning strikes near a place with a place such as 32.97,-87.28 and a radius of up to 100 km. Standard access returns strikes from the last 5 minutes, up to 1000 per request, paged with skip; Xweather's Lightning Enterprise add-on extends this to 24 hours per query, archive data back to 2016 and a 500 km radius.

#### Which weather alerts are covered?

The alerts endpoint returns active alerts from the US NWS, Environment Canada, MeteoAlarm, the UK Met Office, the Japan Meteorological Agency, the Australian Bureau of Meteorology and other national services covering India, Brazil, South Africa, South Korea and Mexico. Each row includes the VTEC or Xweather type code, priority, color, issue, begin and expiry times and the full alert text.

#### Can I monitor tornadoes and hail?

Yes. Storm cells with the tornado or hail filter return live radar cells with a tornadic vortex signature or a high hail probability; Storm reports with the tornado or hail type return confirmed local storm reports; alerts with the tornado group return tornado watches and warnings.

#### How do I track hurricanes?

Use Tropical cyclones. With no basin it lists every active hurricane, typhoon and tropical storm worldwide, each with current position, category, wind, pressure, past track and forecast track. Pick invests for areas under investigation.

#### What do I pay?

Pay per result: 0.005 USD per lightning strike, and 0.01 USD per alert, storm report, storm cell, tropical cyclone, wildfire or air quality reading. Refused and empty lookups are never charged. Your Xweather plan is billed separately by Xweather and counts accesses by its own token multipliers (for example lightning costs more per request on standard access); the run log reports the X-Cost-Tokens total.

#### What happens if my credentials are wrong or my limit runs out?

An invalid_client answer (HTTP 401), an unauthorized_namespace or insufficient_scope refusal, or a maxhits or maxhits_daily answer (access limit used up) ends the run cleanly with Xweather's own words. The per minute limit (maxhits_min, HTTP 429) is waited out and retried. A place Xweather cannot find becomes a free row with the API's message, and the run moves on.

### Pricing

| Event | Price | Charged for |
| --- | --- | --- |
| `lightning-record` | 0.005 USD | Each lightning pulse |
| `weather-event-record` | 0.01 USD | Each alert, storm report, storm cell, tropical cyclone, wildfire or air quality reading |

### Keyword map

severe weather API, lightning API, lightning strike data, lightning detection, weather alerts API, NWS alerts, tornado warnings, severe thunderstorm warnings, storm reports, hail data, hail size, radar storm cells, tornado tracking, hurricane tracker API, tropical cyclone data, wildfire API, active fires, air quality API, AQI by location, Xweather API, AerisWeather API, Vaisala weather data.

### Terms and data use

Use of Xweather is governed by the Vaisala Group General Conditions of Subscription Services (linked from xweather.com/legal) and any service description for your plan. They grant a limited, non-transferable licence to use the data for your own internal business purposes during your subscription, and forbid selling, sublicensing, distributing, publishing or otherwise making the data available to third parties unless your service description allows it; where sharing is allowed, Vaisala attribution is required. Free and trial plans are for internal use only, with commercial use prohibited. On expiry or termination you must stop using and delete the data. Run this actor with your own credentials, keep the results for your own internal use, and contact Xweather before republishing or reselling the data. This actor is not affiliated with or endorsed by Vaisala or Xweather.

# Actor input Schema

## `mode` (type: `string`):

Weather alerts reads the active warnings, watches and advisories for each place (US NWS, Environment Canada, MeteoAlarm, UK Met Office, JMA, Australian BoM and more). Lightning reads recent strikes around each place. Storm reports, Storm cells and Wildfires search around each place or across a US state. Tropical cyclones lists every active system. Air quality reads the current AQI and pollutants for each place.

## `locations` (type: `array`):

Every mode except Tropical cyclones. One place per line: city and state (minneapolis,mn), city and country (paris,fr), a US or Canadian postal code (55403), an airport code (MSP, KMSP), a NOAA zone (MNZ029) or latitude,longitude (32.97,-87.28).

## `states` (type: `array`):

Storm reports, Storm cells and Wildfires only. Two letter US state codes such as tx or ok; returns every record in the state instead of (or as well as) around a place.

## `radius` (type: `integer`):

Lightning, Storm reports, Storm cells and Wildfires around a place. Leave empty for the API default. Standard lightning access allows up to 100 km (62 miles); the Lightning Enterprise add-on up to 500 km.

## `radiusUnit` (type: `string`):

Unit of the search radius.

## `fromTime` (type: `string`):

Lightning and Storm reports. A relative time such as -5minutes, -24hours or -7days, or a date such as 2026-10-01. Standard lightning access covers the last 5 minutes; storm reports default to the last 24 hours.

## `toTime` (type: `string`):

Storm reports only. End of the time range, such as now or 2026-10-07. Leave empty for now.

## `lightningType` (type: `string`):

Lightning only.

## `alertFilters` (type: `array`):

Weather alerts only. Leave empty for the API default (warnings, watches and advisories). Several groups return alerts in any of them.

## `alertTypeCodes` (type: `array`):

Weather alerts only. VTEC alert type codes such as TO.W (tornado warning), SV.W (severe thunderstorm warning) or FF.W (flash flood warning).

## `stormReportTypes` (type: `array`):

Storm reports only. Leave empty for every type.

## `stormCellTypes` (type: `array`):

Storm cells only. Leave empty for every cell.

## `basin` (type: `string`):

Tropical cyclones only. Leave empty for every active system worldwide.

## `perimeterOnly` (type: `boolean`):

Wildfires only. Return only fires that have mapped perimeter information.

## `aqiStandard` (type: `string`):

Air quality only. Which national index the AQI and categories use.

## `maxResults` (type: `integer`):

The most rows this run returns and charges for.

## `requestsPerMinute` (type: `integer`):

Pacing. A per minute rate limit answer is waited out and retried.

## `clientId` (type: `string`):

The client ID of an app in your own Xweather account (or client_id:client_secret in this one field). Stored as a secret and sent only to data.api.xweather.com; it is never logged. You can instead set the DATA_API_KEY environment secret to client_id:client_secret.

## `clientSecret` (type: `string`):

The client secret of the same Xweather app. Stored as a secret and never logged.

## Actor input object example

```json
{
  "mode": "alerts",
  "locations": [
    "minneapolis,mn"
  ],
  "radiusUnit": "miles",
  "lightningType": "cg",
  "perimeterOnly": false,
  "aqiStandard": "airnow",
  "maxResults": 100,
  "requestsPerMinute": 60
}
```

# Actor output Schema

## `records` (type: `string`):

One row per lightning pulse, alert, storm report, storm cell, cyclone, fire or air quality reading.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "locations": [
        "minneapolis,mn"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/severe-weather-lightning-alerts-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "locations": ["minneapolis,mn"] }

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/severe-weather-lightning-alerts-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "locations": [
    "minneapolis,mn"
  ]
}' |
apify call nabeelbaghoor/severe-weather-lightning-alerts-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nabeelbaghoor/severe-weather-lightning-alerts-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/koqp4pBFKFdcFcgr3/builds/6WEVJ7HAuDEHIJnVq/openapi.json
