spaceweather.com APIspaceweather.com ↗
Access real-time solar wind, X-ray flares, sunspot counts, K-index, and near-Earth asteroid encounters from spaceweather.com via a structured API.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/78067577-55c2-473b-98ef-f00e6cde97e7/get_current_conditions' \ -H 'X-API-Key: $PARSE_API_KEY'
Get current space weather conditions sidebar data including solar wind speed and density, X-ray flare classifications, sunspot number, planetary K-index, interplanetary magnetic field strength, and thermosphere climate index.
No input parameters required.
{
"type": "object",
"fields": {
"imf": "object containing btotal_nT (number), bz_nT (number), bz_direction (string), updated (string)",
"kp_index": "object containing current (object with value, status) and max_24hr (object with value, status)",
"solar_wind": "object containing speed_km_sec (number), density_protons_cm3 (number), updated (string)",
"xray_flares": "object containing max_6hr (object with class, time), max_24hr (object with class, time or null), updated (string)",
"sunspot_number": "integer - current sunspot count",
"sunspot_number_updated": "string - timestamp of last sunspot update",
"thermosphere_climate_index": "object containing value_x10_10_W (number), status (string or null), updated (string)"
},
"sample": {
"data": {
"imf": {
"bz_nT": 3.23,
"updated": "Updated: Today at 0600 UT",
"btotal_nT": 4.83,
"bz_direction": "north"
},
"kp_index": {
"current": {
"value": 1.33,
"status": "quiet"
},
"max_24hr": {
"value": 3,
"status": "0"
}
},
"solar_wind": {
"updated": "Updated: Today at 0600 UT",
"speed_km_sec": 404.3,
"density_protons_cm3": 4.46
},
"xray_flares": {
"max_6hr": {
"time": "",
"class": "C4"
},
"updated": "1739 UT May14",
"max_24hr": null
},
"sunspot_number": 56,
"sunspot_number_updated": "Updated 14 May 2026",
"thermosphere_climate_index": {
"status": null,
"updated": "Updated 14 May 2026",
"value_x10_10_W": 16.48
}
},
"status": "success"
}
}About the spaceweather.com API
The spaceweather.com API exposes 4 endpoints covering live space weather conditions, daily editorial reports, historical archives, and near-Earth asteroid encounter tables. The get_current_conditions endpoint alone returns 7 distinct data objects including solar wind speed and density, interplanetary magnetic field strength, X-ray flare classifications, planetary K-index, sunspot count, and the thermosphere climate index — all in a single structured response.
Real-Time Space Weather Conditions
The get_current_conditions endpoint returns a snapshot of the current solar environment. Key fields include solar_wind.speed_km_sec, solar_wind.density_protons_cm3, imf.btotal_nT, imf.bz_nT, and imf.bz_direction (which indicates whether the interplanetary magnetic field is northward or southward — relevant to geomagnetic storm risk). The kp_index object includes both the current value and a 24-hour maximum, each paired with a status label. The thermosphere_climate_index returns a watt value and status string indicating atmospheric heating conditions.
Daily and Archived Reports
The get_daily_report endpoint returns the current date and an array of stories, where each story includes a headline, content text, images array, and links. This mirrors the editorial content published on the spaceweather.com homepage. The get_archive_report endpoint accepts three required parameters — year (four-digit), month (two-digit with leading zero), and day (two-digit with leading zero) — and returns the same stories structure for that historical date plus a conditions object with the same fields as get_current_conditions. This makes it straightforward to correlate past news coverage with recorded solar metrics.
Near-Earth Asteroid Encounters
The get_near_earth_asteroids endpoint returns pha_count (the number of currently tracked potentially hazardous asteroids) and a recent_encounters array. Each entry includes the asteroid's designation, date_ut, miss_distance_ld (in lunar distances), velocity_km_s, and estimated diameter. This data reflects the close-approach table shown on the spaceweather.com homepage, covering both recent passes and near-term upcoming encounters.
- Alert users when the planetary K-index exceeds a threshold indicating geomagnetic storm conditions, using the
kp_index.current.valuefield. - Log solar wind speed and density over time from
get_current_conditionsto build time-series charts for space weather research. - Pull archived reports via
get_archive_reportto correlate historical X-ray flare classifications with satellite anomaly records. - Build an aurora forecast tool using the
imf.bz_directionandkp_indexfields from the current conditions endpoint. - Track upcoming near-Earth asteroid close approaches by parsing
recent_encountersfromget_near_earth_asteroids, filtered bymiss_distance_ld. - Aggregate daily
sunspot_numbervalues across archived reports to study solar cycle progression. - Display the thermosphere climate index alongside other solar metrics in a space environment dashboard using the
thermosphere_climate_index.value_x10_10_Wfield.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does spaceweather.com offer an official developer API?+
What does the `get_archive_report` endpoint return, and how far back does the archive go?+
stories array and a conditions object for any historical date you specify using the year, month, and day parameters. Spaceweather.com has published daily reports since the late 1990s, so the archive spans decades. However, the completeness of structured conditions data for very old dates depends on what the source recorded at the time — some older entries may have partial fields.Does the API return solar flare forecasts or only observed flare data?+
xray_flares field in get_current_conditions provides the maximum flare class over the past 6 and 24 hours, with timestamps. Forward-looking forecasts (probability of M- or X-class flares, for example) are not currently exposed. You can fork this API on Parse and revise it to add a forecast endpoint if that data becomes a priority.Is there a way to filter the near-Earth asteroid encounters by size or miss distance within the API?+
get_near_earth_asteroids endpoint returns the full encounter table as a list; it does not accept filter parameters. All filtering by miss_distance_ld, velocity_km_s, or estimated diameter must be done client-side after fetching the response. You can fork this API on Parse and revise it to add query parameters that filter the returned list.How current is the data returned by `get_current_conditions`?+
updated timestamp field — for example, solar_wind.updated and imf.updated — so you can see exactly when each measurement was last refreshed. Spaceweather.com updates different instruments on different cadences; solar wind data typically refreshes more frequently than sunspot numbers.