Lightning
These endpoints serve lightning detected by the Central Weather Administration (CWA). Each flash has a type (cloud-to-cloud or cloud-to-ground), a time, and coordinates. The server checks the source every 30 seconds and adds a snapshot when the source updates. Snapshots are kept for 3 days. Use them to draw lightning on a map or to warn for thunderstorms. The shared format is in the Weather API.
Data license
Section titled “Data license”AttributionData: Central Weather Administration (CWA), ExpTech Studio (exptech.dev)
- Central Weather Administration (CWA): CWA's own data terms (such as the Open Government Data License) also apply; CWA's official releases take precedence.
Where to show it, examples and commercial-use requests: Data licensing and attribution.
Authentication
Section titled “Authentication”No API Token is required.
Latest lightning
Section titled “Latest lightning”The latest lightning snapshot. Lightning has no stations. In the columnar format, the same index in each array is one flash.
curl "https://api.core-tnn1.exptech.dev/api/v5/meteor/lightning"const res = await fetch("https://api.core-tnn1.exptech.dev/api/v5/meteor/lightning");if (!res.ok) throw new Error(`HTTP ${res.status}`);const data = await res.json();console.log(data);import requests
res = requests.get( "https://api.core-tnn1.exptech.dev/api/v5/meteor/lightning", timeout=10,)res.raise_for_status()print(res.json())Success
{ "time": 1794636300, "type": [ 0, 0, 1 ], "t": [ 1794635880, 1794635940, 1794636120 ], "lat": [ 24.802, 24.804, 24.818 ], "lon": [ 121.008, 121.023, 120.978 ]}Not modified (If-None-Match matched). No bodyNo response body
Try it
Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
time | number | End of the interval this batch covers, in Unix seconds |
type | number[] | Flash type: 0 cloud-to-cloud, 1 cloud-to-ground |
t | number[] | Time of each flash, in Unix seconds |
lat | number[] | Latitude, 4 decimal places |
lon | number[] | Longitude, 4 decimal places |
When there were no flashes in the interval, each array is empty. When the server has no data yet, the response is {}.
Snapshot times
Section titled “Snapshot times”Lightning snapshot times you can query now, as delta-encoded Unix seconds, oldest first. See Delta-encoded time lists for how to decode them.
curl "https://api.core-tnn1.exptech.dev/api/v5/meteor/lightning/list"const res = await fetch("https://api.core-tnn1.exptech.dev/api/v5/meteor/lightning/list");if (!res.ok) throw new Error(`HTTP ${res.status}`);const data = await res.json();console.log(data);import requests
res = requests.get( "https://api.core-tnn1.exptech.dev/api/v5/meteor/lightning/list", timeout=10,)res.raise_for_status()print(res.json())Success
[ 1794377100, 300, 300, 600]Not modified (If-None-Match matched). No bodyNo response body
Try it
Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
[0] | number | Time of the oldest snapshot, in Unix seconds |
[i](i ≥ 1) | number | Gap from the previous time, in seconds. A new snapshot is added only when the source updates, so the gap is not fixed |
When there are no snapshots, the response is [].
Lightning at a time
Section titled “Lightning at a time”The lightning snapshot at a chosen time. The structure matches Latest lightning. It is served only on static.core. api.core returns 404 for this path.
timePath parameter. Snapshot time, a 10-digit Unix timestamp in seconds. It must be a value that appeared in /list
curl "https://static.core-tnn1.exptech.dev/api/v5/meteor/lightning/<time>"const res = await fetch("https://static.core-tnn1.exptech.dev/api/v5/meteor/lightning/<time>");if (!res.ok) throw new Error(`HTTP ${res.status}`);const data = await res.json();console.log(data);import requests
res = requests.get( "https://static.core-tnn1.exptech.dev/api/v5/meteor/lightning/<time>", timeout=10,)res.raise_for_status()print(res.json())Success. Same structure as the latest lightning
{ "time": 1794636000, "type": [ 1 ], "t": [ 1794635710 ], "lat": [ 24.7921 ], "lon": [ 121.0113 ]}Not modified (If-None-Match matched). No bodyNo response body
time is not an integer, or there is no snapshot at that time (including past the retention window). No bodyNo response body
Try it
Response fields
Section titled “Response fields”Same response fields as Latest lightning.
- Every time is Unix seconds.
timeis the end of the snapshot interval. The time of an individual flash ist. - Snapshots are kept for 3 days. Lightning has no trend endpoint and no station-catalog endpoint.
- Source: lightning data in CWA open data.
- Which server to call is in the Weather API. Timestamp snapshots go to
static.core. Everything else goes toapi.core. Use the TNN-1 URLs directly.
