---
title: "Get recent lightning activity at a point."
method: GET
path: "/v1/lightning"
tags: ["Observations"]
---

# Get recent lightning activity at a point.

`GET /v1/lightning`

## Request

- Base URL: `https://api.smarterweather.com`
- URL: `https://api.smarterweather.com/v1/lightning`
- Auth: HTTP bearer

Returns recent lightning near a point: the GOES GLM satellite
flash count within `glm.radius_km` over the last
`glm.window_minutes`, plus MRMS lightning density and
probability at the point when the grid has a value there.
Field names match the MCP `get_lightning_activity` tool. The
point is snapped to the 0.01° (~1 km) grid used by the other
point routes, and the response echoes the snapped `lat`/`lon`.

**Experimental** (`x-stability: experimental`): excluded from
the 90-day breaking-change commitment. Today a GLM query
failure upstream is reported as `flash_count: 0`, so a zero
count is not yet a guaranteed all-clear. The route becomes
stable once a failure is reported as `glm: null`.

### Caching

Successful responses carry `Cache-Control: max-age=60,
stale-while-revalidate=30`, `public` for first-party keys and
`private` for partner keys.

### Coverage

A point outside the 50 US states and DC returns `404`
`outside-coverage` with `next_steps`.

### Auth

Standard sw-api Bearer auth applies.

## Query parameters

- `lat` number, double, required
- `lon` number, double, required

## Response `200`

Lightning activity at the point.

- Lightning: Recent lightning near a point (`GET /v1/lightning`). **Experimental**; see the operation description.
  - `lat` number, double, required: The point the values describe, the request's `lat` snapped to the 0.01° (~1 km) grid.
  - `lon` number, double, required: The point the values describe, the request's `lon` snapped to the 0.01° (~1 km) grid.
  - `glm` LightningGLM, required: GLM flash count within `radius_km` of the point over the last `window_minutes`.
    - `flash_count` integer, required
    - `radius_km` integer, required
    - `window_minutes` integer, required
  - `mrms` LightningMRMS: MRMS lightning at the point. Present only when the grid has a value there; each field is omitted when it has none.
    - `lightning_density` number, double: MRMS lightning flash density at the point.
    - `lightning_prob` integer: MRMS probability of lightning in the next 30 minutes, percent.
  - `summary` string, required: One-line plain-language summary of the activity.

## Other responses

- `400`: Bad request.
- `401`: Missing or invalid API key. Carries a `WWW-Authenticate` challenge and a `next_steps` extension. `recommended` is `device_flow`: the object is a complete no-install mint recipe.
- `402`: Trial key free value ended (lifetime cap spent or key clock expired) while the claim window is still open. Carries `next_steps.recommended = claim` and the per-key claim href.
- `403`: API key lacks the required scope. Carries a `WWW-Authenticate` challenge with `error="insufficient_scope"` and a `next_steps` extension.
- `404`: Resource not found: a location that cannot be resolved (unknown ZIP, unrecognised free-text location), no upstream data for the location, or a missing resource. On a route that checks coverage (its description says so), a location outside the 50 US states and DC returns type `https://smarterweather.com/errors/outside-coverage`; that and the location-not-found problem carry `next_steps` (`recommended = coverage`).
- `429`: Rate limit exceeded. Carries a `next_steps` extension (`recommended: upgrade`, plus `pricing` and `usage`) telling the caller how to lift the limit.
- `500`: Internal server error.
- `502`: Bad gateway. The service received an invalid response from an upstream data source. Transient; clients should retry with backoff.
- `503`: Service unavailable. An upstream dependency is unavailable or shedding load (type `service-unavailable`). Transient; retry with backoff and honor any `Retry-After` header.
- `504`: Gateway timeout. An upstream data source did not respond within the service's budget.

---

[API](https://skmtc.dev/smarterweather/apis/smarter-weather-api.md) · [All operations](https://skmtc.dev/smarterweather/apis/smarter-weather-api/llms.txt) · [OpenAPI document](https://skmtc.dev/smarterweather/apis/smarter-weather-api/revisions/520d55a696e4?raw)
