This page demonstrates common endpoint requests and useful fields taken from the OpenAPI schema.
Kp Index — /kp-index
Retrieve 3-hourly geomagnetic Kp index.
import requests
resp = requests.get(
"https://api.mission.space/api/v1/kp-index",
params={
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-01-31T23:59:59Z",
"limit": 1000,
},
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
Key fields in data objects: timestamp, kp_index, ap_index, source.
Solar Wind — /solar-wind
High-cadence solar wind bulk parameters.
import requests
resp = requests.get(
"https://api.mission.space/api/v1/solar-wind",
params={"start_time": "2025-01-01T00:00:00Z", "end_time": "2025-01-01T01:00:00Z", "limit": 500},
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
Key fields: velocity_km_s, density_cm3, temperature_k, bx_nT, by_nT, bz_nT.
Proton Flux (GOES SGPS) — /proton-flux
Use satellite= to limit results to a single satellite; otherwise records are multiplied by active satellites.
import requests
resp = requests.get(
"https://api.mission.space/api/v1/proton-flux",
params={"start_time": "2025-05-10T00:00:00Z", "end_time": "2025-05-11T00:00:00Z", "satellite": "GOES16", "limit": 100},
headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
Key fields: flux_ge_10mev, flux_ge_30mev, satellite, timestamp.
Models — JB2008 and MSIS
Calculate atmosphere/model outputs with a POST request to /models/jb2008 or /models/msis.
Example JB2008 request:
import requests
resp = requests.post(
"https://api.mission.space/api/v1/models/jb2008",
headers={"X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
json={"timestamp": "2025-01-01T12:00:00Z", "latitude": 45.0, "longitude": 15.0, "altitude_km": 500},
)
resp.raise_for_status()
print(resp.json())
Response data contains density_kg_m3, temperature_K, and input echo.