BYTETOOLS

NASA DONKI API

Free NASA space weather API: solar flares, coronal mass ejections, geomagnetic storms and radiation belt events with impact analysis. DEMO_KEY works. Tested.

API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-20

What is the NASA DONKI API?

NASA's DONKI (Space Weather Database Of Notifications, Knowledge, Information) is a free API providing solar flares, coronal mass ejections, geomagnetic storms, solar energetic particle events and their analysed impacts.

Space weather has real consequences — geomagnetic storms disrupt GPS accuracy, radio propagation, satellite operations and occasionally power grids. DONKI is NASA's operational feed of those events with analysis attached.

Records link related events causally: a solar flare links to the coronal mass ejection it produced, which links to the geomagnetic storm that followed. That chain is what makes it more useful than a bare event list.

Quick facts

Base URL
https://api.nasa.gov/DONKI
Authentication
DEMO_KEY works for testing but is shared and heavily limited. Register a free key at api.nasa.gov.
Rate limit
DEMO_KEY: about 30 requests/hour per IP. Personal key: 1,000/hour.
Pricing
Free. NASA data is public domain.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the NASA DONKI API

Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.

1. Fetch space weather notifications

GET https://api.nasa.gov/DONKI/notifications?type=all&api_key=DEMO_KEY

curl
curl 'https://api.nasa.gov/DONKI/notifications?type=all&api_key=DEMO_KEY'
JavaScript (fetch)
const res = await fetch("https://api.nasa.gov/DONKI/notifications?type=all&api_key=DEMO_KEY");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://api.nasa.gov/DONKI/notifications?type=all&api_key=DEMO_KEY", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200 (truncated)
[
  {
    "messageType": "Report",
    "messageID": "20260819-7D-001",
    "messageURL": "https://kauai.ccmc.gsfc.nasa.gov/DONKI/view/Alert/48156/1",
    "messageIssueTime": "2026-08-19T20:12Z",
    "messageBody": "## Community Coordinated Modeling Center Database Of Notifications, Knowledge, Information (CCMC DONKI)\n## Message Type: Weekly Space Weather Summary Report for August 12, 2026 - August 18, 2026\n##\n## Message Issue Date: 2026-08-19T20:12:31Z\n## Report Coverage Begin Date: 2026-08-12T00:00Z\n## Report Coverage End Date: 2026-08-18T23:59Z\n## Message ID: 20260819-7D-001\n##\n## Disclaimer: NOAA's Space Weather Prediction Center is the United States Government official source for space weather forecasts. This \"Experimental Research Information\" consists of preliminary NASA research products and should be interpreted and used accordingly.\n\n\n## Summary:\n\nSolar activity was at minor levels during this reporting period. There were 6 C-type CMEs (see details below).   \n\nBased on preliminary analysis by the Moon to Mars Space Weather Analysis Office and heliospheric modeling carried out at NASA Community Coordinated Modeling Center, it was estimated that the following CMEs were predicted to impact missions near Earth:\n\nCME Starting time  | Predicted Impacts (plus minus 7 hours)\n-----------------------------------------------------------------------------\n2026-08-14T05:09Z   NASA missions near Earth at 2026-08-17T00:00Z (minor impact), Kp index 3-5 (below minor to minor)\n                                       (see notification 20260814-AL-001).\n       Th

Parameters

ParameterTypeRequiredDescription
api_keystringRequiredYour NASA key, or DEMO_KEY. DEMO_KEY
notificationspathOptionalAll space weather notifications. notifications?type=all
FLR / CME / GST / SEPpathOptionalFlares, CMEs, geomagnetic storms, particle events. FLR
startDate / endDatestringOptionalDate range as YYYY-MM-DD. 2026-08-01
typestringOptionalNotification type filter. all

Response fields

messageTypestring
Report, Alert or Watch.
messageIDstring
Notification identifier.
messageURLstring
Link to the full analysis on NASA's site.
messageIssueTimestring
When the notification was issued.
messageBodystring
Full notification text with analysis.
(FLR) classTypestring
Flare classification such as X1.5 or M2.3.
(GST) allKpIndexarray
Kp index values indicating storm severity.

What you can build with the NASA DONKI API

  • Build a space weather alerting service
  • Warn satellite or radio operators of geomagnetic activity
  • Predict aurora visibility from Kp index data
  • Research solar activity and its terrestrial effects

Common errors and how to fix them

429 OVER_RATE_LIMIT

DEMO_KEY's shared allowance is exhausted.

Fix: Register a free NASA key for 1,000 requests per hour.

Empty array

No events in that date range.

Fix: Solar activity is episodic — quiet periods genuinely have no events.

Long unstructured messageBody

Notifications are written for human analysts.

Fix: Use the typed endpoints (FLR, CME, GST) for structured fields rather than parsing prose.

NASA DONKI API — frequently asked questions

Is the NASA space weather API free?

Yes, with DEMO_KEY for testing or a free registered key for higher limits. The data is public domain.

What does DONKI stand for?

Space Weather Database Of Notifications, Knowledge, Information — NASA's operational space weather event database.

Why does space weather matter?

Geomagnetic storms degrade GPS accuracy, disrupt HF radio, affect satellite operations and in severe cases stress power grids. They also drive aurora visibility.

How do I get structured data rather than prose?

Use the typed endpoints — FLR for flares, CME for coronal mass ejections, GST for geomagnetic storms — which return structured fields rather than the analyst-written notification text.

Tools that pair with this API

NASA DONKI is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.