# NOAA Space Weather - Kp Index, Alerts, Solar Flares, Storms (`hydramill/space-weather`) Actor

Official NOAA SWPC space weather as clean flat JSON: planetary Kp index (observed and 3-day forecast), geomagnetic storm alerts and warnings, solar flares by X-ray class, and the NOAA R/S/G scales with forecasts. Public domain US data, no API key.

- **URL**: https://apify.com/hydramill/space-weather.md
- **Developed by:** [Hydramill](https://apify.com/hydramill) (community)
- **Categories:** Other, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## NOAA Space Weather - Kp Index, Alerts, Solar Flares, Storms

Get **official NOAA space weather data** as **clean, flat JSON**: the **planetary Kp index** (observed and 3-day forecast), **geomagnetic storm alerts, warnings and watches**, **solar flares** by X-ray class and the **NOAA R/S/G scales** (radio blackouts, radiation storms, geomagnetic storms) with their forecast probabilities.

It reads the public feeds of the **NOAA Space Weather Prediction Center (SWPC)** directly: no scraping, no login, no API key, no proxies, no browser. NOAA's data is a US government work in the public domain.

### What you can use it for

- **Aurora and sky-watching apps and alerts.** Kp now and in the next 3 days, plus the G1-G5 level, to tell users when a northern or southern lights display is likely.
- **Radio, GNSS and satellite operations.** Flares of class M and X and R-scale levels warn of HF radio blackouts; alerts and S-scale cover radiation storms.
- **Power grid and infrastructure monitoring.** Geomagnetic storm warnings with onset and validity times.
- **Research and dashboards.** A tidy time series of Kp and flare events, ready for a spreadsheet, BI tool or database.
- **AI agents.** Short structured answers to "is a geomagnetic storm expected tonight?".

### Why this actor

- **One flat record per item.** `type` tells if it is a Kp value, a flare, an alert or a scale period. Times are ISO 8601 UTC. Alert text has clean line breaks and the message code, serial number, category and headline are split out.
- **Filters that save you work.** Last N hours, minimum Kp (for example 5 = storm), minimum flare class (M, X).
- **Fails visibly.** If NOAA's service is down you get a clear error, not an empty dataset.
- **Free to use.** You only pay Apify's usual platform usage.

No dedicated NOAA SWPC actor existed on the Apify Store when this one was built (2026-11-12); a few space bundles include space weather among other sources.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `dataTypes` | list | all four | `scales`, `kpIndex`, `flares`, `alerts`. |
| `sinceHours` | integer | `72` (Store form: `48`) | Keep Kp, flares and alerts of the last N hours. Future Kp forecast values are always kept. `0` = everything SWPC still publishes (flares 7 days, alerts about 2 weeks, Kp about 1 week back). |
| `minKp` | number | `0` | Keep Kp values from this level up (5 = storm level G1). |
| `minFlareClass` | text | `A` | Keep flares of this class or stronger: `A`, `B`, `C`, `M`, `X`. |
| `maxItems` | integer | `100` | Stop after this many records in total, in the order scales, Kp, flares, alerts. `0` = no limit. |

#### Example input: storms only, last week

```json
{
  "dataTypes": ["kpIndex", "flares", "alerts"],
  "sinceHours": 168,
  "minKp": 5,
  "minFlareClass": "M",
  "maxItems": 0
}
```

### Output

One dataset item per record. Real items from a run on 2026-11-12:

```json
{
  "type": "kpIndex",
  "time": "2026-11-15T00:00:00.000Z",
  "kp": 1.67,
  "kpStatus": "predicted",
  "noaaScale": null,
  "source": "https://services.swpc.noaa.gov/products/noaa-planetary-k-index-forecast.json",
  "retrievedAt": "2026-11-12T13:55:19.212Z"
}
```

```json
{
  "type": "flares",
  "time": "2026-11-12T12:27:00.000Z",
  "beginTime": "2026-11-12T12:23:00.000Z",
  "maxTime": "2026-11-12T12:27:00.000Z",
  "endTime": "2026-11-12T12:30:00.000Z",
  "beginClass": "B9.6",
  "maxClass": "C2.7",
  "endClass": "C1.6",
  "flareLetter": "C",
  "maxFlux": 0.000002778327370833722,
  "satellite": 18,
  "source": "https://services.swpc.noaa.gov/json/goes/primary/xray-flares-7-day.json",
  "retrievedAt": "2026-11-12T13:55:19.212Z"
}
```

```json
{
  "type": "alerts",
  "time": "2026-11-12T06:33:05.873Z",
  "productId": "EF3A",
  "messageCode": "ALTEF3",
  "serialNumber": 3773,
  "category": "CONTINUED ALERT",
  "headline": "CONTINUED ALERT: Electron 2MeV Integral Flux exceeded 1,000pfu",
  "message": "Space Weather Message Code: ALTEF3\nSerial Number: 3773\n...",
  "source": "https://services.swpc.noaa.gov/products/alerts.json",
  "retrievedAt": "2026-11-12T13:55:19.212Z"
}
```

(Alert `message` shortened here.) A `scales` item has `period` (`past24h`, `current`, `forecastDay1`..`forecastDay3`) and `radioBlackoutScale`, `radioBlackoutMinorProb`, `radioBlackoutMajorProb`, `radiationStormScale`, `radiationStormProb`, `geomagneticScale` with their texts.

| Type | Fields |
|---|---|
| all | `type`, `time` (UTC), `source`, `retrievedAt` |
| `kpIndex` | `kp` (0-9), `kpStatus` (`observed`, `estimated`, `predicted`), `noaaScale` (G1-G5 or null) |
| `flares` | `beginTime`, `maxTime`, `endTime`, `beginClass`, `maxClass`, `endClass`, `flareLetter`, `maxFlux` (W/m2), `satellite` |
| `alerts` | `productId`, `messageCode`, `serialNumber`, `category`, `headline`, `message` |
| `scales` | `period`, `radioBlackout*`, `radiationStorm*`, `geomagnetic*` |

The default key-value store also gets a `SUMMARY` record: counts per type, read time and the data attribution.

Export the dataset as JSON, CSV, Excel or XML, or read it through the Apify API and integrations (Make, Zapier, Slack, Google Sheets, webhooks). Schedule it every 15-60 minutes for monitoring.

### Pricing

Free: you only pay Apify's usual platform usage, which is tiny for this actor (no browser, 256 MB, 4 requests per run).

### Data source and attribution

Source: NOAA National Weather Service, Space Weather Prediction Center, <https://www.swpc.noaa.gov>. Feeds on `https://services.swpc.noaa.gov`.

- Terms: NWS information is "in the public domain ... and may be used without charge for any lawful purpose", provided you do not claim it as your own or imply NOAA/NWS endorsement (<https://www.weather.gov/disclaimer>). NOAA asks for attribution: *Data: NOAA Space Weather Prediction Center.*

**This is an independent tool. It is not affiliated with, endorsed by or sponsored by NOAA or the National Weather Service.** For safety-critical decisions (aviation, power grid, satellite operations) use NOAA's official products and warnings. The data is provided as published, without guarantee of availability or accuracy.

### Limitations

- Only the feeds listed above; solar wind, aurora oval maps and long-term indices are not included.
- SWPC keeps a limited history in these feeds (about a week of Kp and flares, about two weeks of alerts). Schedule the actor to build your own archive.
- `kpStatus: estimated` values are provisional and may change.

### En español

Datos oficiales de **clima espacial** de la **NOAA (SWPC)** en JSON plano: índice **Kp** (observado y previsión a 3 días), alertas y avisos de tormenta geomagnética, **erupciones solares** por clase de rayos X y escalas **R/S/G**. Datos de dominio público de EE. UU. Gratuito. Fuente: NOAA SWPC (https://www.swpc.noaa.gov). Herramienta independiente, sin relación con la NOAA.

### En català

Dades oficials de **meteorologia espacial** de la **NOAA (SWPC)** en JSON pla: índex **Kp** (observat i previsió a 3 dies), alertes i avisos de tempesta geomagnètica, **erupcions solars** per classe de raigs X i escales **R/S/G**. Dades de domini públic dels EUA. Gratuït. Font: NOAA SWPC (https://www.swpc.noaa.gov). Eina independent, sense relació amb la NOAA.

# Actor input Schema

## `dataTypes` (type: `array`):

scales = NOAA R/S/G scales now and 3-day forecast; kpIndex = planetary Kp, observed and forecast (3-hour steps); flares = solar flares of the last 7 days; alerts = SWPC alerts, warnings and watches (about the last 2 weeks). Empty = all four.

## `sinceHours` (type: `integer`):

Keep Kp, flares and alerts from the last N hours (Kp forecast values in the future are kept). 0 = everything SWPC still publishes.

## `minKp` (type: `number`):

Keep Kp values from this level up. 5 = geomagnetic storm (G1) or stronger. 0 keeps all.

## `minFlareClass` (type: `string`):

Keep flares of this X-ray class or stronger (A < B < C < M < X). M and X flares can disturb radio communications.

## `maxItems` (type: `integer`):

Stop after this many records in total (in the order scales, Kp, flares, alerts). 0 = no limit.

## Actor input object example

```json
{
  "dataTypes": [
    "scales",
    "kpIndex",
    "flares",
    "alerts"
  ],
  "sinceHours": 48,
  "minKp": 0,
  "minFlareClass": "A",
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

One item per Kp value, flare, alert or scale period. Field `type` tells which.

## `summary` (type: `string`):

Counts per data type, read time and data attribution (key SUMMARY in the default key-value store).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "dataTypes": [
        "scales",
        "kpIndex",
        "flares",
        "alerts"
    ],
    "sinceHours": 48,
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydramill/space-weather").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "dataTypes": [
        "scales",
        "kpIndex",
        "flares",
        "alerts",
    ],
    "sinceHours": 48,
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("hydramill/space-weather").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "dataTypes": [
    "scales",
    "kpIndex",
    "flares",
    "alerts"
  ],
  "sinceHours": 48,
  "maxItems": 100
}' |
apify call hydramill/space-weather --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hydramill/space-weather"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qgoOjVLykVv7P5kep/builds/mAABavwxDwDGTuO6I/openapi.json
