SpaceWeather.irSolar Activity Observation Centerفارسی

SpaceWeather.ir · Scientific Data & API

Free Space Weather API & Solar Data

Free JSON API documentation for solar activity and space weather, including the latest report, 30-day and 90-day hourly series, Kp, solar wind and IMF.

Scientific datasets

Hourly Space Weather Series — 30 Days

Hourly aggregated solar wind, interplanetary magnetic field, geomagnetic indices, solar radio flux, X-ray and energetic particle series. The rolling window contains up to 720 hourly slots per variable.

Dataset details

Hourly Space Weather Parameter Series — 90 Days

Rolling hourly series for 11 selectable space weather parameters. Each parameter is requested separately, with up to 2,160 hourly slots, a time origin and a one-hour step when data are available.

Dataset details

Latest hourly report

Latest available solar and geomagnetic parameters, including C, M and X flare probabilities.

Open JSON

Quick start and request examples

GET requests use no API key in the supplied source. Use curl or Python and validate server responses before analysis.

curl --fail --show-error "https://spaceweather.ir/ParamData.ashx?key=wind"
import requests

r = requests.get("https://spaceweather.ir/ParamData.ashx",
                 params={"key": "wind"}, timeout=30)
r.raise_for_status()
data = r.json()
if data.get("error") or data.get("nodata"):
    raise ValueError("Data unavailable")
print(data["values"])

Illustrative response (shortened; not observed data)

{
  "key": "wind",
  "start": 1764000000000,
  "stepMs": 3600000,
  "values": [
    420.0,
    420.0,
    428.0
  ],
  "value": 428.0,
  "updated": 1764007200000
}

90-day API parameters

keyParameterUnit / encodingJSON
windSolar wind speedkm/sJSON
densSolar wind proton densityp/cm³JSON
tempSolar wind temperatureKJSON
sfuF10.7 solar radio fluxsfuJSON
kpGeomagnetic Kp indexdimensionlessJSON
xraySolar X-ray seriessite encoding — verifyJSON
btIMF magnitude BtnTJSON
bzIMF north–south component BznTJSON
dstDst geomagnetic indexnTJSON
elecEnergetic electron seriesverify scaleJSON
protonEnergetic proton seriesverify scaleJSON

Legacy endpoints

Legacy identifiers do not always match their actual query windows. Prefer the hourly series for regular time grids.

idDataSource query window / count
alertSpace weather alertsLatest 10 records
lastreginSolar active regionsLatest 20 records
1073dF10.7 flux4 days in source
x3dX-ray series4 days; stored index
kp3dKp index4 days in source
bz3dIMF Bz4 days in source
proton3dProton series5 days; logg field
sunspot180dSunspot series180 days
sunspot360dSunspot series360 days
sunspot720dSunspot series720 days
lastflare.aspxLatest flare reportOne record

Scientific limitations and use

  • Series are hourly averages of available values; both series APIs may carry the previous value forward for up to four hours. These are not necessarily new observations.
  • ChartData uses the database clock and has no explicit timestamps. ParamData converts server-local times to Unix milliseconds. Verify the UTC basis with the site operator before research use.
  • Nulls and empty responses may occur. updated denotes the last non-null slot and may include a carried-forward value. Hourly Kp and F10.7 slots do not imply independent hourly measurements.
  • Verify X-ray and particle encodings, including the legacy logarithmic proton series, before conversion or use as calibrated raw measurements.
  • Free access is not an unrestricted redistribution license. Contact the center for reuse permissions and original-source attribution. The API source does not establish upstream provenance for every variable.
  • Cache responses and avoid unnecessary polling. Cross-origin browser requests may be restricted by CORS.

Contact: info@spaceweather.ir