Xweather Lightning API

Lightning strike data and nowcasts

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/xweather-lightning-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

xweather-lightning-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Xweather Weather Air Quality Lightning API
  description: The Xweather Weather API provides real-time and historical weather data including current conditions, forecasts, severe weather alerts, lightning data, air quality, maritime weather, and more. Backed by Vaisala, Xweather delivers science-backed hyper-local weather intelligence through a RESTful interface. Authentication uses a client ID and client secret passed as query parameters or HTTP headers.
  version: 1.0.0
  contact:
    name: Xweather Support
    url: https://www.xweather.com/support
  termsOfService: https://www.xweather.com/legal/terms
servers:
- url: https://data.api.xweather.com
  description: Xweather Weather API base URL
security:
- clientAuth: []
tags:
- name: Lightning
  description: Lightning strike data and nowcasts
paths:
  /lightning/{location}:
    get:
      operationId: getLightning
      summary: Get Lightning Strike Data
      description: Returns global lightning strike data including type, location, polarity, and amperage for the last 5 minutes.
      tags:
      - Lightning
      parameters:
      - name: location
        in: path
        required: true
        schema:
          type: string
        description: Location identifier or radius query (e.g., "40.7128,-74.0060" or "closest:20:40.7128,-74.0060").
        example: 40.7128,-74.0060
      - name: client_id
        in: query
        required: true
        schema:
          type: string
        description: Your Xweather API client ID.
      - name: client_secret
        in: query
        required: true
        schema:
          type: string
        description: Your Xweather API client secret.
      - name: radius
        in: query
        required: false
        schema:
          type: string
        description: Radius for nearby strikes (e.g., "25mi" or "40km").
      - name: limit
        in: query
        required: false
        schema:
          type: integer
        description: Maximum number of lightning strikes to return.
      - name: fields
        in: query
        required: false
        schema:
          type: string
        description: Comma-separated list of fields to return.
      responses:
        '200':
          description: Lightning strike data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LightningResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /lightning/threats/{location}:
    get:
      operationId: getLightningThreats
      summary: Get Lightning Threat Nowcast
      description: Returns lightning nowcasts providing potential thunderstorm activity for the next 60 minutes in 10-minute intervals.
      tags:
      - Lightning
      parameters:
      - name: location
        in: path
        required: true
        schema:
          type: string
        description: Location identifier (lat/long or place name).
        example: dallas,tx
      - name: client_id
        in: query
        required: true
        schema:
          type: string
        description: Your Xweather API client ID.
      - name: client_secret
        in: query
        required: true
        schema:
          type: string
        description: Your Xweather API client secret.
      responses:
        '200':
          description: Lightning threat nowcast data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LightningThreatsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    NotFound:
      description: Not found - location or resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiResponse'
    Unauthorized:
      description: Unauthorized - invalid client ID or secret
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiResponse'
    BadRequest:
      description: Bad request - invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiResponse'
  schemas:
    Location:
      type: object
      properties:
        id:
          type: string
          description: Location identifier.
        name:
          type: string
          description: Location name.
        state:
          type: string
          description: State or province code.
        stateFull:
          type: string
          description: Full state or province name.
        country:
          type: string
          description: Country code (ISO 3166-1 alpha-2).
        countryFull:
          type: string
          description: Full country name.
        lat:
          type: number
          format: float
          description: Latitude.
        lon:
          type: number
          format: float
          description: Longitude.
        elevM:
          type: number
          description: Elevation in meters.
        elevFT:
          type: number
          description: Elevation in feet.
        profile:
          type: object
          description: Additional location profile data.
    LightningStrike:
      type: object
      properties:
        id:
          type: string
          description: Strike identifier.
        lat:
          type: number
          description: Latitude of the strike.
        lon:
          type: number
          description: Longitude of the strike.
        timestamp:
          type: integer
          description: Unix timestamp of the strike.
        dateTimeISO:
          type: string
          format: date-time
        type:
          type: string
          description: Strike type (e.g., CG for cloud-to-ground, IC for intra-cloud).
        polarity:
          type: string
          enum:
          - +
          - '-'
          description: Strike polarity (positive or negative).
        peakAmpKA:
          type: number
          description: Peak amplitude in kiloamperes.
        ic:
          type: boolean
          description: Whether the strike was intra-cloud.
    ApiResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the request was successful.
        error:
          $ref: '#/components/schemas/ApiError'
      required:
      - success
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Error code string.
          example: invalid_client
        description:
          type: string
          description: Human-readable error description.
          example: Invalid client ID or secret.
    LightningResponse:
      allOf:
      - $ref: '#/components/schemas/ApiResponse'
      - type: object
        properties:
          response:
            type: array
            items:
              type: object
              properties:
                id:
                  type: string
                loc:
                  $ref: '#/components/schemas/Location'
                ob:
                  $ref: '#/components/schemas/LightningStrike'
    LightningThreatsResponse:
      allOf:
      - $ref: '#/components/schemas/ApiResponse'
      - type: object
        properties:
          response:
            type: array
            items:
              type: object
  securitySchemes:
    clientAuth:
      type: apiKey
      in: query
      name: client_id
      description: Xweather uses client_id and client_secret query parameters for authentication. Both are required on every request.