# NOAA Space Weather API

> NOAA Space Weather returns aurora forecasts and space weather alerts as a workflow and API.

NOAA Space Weather, also called NOAA SWPC, gives aurora chances and Kp outlooks for a required city or place. List space weather alerts returns recent NOAA messages; provide how many days back to look, from 1 to 7.

- Page: https://fous.com/tools/noaa-space-weather
- Handle: `@noaa-space-weather`
- Category: [Weather](https://fous.com/tools/category/weather)
- Source website: https://swpc.noaa.gov
- Last verified: Oct 7, 2026

## Methods

### Get aurora forecast

Operation `get_aurora_forecast`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get the 30-minute chance of aurora overhead near a place, current geomagnetic activity, and the three-day Kp outlook. Visibility also depends on darkness and local conditions; tonight uses approximate local solar hours 18:00–06:00.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `location` | string | yes | `"Fairbanks"` | City or place near which to check the aurora, for example Fairbanks or Edinburgh. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "location"
  ],
  "properties": {
    "location": {
      "type": "string",
      "description": "City or place near which to check the aurora, for example Fairbanks or Edinburgh.",
      "examples": [
        "Fairbanks",
        "Edinburgh",
        "Hobart, Tasmania"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "location": "Fairbanks"
    },
    {
      "location": "Edinburgh"
    },
    {
      "location": "Hobart, Tasmania"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `verdict` | string | `"unlikely"` | Likely (50% or more), possible (10–49%), or unlikely (below 10%). |
| `latitude` | number | `64.837845` | Latitude of matched place. |
| `longitude` | number | `-147.716675` | Longitude of matched place. |
| `current_kp` | number | `1` | Latest estimated planetary Kp on a 0–9 scale. |
| `aurora_type` | string | `"Northern lights"` | Northern or southern lights at this latitude. |
| `storm_level` | string | `"G0 None"` | Current NOAA geomagnetic storm level in words. |
| `forecast_time` | string | `"2026-10-05T07:44:00+00:00"` | Time of the aurora forecast, ISO 8601 with offset. |
| `matched_place` | string | `"Fairbanks, Fairbanks North Star Borough, Alaska, United States"` | Place matched to the location. |
| `aurora_page_link` | string | `"https://www.swpc.noaa.gov/products/aurora-30-minute-forecast"` | NOAA aurora forecast page. |
| `highest_kp_tonight` | number or null | `4` | Highest predicted Kp in the available 18:00–06:00 local solar night periods, or null when unavailable. |
| `aurora_chance_percent` | number | `6` | Forecast chance of aurora overhead, in percent. |
| `three_day_kp_forecast` | array |  | Three-day outlook at three-hour UTC intervals. |
| `three_day_kp_forecast[].kp` | number | `4.67` | Predicted planetary Kp. |
| `three_day_kp_forecast[].start_time` | string | `"2026-10-05T00:00:00+00:00"` | Three-hour interval start time, ISO 8601 with offset. |

**Example input**

```json
{
  "location": "Fairbanks"
}
```

**Example output**

```json
{
  "verdict": "unlikely",
  "latitude": 64.837845,
  "longitude": -147.716675,
  "current_kp": 1,
  "aurora_type": "Northern lights",
  "storm_level": "G0 None",
  "forecast_time": "2026-10-05T07:44:00+00:00",
  "matched_place": "Fairbanks, Fairbanks North Star Borough, Alaska, United States",
  "aurora_page_link": "https://www.swpc.noaa.gov/products/aurora-30-minute-forecast",
  "highest_kp_tonight": 4,
  "aurora_chance_percent": 6,
  "three_day_kp_forecast": [
    {
      "kp": 4.67,
      "start_time": "2026-10-05T00:00:00+00:00"
    },
    {
      "kp": 4,
      "start_time": "2026-10-05T03:00:00+00:00"
    },
    {
      "kp": 3.33,
      "start_time": "2026-10-05T06:00:00+00:00"
    }
  ]
}
```

### List space weather alerts

Operation `list_space_weather_alerts`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

List NOAA space weather alerts, warnings, watches, and summaries issued in the past 1–7 days, newest first. Validity times and NOAA scale levels are included when the message gives them.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `days` | integer | no | `7` | How many days back to look, from 1 to 7. Example: 3. |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "days": {
      "type": "integer",
      "default": 3,
      "maximum": 7,
      "minimum": 1,
      "description": "How many days back to look, from 1 to 7. Example: 3.",
      "examples": [
        7,
        1
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "days": 7
    },
    {},
    {
      "days": 1
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `messages` | array |  | Messages issued during the selected period, newest first. |
| `messages[].kind` | string | `"alert"` | Type of space weather message. |
| `messages[].title` | string | `"Electron 2MeV Integral Flux exceeded 1,000pfu"` | Message headline without its alert, watch, warning or summary prefix. |
| `messages[].valid_to` | string or null |  | UTC end time if supplied in the message, ISO 8601 with offset. |
| `messages[].page_link` | string | `"https://www.swpc.noaa.gov/products/alerts-watches-and-warnings"` | NOAA page listing space weather alerts, watches, and warnings. |
| `messages[].issue_time` | string | `"2026-09-28T05:00:40.090+00:00"` | UTC issue time in ISO 8601 with offset. |
| `messages[].valid_from` | string or null | `"2026-09-26T15:35:00+00:00"` | UTC start time if supplied in the message, ISO 8601 with offset. |
| `messages[].message_text` | string | `"Space Weather Message Code: ALTEF3\r\nSerial Number: 3747\r\nIssue Time: 2026 Sep 28 0500 UTC\r\n\r\nCONTINUED ALERT: E` | Full message as published by NOAA. |
| `messages[].product_code` | string or null | `"ALTEF3"` | NOAA product identifier. |
| `messages[].serial_number` | string or null | `"3747"` | NOAA message serial number. |
| `messages[].noaa_scale_level` | string or null |  | NOAA scale code and level in words, when given. |

**Example input**

```json
{
  "days": 7
}
```

**Example output**

```json
{
  "messages": [
    {
      "kind": "alert",
      "title": "Electron 2MeV Integral Flux exceeded 1,000pfu",
      "valid_to": null,
      "page_link": "https://www.swpc.noaa.gov/products/alerts-watches-and-warnings",
      "issue_time": "2026-09-28T05:00:40.090+00:00",
      "valid_from": "2026-09-26T15:35:00+00:00",
      "message_text": "Space Weather Message Code: ALTEF3\r\nSerial Number: 3747\r\nIssue Time: 2026 Sep 28 0500 UTC\r\n\r\nCONTINUED ALERT: Electron 2MeV Integral Flux exceeded 1,000pfu\nContinuation of Serial Number: 3746\nBegin Ti…",
      "product_code": "ALTEF3",
      "serial_number": "3747",
      "noaa_scale_level": null
    },
    {
      "kind": "alert",
      "title": "Electron 2MeV Integral Flux exceeded 1,000pfu",
      "valid_to": null,
      "page_link": "https://www.swpc.noaa.gov/products/alerts-watches-and-warnings",
      "issue_time": "2026-09-27T05:02:04.940+00:00",
      "valid_from": "2026-09-26T15:35:00+00:00",
      "message_text": "Space Weather Message Code: ALTEF3\r\nSerial Number: 3746\r\nIssue Time: 2026 Sep 27 0502 UTC\r\n\r\nCONTINUED ALERT: Electron 2MeV Integral Flux exceeded 1,000pfu\nContinuation of Serial Number: 3745\nBegin Ti…",
      "product_code": "ALTEF3",
      "serial_number": "3746",
      "noaa_scale_level": null
    },
    {
      "kind": "alert",
      "title": "Geomagnetic K-index of 4",
      "valid_to": null,
      "page_link": "https://www.swpc.noaa.gov/products/alerts-watches-and-warnings",
      "issue_time": "2026-09-27T00:40:33.327+00:00",
      "valid_from": null,
      "message_text": "Space Weather Message Code: ALTK04\r\nSerial Number: 2688\r\nIssue Time: 2026 Sep 27 0040 UTC\r\n\r\nALERT: Geomagnetic K-index of 4 \nThreshold Reached: 2026 Sep 27 0040 UTC\nSynoptic Period: 0000-0300\nActive …",
      "product_code": "ALTK04",
      "serial_number": "2688",
      "noaa_scale_level": null
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@noaa-space-weather",
  "visibility": "public",
  "operation": "get_aurora_forecast",
  "version": 1,
  "input": {
    "location": "Fairbanks"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@noaa-space-weather\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_aurora_forecast\",\n  \"version\": 1,\n  \"input\": {\n    \"location\": \"Fairbanks\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@noaa-space-weather",
  "visibility": "public",
  "operation": "get_aurora_forecast",
  "version": 1,
  "input": {
    "location": "Fairbanks"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/noaa-space-weather`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_aurora_forecast`: Get aurora forecast. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `list_space_weather_alerts`: List space weather alerts. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-noaa-space-weather https://api.fous.com/mcp/tools/noaa-space-weather --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Check aurora chances near a destination
- Compare current geomagnetic activity with the three-day Kp outlook
- Review recent NOAA space weather alerts and warnings
- Track alert issue and validity times

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this NOAA Space Weather tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a NOAA Space Weather account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from swpc.noaa.gov when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Oct 7, 2026.

### What is the aurora chance near a place?

Get aurora forecast returns the forecast chance and verdict for a required city or place.

### What is the three-day Kp outlook?

Get aurora forecast returns the three-day Kp outlook at three-hour intervals for a required city or place.

### Which space weather alerts were issued recently?

List space weather alerts returns NOAA messages from the selected 1–7-day period, newest first.

## Related

- [All Weather tools](https://fous.com/tools/category/weather)
