NWS API: Get National Weather Service forecast
Looks 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.
Unofficial. Not affiliated with or endorsed by NWS.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Units optional
units Temperature units, such as fahrenheit or celsius.
fahrenheit
One of
fahrenheit,celsius. Defaultfahrenheit.- Location, required
location U.S. city, street address, or ZIP code, such as Denver, CO or 10001.
Denver, CO
Input as JSON
{ "units": "fahrenheit", "location": "Denver, CO"}Output
{ "periods": [ { "name": "Overnight", "wind": "10 mph S", "end_time": "2026-10-23T06:00:00-06:00", "page_link": "https://forecast.weather.gov/MapClick.php?lat=39.738453&lon=-104.984853" , "start_time": "2026-10-23T01:00:00-06:00", "temperature": 55, "short_forecast": "Chance Rain Showers", "temperature_unit": "F", "detailed_forecast": "A chance of rain showers before 3am. Cloudy. Low around 55, with temperatures rising to around 58 overnight. South wind around 10 mph, with gusts as high as 16 mph. Chance of precipitation is 30%.", "chance_of_precipitation_percent": 26 }, { "name": "Friday", "wind": "9 to 16 mph SSW", "end_time": "2026-10-23T18:00:00-06:00", "page_link": "https://forecast.weather.gov/MapClick.php?lat=39.738453&lon=-104.984853" , "start_time": "2026-10-23T06:00:00-06:00", "temperature": 78, "short_forecast": "Mostly Sunny", "temperature_unit": "F", "detailed_forecast": "Mostly sunny. High near 78, with temperatures falling to around 76 in the afternoon. South southwest wind 9 to 16 mph, with gusts as high as 25 mph.", "chance_of_precipitation_percent": 4 }, { "name": "Friday Night", "wind": "3 to 12 mph WSW", "end_time": "2026-10-24T06:00:00-06:00", "page_link": "https://forecast.weather.gov/MapClick.php?lat=39.738453&lon=-104.984853" , "start_time": "2026-10-23T18:00:00-06:00", "temperature": 48, "short_forecast": "Partly Cloudy", "temperature_unit": "F", "detailed_forecast": "Partly cloudy. Low around 48, with temperatures rising to around 51 overnight. West southwest wind 3 to 12 mph, with gusts as high as 18 mph.", "chance_of_precipitation_percent": 0 } ], "latitude": 39.738453, "longitude": -104.984853, "update_time": "2026-10-23T06:46:33+00:00", "matched_place": "Denver, CO, USA", "forecast_office": "Denver/Boulder, CO" , "forecast_grid_position": "BOU/63,61" }Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"weather.gov/get_forecast","input":{"units":"fahrenheit","location":"Denver, CO"}}' # 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": "weather.gov/get_forecast" , "input": { "units": "fahrenheit", "location": "Denver, CO" }})# 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": "weather.gov/get_forecast" , "input": { "units": "fahrenheit", "location": "Denver, CO" } }), 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 weather.gov/get_forecast# with {"units":"fahrenheit","location":"Denver, CO"}"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": { "units": { "enum": [ "fahrenheit", "celsius" ], "type": "string", "default": "fahrenheit", "description": "Temperature units, such as fahrenheit or celsius." }, "location": { "type": "string", "minLength": 1, "description": "U.S. city, street address, or ZIP code, such as Denver, CO or 10001." } }, "additionalProperties": false}Output schema
{ "type": "object", "required": [ "matched_place", "forecast_office", "update_time", "forecast_grid_position", "latitude", "longitude", "periods" ], "properties": { "periods": { "type": "array", "items": { "type": "object", "required": [ "name", "start_time", "end_time", "temperature", "temperature_unit", "chance_of_precipitation_percent", "wind", "short_forecast", "detailed_forecast", "page_link" ], "properties": { "name": { "type": "string" }, "wind": { "type": [ "string", "null" ] }, "end_time": { "type": "string" }, "page_link": { "type": "string" }, "start_time": { "type": "string" }, "temperature": { "type": [ "integer", "null" ] }, "short_forecast": { "type": [ "string", "null" ] }, "temperature_unit": { "type": "string" }, "detailed_forecast": { "type": [ "string", "null" ] }, "chance_of_precipitation_percent": { "type": [ "integer", "null" ] } }, "additionalProperties": false }, "description": "Day and night forecast periods in time order." }, "latitude": { "type": "number", "description": "Latitude of the matched place.", "x-fous-developer": true }, "longitude": { "type": "number", "description": "Longitude of the matched place.", "x-fous-developer": true }, "update_time": { "type": "string", "description": "Time the forecast was updated, ISO 8601 with offset." }, "matched_place": { "type": "string", "description": "Matched U.S. place or address." }, "forecast_office": { "type": "string", "description": "Name of the responsible National Weather Service office." }, "forecast_grid_position": { "type": "string", "description": "NWS office and grid coordinates.", "x-fous-developer": true } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
weather.gov/get_forecast- Returns
- matched place, forecast office, update time, grid position, coordinates, and day and night forecast periods
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 weather.gov/get_forecast with the inputs above.
Ask your agent
- What's the seven-day forecast for Denver, CO with day and night periods in fahrenheit?
- Can you pull up the NWS weekly forecast for ZIP code 10001 in celsius?
- I need the 7-day weather outlook for 1600 Pennsylvania Ave NW, Washington DC, including overnight lows.
- Check weather.gov for the coming week's forecast in Austin, Texas, please.
- Get me the National Weather Service day and night forecast for Portland, OR 97205 using celsius units.
See more
All NWS methodsLooks up a US city, street address or ZIP code and returns up to 156 hourly National Weather Service forecasts for it.
weather.gov/get_hourly_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_conditionsLists active US weather watches, warnings and advisories for a city, address, ZIP code or state, most severe first, then newest.
weather.gov/list_weather_alertsGets The Weather Channel's daily forecast for a city, address, ZIP code or postcode: up to 15 upcoming days with highs, lows, conditions, rain chance, wind, humidity, UV and sun times.
weather.com/get_daily_forecastGets up to 10 days of MSN Weather forecasts for a city, address, or ZIP code, with optional hourly forecasts for the next 24 hours.
msn.com/get_forecastGets current conditions and today's high and low from The Weather Channel for a city, postcode, ZIP code or street address worldwide. Street addresses are geocoded exactly first; some observations omit gusts or other measurements.
weather.com/get_current_weatherGets 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_weatherGets current MSN Weather conditions for a city, address or ZIP code. The place is found through OpenStreetMap Nominatim. Matches for broad searches are approximate.
msn.com/get_current_weather