# Lightningmaps — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Track real-time lightning strikes across the globe with precise coordinates, timestamps, and accuracy measurements from the Blitzortung.org network. Query live strike data and access information about detector stations worldwide to monitor weather patterns and atmospheric activity as it happens.

**Category:** Weather | **Website:** [lightningmaps.org/](https://lightningmaps.org/) | **Docs:** [parse.bot/marketplace/d8e177e8-8369-480c-94de-0357b214f242/lightningmaps-org-api](https://parse.bot/marketplace/d8e177e8-8369-480c-94de-0357b214f242/lightningmaps-org-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/lightningmaps/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get stations

Retrieve lightning detector station data for a geographic region. Returns station locations, cities, countries, altitudes, and status for all Blitzortung network detectors in the specified region. Each station includes its geographic coordinates and metadata. The timeid reflects a 15-minute time bucket used for cache management.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `region` | string | No | Geographic region for station lookup. Accepted values: 'europe', 'oceania', 'america'. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/lightningmaps/get-stations \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"region":"<string>"}'
```

### Get strikes

Get real-time lightning strikes via WebSocket connection. Connects to the live data feed and collects strikes for a configurable duration (1-60 seconds). Supports geographic bounding box filtering. Returns strike locations with latitude, longitude, timestamps, deviation, and metadata.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `duration` | integer | No | Duration in seconds to collect strikes (1-60) |
| `east` | number | No | Eastern longitude bound for filtering |
| `north` | number | No | Northern latitude bound for filtering |
| `south` | number | No | Southern latitude bound for filtering |
| `src_mask` | integer | No | Source bitmask for lightning networks (4=Blitzortung default, 7=all) |
| `west` | number | No | Western longitude bound for filtering |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/lightningmaps/get-strikes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"duration":"<integer>","east":"<number>","north":"<number>","south":"<number>","src_mask":"<integer>","west":"<number>"}'
```

### Get strikes xhr

Retrieve recent lightning strikes from the Blitzortung network via HTTP polling. Returns the most recent batch of strikes with latitude, longitude, deviation, delay, and which detector stations participated in each detection. The response includes a size_marker for subsequent polling and a recommended wait interval. Each strike carries station participation data mapping station IDs to signal metadata when include_stations is true.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `include_stations` | boolean | No | Whether to include station participation data for each strike |
| `src_mask` | integer | No | Source bitmask for lightning networks (4=Blitzortung default) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/lightningmaps/get-strikes-xhr \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"include_stations":"<boolean>","src_mask":"<integer>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.