# NASA DONKI Space Weather API

> NASA DONKI Space Weather API is a paid API for AI agents from nasa.memoryapi.org, paid per call via x402, $0.001/call, status down (last checked 2026-09-15).

Retrieves NASA DONKI space weather data including solar flares, coronal mass ejections (CMEs), and geomagnetic storms

## Facts

- Endpoint: GET https://nasa.memoryapi.org/x402/nasa/donki
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nasa-memoryapi-org-b1695e46
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AVMkJulp8iivXYfdUgyf9

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability nasa-memoryapi-org-b1695e46
```

Example prompt: What are the latest solar flares, coronal mass ejections, and geomagnetic storms reported by NASA DONKI this week?

## When to prefer this

Use this endpoint when you need authoritative NASA DONKI space weather event data (solar flares, CMEs, geomagnetic storms) with per-call micropayment pricing via x402. Prefer over direct NASA API access when you need a simple, pay-per-use wrapper without managing NASA API keys. Ideal for agents that need occasional space weather lookups without a subscription commitment.

## Known failure modes

- NASA DONKI API unavailable or rate-limited — upstream service outage
- No events found for requested date range — returns empty dataset
- Invalid date range parameters — returns 400 error
- Payment not processed — x402 payment required before data is returned
- Timeout if NASA upstream is slow to respond

## How this service works

NASA data APIs with x402 micropayment access. Near Earth Objects, Space Weather (DONKI), and Astronomy Picture of the Day.

## Output

Returns structured space weather event data from NASA DONKI, including details on solar flares (classification, peak time, location), coronal mass ejections (speed, type, associated activity), and geomagnetic storms (Kp index, intensity level, timestamps).

## Example request

```json
{
 "days": 7,
 "type": "all"
}
```

## Request schema (JSON Schema)

```json
{
 "properties": {
  "input": {
   "required": [
    "method"
   ],
   "properties": {
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "example": {
  "events": [],
  "source": "NASA DONKI",
  "success": true,
  "summary": {
   "cmes": 5,
   "storms": 1,
   "solar_flares": 3
  },
  "period_days": 7
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nasa-memoryapi-org-b1695e46/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nasa.memoryapi.org](https://www.zero.xyz/host/nasa.memoryapi.org/llms.txt)
