{
  "openapi": "3.0.1",
  "info": {
    "title": "Severe Weather API - Xweather Lightning, Alerts, Storms, Fires",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "6WEVJ7HAuDEHIJnVq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~severe-weather-lightning-alerts-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-severe-weather-lightning-alerts-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~severe-weather-lightning-alerts-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-severe-weather-lightning-alerts-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~severe-weather-lightning-alerts-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-severe-weather-lightning-alerts-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "alerts",
              "lightning",
              "stormReports",
              "stormCells",
              "tropicalCyclones",
              "fires",
              "airQuality"
            ],
            "type": "string",
            "description": "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.",
            "default": "alerts"
          },
          "locations": {
            "title": "Places",
            "type": "array",
            "description": "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).",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "US states",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "radius": {
            "title": "Search radius",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "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": {
            "title": "Radius unit",
            "enum": [
              "miles",
              "km"
            ],
            "type": "string",
            "description": "Unit of the search radius.",
            "default": "miles"
          },
          "fromTime": {
            "title": "From time",
            "type": "string",
            "description": "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": {
            "title": "To time",
            "type": "string",
            "description": "Storm reports only. End of the time range, such as now or 2026-10-07. Leave empty for now."
          },
          "lightningType": {
            "title": "Lightning type",
            "enum": [
              "cg",
              "ic",
              "all"
            ],
            "type": "string",
            "description": "Lightning only.",
            "default": "cg"
          },
          "alertFilters": {
            "title": "Alert groups",
            "type": "array",
            "description": "Weather alerts only. Leave empty for the API default (warnings, watches and advisories). Several groups return alerts in any of them.",
            "items": {
              "type": "string",
              "enum": [
                "standard",
                "warning",
                "watch",
                "advisory",
                "outlook",
                "statement",
                "severe",
                "tornado",
                "flood",
                "tropical",
                "winter",
                "wind",
                "fire",
                "marine",
                "nonmarine",
                "nonprecip",
                "tsunami",
                "emergency",
                "hassmallpoly",
                "all"
              ],
              "enumTitles": [
                "Standard (warnings, watches, advisories)",
                "Warnings",
                "Watches",
                "Advisories",
                "Outlooks",
                "Statements",
                "Severe (thunderstorm, tornado)",
                "Tornado",
                "Flood and hydro",
                "Tropical (storm, hurricane, typhoon)",
                "Winter",
                "Wind",
                "Fire weather",
                "Marine",
                "Non-marine",
                "Non-precipitation (fog, heat, wind, dust)",
                "Tsunami",
                "Emergencies only",
                "Storm-based polygons only",
                "Everything (incl. statements, outlooks, forecasts)"
              ]
            }
          },
          "alertTypeCodes": {
            "title": "Alert type codes",
            "type": "array",
            "description": "Weather alerts only. VTEC alert type codes such as TO.W (tornado warning), SV.W (severe thunderstorm warning) or FF.W (flash flood warning).",
            "items": {
              "type": "string"
            }
          },
          "stormReportTypes": {
            "title": "Storm report types",
            "type": "array",
            "description": "Storm reports only. Leave empty for every type.",
            "items": {
              "type": "string",
              "enum": [
                "tornado",
                "hail",
                "wind",
                "flood",
                "rain",
                "snow",
                "ice",
                "blizzard",
                "lightning",
                "tropical",
                "marine",
                "tides",
                "fog",
                "dust",
                "avalanche"
              ],
              "enumTitles": [
                "Tornado and waterspout",
                "Hail",
                "Wind",
                "Flood",
                "Rain",
                "Snow",
                "Ice",
                "Blizzard",
                "Lightning",
                "Tropical storm and hurricane",
                "Marine",
                "Tides",
                "Fog",
                "Dust",
                "Avalanche"
              ]
            }
          },
          "stormCellTypes": {
            "title": "Storm cell types",
            "type": "array",
            "description": "Storm cells only. Leave empty for every cell.",
            "items": {
              "type": "string",
              "enum": [
                "hail",
                "rotating",
                "tornado",
                "threat",
                "rainmoderate",
                "rainheavy",
                "rainintense",
                "conus"
              ],
              "enumTitles": [
                "Likely hail",
                "Rotating",
                "Tornadic vortex signature",
                "Potentially threatening",
                "Moderate rain",
                "Heavy rain",
                "Intense rain",
                "Continental US only"
              ]
            }
          },
          "basin": {
            "title": "Tropical basin",
            "enum": [
              "atlantic",
              "eastpacific",
              "centralpacific",
              "westpacific",
              "pacific",
              "indian",
              "southern",
              "invests"
            ],
            "type": "string",
            "description": "Tropical cyclones only. Leave empty for every active system worldwide."
          },
          "perimeterOnly": {
            "title": "Only fires with a perimeter",
            "type": "boolean",
            "description": "Wildfires only. Return only fires that have mapped perimeter information.",
            "default": false
          },
          "aqiStandard": {
            "title": "Air quality index standard",
            "enum": [
              "airnow",
              "caqi",
              "eaqi",
              "uk",
              "germany",
              "china",
              "india",
              "cai"
            ],
            "type": "string",
            "description": "Air quality only. Which national index the AQI and categories use.",
            "default": "airnow"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "The most rows this run returns and charges for.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pacing. A per minute rate limit answer is waited out and retried.",
            "default": 60
          },
          "clientId": {
            "title": "Client ID",
            "type": "string",
            "description": "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": {
            "title": "Client secret",
            "type": "string",
            "description": "The client secret of the same Xweather app. Stored as a secret and never logged."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}