Discover/Spaceweather API
live

Spaceweather 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.

Endpoint health
verified 3d ago
get_archive_report
get_near_earth_asteroids
get_daily_report
get_current_conditions
4/4 passing latest checkself-healing
Endpoints
4
Updated
26d ago

What is the Spaceweather 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.

Try it

No input parameters required.

api.parse.bot/scraper/78067577-55c2-473b-98ef-f00e6cde97e7/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/78067577-55c2-473b-98ef-f00e6cde97e7/get_current_conditions' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace spaceweather-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""SpaceWeather.com SDK — monitor solar activity, retrieve reports, track asteroids."""
from parse_apis.spaceweather_com_api import SpaceWeather, ArchiveDateNotFound

client = SpaceWeather()

# Fetch current space weather conditions
conditions = client.conditionses.current()
print(f"Solar wind: {conditions.solar_wind.speed_km_sec} km/s, density {conditions.solar_wind.density_protons_cm3} p/cm³")
print(f"Sunspot number: {conditions.sunspot_number} (updated: {conditions.sunspot_number_updated})")
print(f"IMF Bz: {conditions.imf.bz_nT} nT ({conditions.imf.bz_direction})")

# Get today's daily report with news stories
report = client.dailyreports.current()
print(f"\nDaily report for {report.date}, {len(report.stories)} stories")
if report.stories:
    story = report.stories[0]
    print(f"  Top headline: {story.headline}")
    print(f"  Links: {len(story.links)}, Images: {len(story.images)}")

# Retrieve an archived report for a historical date
try:
    archive = client.archivereports.get(year="2025", month="01", day="15")
    print(f"\nArchive: {archive.date}")
    print(f"  Sunspot number was: {archive.conditions.sunspot_number}")
    print(f"  Solar wind was: {archive.conditions.solar_wind.speed_km_sec} km/s")
except ArchiveDateNotFound as exc:
    print(f"Archive not found: {exc}")

# Check near-Earth asteroid encounters
asteroids = client.asteroidtables.current()
print(f"\nPHAs tracked: {asteroids.pha_count}")
print(f"Upcoming encounters: {len(asteroids.recent_encounters)}")
if asteroids.recent_encounters:
    closest = asteroids.recent_encounters[0]
    print(f"  Next: {closest.designation} on {closest.date_ut}, miss distance {closest.miss_distance_ld}")

print("\nExercised: conditionses.current / dailyreports.current / archivereports.get / asteroidtables.current")
All endpoints · 4 totalmissing one? ·

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. All values reflect the latest measurements published on the spaceweather.com homepage. Returns a single Conditions object.

Input

No input parameters required.

Response
{
  "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": 2.53,
        "updated": "Updated: Today at 0126 UT",
        "btotal_nT": 8.85,
        "bz_direction": "north"
      },
      "kp_index": {
        "current": {
          "value": 1.67,
          "status": "quiet"
        },
        "max_24hr": {
          "value": 2.6,
          "status": "7"
        }
      },
      "solar_wind": {
        "updated": "Updated: Today at 0126 UT",
        "speed_km_sec": 398,
        "density_protons_cm3": 11.23
      },
      "xray_flares": {
        "max_6hr": {
          "time": "",
          "class": "C6"
        },
        "updated": "0002 UT Jun11",
        "max_24hr": null
      },
      "sunspot_number": 120,
      "sunspot_number_updated": "Updated 10 Jun 2026",
      "thermosphere_climate_index": {
        "status": null,
        "updated": "Updated 10 Jun 2026",
        "value_x10_10_W": 14.7
      }
    },
    "status": "success"
  }
}

About the Spaceweather API

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.

Reliability & maintenanceVerified

The Spaceweather API is a managed, monitored endpoint for spaceweather.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when spaceweather.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official spaceweather.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3d ago
Latest check
4/4 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Alert users when the planetary K-index exceeds a threshold indicating geomagnetic storm conditions, using the kp_index.current.value field.
  • Log solar wind speed and density over time from get_current_conditions to build time-series charts for space weather research.
  • Pull archived reports via get_archive_report to correlate historical X-ray flare classifications with satellite anomaly records.
  • Build an aurora forecast tool using the imf.bz_direction and kp_index fields from the current conditions endpoint.
  • Track upcoming near-Earth asteroid close approaches by parsing recent_encounters from get_near_earth_asteroids, filtered by miss_distance_ld.
  • Aggregate daily sunspot_number values 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_W field.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does spaceweather.com offer an official developer API?+
No. Spaceweather.com does not publish an official developer API or documented data feed for programmatic access to its content.
What does the `get_archive_report` endpoint return, and how far back does the archive go?+
The endpoint returns a 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?+
The API returns observed data only. The 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?+
The 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`?+
Each data object in the response includes its own 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.
Page content last updated . Spec covers 4 endpoints from spaceweather.com.
Related APIs in WeatherSee all →
api.nasa.gov API
Access NASA's suite of open data APIs — including the Astronomy Picture of the Day, Near Earth Object tracking, DONKI space weather events, EPIC Earth imagery, Mars weather, the NASA Image and Video Library, the Exoplanet Archive, and EONET natural events.
weatherspark.com API
Get historical weather data, current METAR reports, and monthly climate summaries for any location by searching WeatherSpark's comprehensive weather database. Access detailed weather insights including temperature trends, precipitation patterns, and atmospheric conditions to power weather-dependent applications and analysis.
wunderground.com API
Access real-time weather conditions, multi-day forecasts, and detailed historical weather data from thousands of personal and airport weather stations worldwide. Search and retrieve current observations, hourly history, and monthly records to power your weather applications and analysis.
accuweather.com API
Get real-time weather conditions, multi-day forecasts, and health alerts for any location worldwide. Search cities and access detailed data including allergen information and air quality to plan your activities with confidence.
weatherunderground.com API
Get real-time weather data and 10-day forecasts for any location, with access to current conditions like temperature, humidity, and wind speed. Search for locations and receive detailed weather narratives to plan your day or week ahead.
mars.nasa.gov API
Explore real-time images, weather data, and location tracking from NASA's Perseverance and Curiosity rovers on Mars, while discovering mission details, rock sample findings, and the latest news from the Mars Exploration Program. Access rover photos, scientific discoveries, and multimedia content to stay updated on current Mars exploration activities.
global-warming.org API
Access real-time climate and environmental data including temperature, CO2, methane, nitrous oxide levels, arctic sea ice coverage, and ocean warming metrics. Browse climate news updates and explore detailed information on deforestation trends through an integrated environmental monitoring platform.
astro.com API
Access astrological data including zodiac sign characteristics, real-time planetary positions, current celestial aspects, and general weekly horoscopes. Retrieve personality traits, compatibility information, and cosmic event summaries sourced from Astro.com.