NOAA API: Get aurora forecast
Gets the 30-minute chance of aurora overhead near a place, current geomagnetic activity, and the three-day Kp outlook. Visibility also depends on darkness and local conditions; tonight uses approximate local solar hours 18:00-06:00.
Unofficial. Not affiliated with or endorsed by NOAA.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Location, required
location City or place near which to check the aurora, for example Fairbanks or Edinburgh.
Fairbanks
Input as JSON
{ "location": "Fairbanks"}Output
{ "verdict": "possible", "latitude": 64.837845, "longitude": -147.716675, "current_kp": 0.67, "aurora_type": "Northern lights", "storm_level": "G0 None", "forecast_time": "2026-10-23T10:34:00+00:00", "matched_place": "Fairbanks, Fairbanks North Star Borough, Alaska, United States", "aurora_page_link": "https://www.swpc.noaa.gov/products/aurora-30-minute-forecast" , "highest_kp_tonight": 3.33, "aurora_chance_percent": 26, "three_day_kp_forecast": [ { "kp": 3.67, "start_time": "2026-10-23T00:00:00+00:00" }, { "kp": 3.33, "start_time": "2026-10-23T03:00:00+00:00" }, { "kp": 3, "start_time": "2026-10-23T06:00:00+00:00" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"swpc.noaa.gov/get_aurora_forecast","input":{"location":"Fairbanks"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "swpc.noaa.gov/get_aurora_forecast" , "input": { "location": "Fairbanks" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "swpc.noaa.gov/get_aurora_forecast" , "input": { "location": "Fairbanks" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run swpc.noaa.gov/get_aurora_forecast# with {"location":"Fairbanks"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "location" ], "properties": { "location": { "type": "string", "description": "City or place near which to check the aurora, for example Fairbanks or Edinburgh." } }}Output schema
{ "type": "object", "required": [ "matched_place", "aurora_type", "aurora_chance_percent", "verdict", "current_kp", "storm_level", "highest_kp_tonight", "three_day_kp_forecast", "forecast_time", "aurora_page_link", "latitude", "longitude" ], "properties": { "verdict": { "type": "string", "description": "Likely (50% or more), possible (10–49%), or unlikely (below 10%)." }, "latitude": { "type": "number", "description": "Latitude of matched place.", "x-fous-developer": true }, "longitude": { "type": "number", "description": "Longitude of matched place.", "x-fous-developer": true }, "current_kp": { "type": "number", "description": "Latest estimated planetary Kp on a 0–9 scale." }, "aurora_type": { "type": "string", "description": "Northern or southern lights at this latitude." }, "storm_level": { "type": "string", "description": "Current NOAA geomagnetic storm level in words." }, "forecast_time": { "type": "string", "description": "Time of the aurora forecast, ISO 8601 with offset." }, "matched_place": { "type": "string", "description": "Place matched to the location." }, "aurora_page_link": { "type": "string", "description": "NOAA aurora forecast page." }, "highest_kp_tonight": { "type": [ "number", "null" ], "description": "Highest predicted Kp in the available 18:00–06:00 local solar night periods, or null when unavailable." }, "aurora_chance_percent": { "type": "number", "description": "Forecast chance of aurora overhead, in percent." }, "three_day_kp_forecast": { "type": "array", "items": { "type": "object", "required": [ "start_time", "kp" ], "properties": { "kp": { "type": "number", "description": "Predicted planetary Kp." }, "start_time": { "type": "string", "description": "Three-hour interval start time, ISO 8601 with offset." } }, "additionalProperties": false }, "description": "Three-day outlook at three-hour UTC intervals." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
swpc.noaa.gov/get_aurora_forecast- Returns
- aurora chance and verdict, current Kp, storm level, highest Kp tonight, three-day Kp forecast
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method swpc.noaa.gov/get_aurora_forecast with the inputs above.
Ask your agent
- Will I be able to see the northern lights from Fairbanks tonight?
- What's the current Kp index and storm level for aurora viewing?
- Chance of seeing aurora overhead near Edinburgh in the next 30 minutes?
- Is there a geomagnetic storm underway, and what's the highest Kp expected tonight near Tromsø?
- Give me the three-day Kp outlook so I can plan an aurora trip to northern Minnesota.
See more
All NOAA methodsFinds the nearest NOAA tide prediction station to a US coastal place (within 30 miles) and returns its high and low tide times in local time with predicted heights above MLLW.
tidesandcurrents.noaa.gov/get_tide_timesGets the latest NOAA coastal water level, the matching tide prediction, the direction of change, and water temperature for the station nearest a US coastal place (within 50 miles).
tidesandcurrents.noaa.gov/get_water_levelLists NOAA space weather alerts, warnings, watches and summaries issued in the last 1 to 7 days, newest first, with validity times and NOAA scale levels when the message gives them.
swpc.noaa.gov/list_space_weather_alertsLists active tropical cyclones in the selected basin, strongest first, with current conditions, advisory and forecast cone.
nhc.noaa.gov/list_active_stormsGets AirNow current air quality, pollutant readings and today's and tomorrow's forecasts for a US city or ZIP code, or a covered Canadian or Mexican city.
airnow.gov/get_air_qualityLooks up the National Weather Service seven-day day and night forecast for a U.S. city, address, or ZIP code. Forecast availability depends on NWS land-grid coverage.
weather.gov/get_forecastGets the latest observed weather from a nearby National Weather Service station for a US city, address, or ZIP code. Measurements the station does not report are null.
weather.gov/get_current_conditionsGets current conditions and RealFeel for a city or postal code on AccuWeather. The UV level follows standard UV-index ranges. Air quality is null unless it is shown with the current conditions.
accuweather.com/get_current_weather