Lightning API Guide
The Lightning API is a Classic API and does not follow the consolidated Core Platform standards. The Core Platform Guides (including global authentication, error handling, and rate limits) do not apply to this service. Please follow the instructions provided in this guide.
Analyze historical electrical activity and storm tracks for infrastructure impact or forensic reporting. This API allows you to retrieve precise strike locations, types, and intensities for both New Zealand and global regions over the last 24 hours. It serves as a comprehensive, searchable archive of detected lightning activity, essential for post-event damage assessment.
The API provides two complementary access modes:
- Historical strikes via REST (up to 24 hours in the past)
- Real-time strikes via WebSocket
Access Control & Coverage
All API access is secured using credentials (API key or short-lived tokens) associated with an approved geographical bounding box.
Requests may specify a wider bounding box, but only strikes falling within the key’s approved area will be returned.
Authentication
Two authentication methods are available:
API Key (Direct)
- HTTP →
x-api-keyrequest header - WebSocket →
AUTHENTICATEmessage containing the API key
Short-Lived Token (Recommended)
We recommend using short-lived tokens instead of exposing your private API key directly.
Token Generation
POST /auth/token
Headers
x-api-key: <PRIVATE_API_KEY>
Body
{
"type": "http" | "ws" | "universal"
}
Token types
http→ usable for HTTP requests onlyws→ usable for WebSocket authentication onlyuniversal→ usable for both HTTP and WebSocket
Tokens are valid for 5 minutes.
Support
If you have any questions, require configuration changes, or wish to request an expanded geographical area, please visit our Support Centre or contact the team.