NWS API: Get hourly forecast
Looks up a US city, street address or ZIP code and returns up to 156 hourly National Weather Service forecasts for it.
Unofficial. Not affiliated with or endorsed by NWS.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Hours optional
hours Number of hourly forecasts, e.g. 48.
48
Whole number from 1 to 156. Default
48.- Units optional
units Temperature scale, e.g. fahrenheit.
fahrenheit
One of
fahrenheit,celsius. Defaultfahrenheit.- Location, required
location US city and state, street address, or ZIP code, e.g. Miami, FL.
Miami, FL
2 characters or more.
Input as JSON
{ "hours": 48, "units": "fahrenheit", "location": "Miami, FL"}Output
{ "hours": [ { "dew_point": 68, "page_link": "https://forecast.weather.gov/MapClick.php?lat=25.77427&lon=-80.19366&FcstType=digital" , "start_time": "2026-10-23T03:00:00-04:00", "wind_speed": "13 mph", "temperature": 75, "dew_point_unit": "fahrenheit", "short_forecast": "Partly Cloudy", "wind_direction": "N", "temperature_unit": "fahrenheit", "relative_humidity_percent": 79, "chance_of_precipitation_percent": 10 }, { "dew_point": 67, "page_link": "https://forecast.weather.gov/MapClick.php?lat=25.77427&lon=-80.19366&FcstType=digital" , "start_time": "2026-10-23T04:00:00-04:00", "wind_speed": "13 mph", "temperature": 75, "dew_point_unit": "fahrenheit", "short_forecast": "Partly Cloudy", "wind_direction": "N", "temperature_unit": "fahrenheit", "relative_humidity_percent": 76, "chance_of_precipitation_percent": 7 }, { "dew_point": 67, "page_link": "https://forecast.weather.gov/MapClick.php?lat=25.77427&lon=-80.19366&FcstType=digital" , "start_time": "2026-10-23T05:00:00-04:00", "wind_speed": "14 mph", "temperature": 74, "dew_point_unit": "fahrenheit", "short_forecast": "Partly Cloudy", "wind_direction": "N", "temperature_unit": "fahrenheit", "relative_humidity_percent": 79, "chance_of_precipitation_percent": 9 } ], "grid_x": 110, "grid_y": 51, "latitude": 25.77427, "longitude": -80.19366, "updated_at": "2026-10-23T07:51:45+00:00", "matched_place": "Miami, Florida, United States", "forecast_office": "MFL"}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"weather.gov/get_hourly_forecast","input":{"hours":48,"units":"fahrenheit","location":"Miami, FL"}}' # 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_hourly_forecast" , "input": { "hours": 48, "units": "fahrenheit", "location": "Miami, FL" }})# 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_hourly_forecast" , "input": { "hours": 48, "units": "fahrenheit", "location": "Miami, FL" } }), 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_hourly_forecast# with {"hours":48,"units":"fahrenheit","location":"Miami, FL"}"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": { "hours": { "type": "integer", "default": 48, "maximum": 156, "minimum": 1, "description": "Number of hourly forecasts, e.g. 48." }, "units": { "enum": [ "fahrenheit", "celsius" ], "type": "string", "default": "fahrenheit", "description": "Temperature scale, e.g. fahrenheit." }, "location": { "type": "string", "minLength": 2, "description": "US city and state, street address, or ZIP code, e.g. Miami, FL." } }, "additionalProperties": false}Output schema
{ "type": "object", "required": [ "matched_place", "updated_at", "latitude", "longitude", "forecast_office", "grid_x", "grid_y", "hours" ], "properties": { "hours": { "type": "array", "items": { "type": "object", "required": [ "start_time", "temperature", "temperature_unit", "chance_of_precipitation_percent", "relative_humidity_percent", "dew_point", "dew_point_unit", "wind_speed", "wind_direction", "short_forecast", "page_link" ], "properties": { "dew_point": { "type": [ "number", "null" ], "description": "Dew point in the same scale as the temperature." }, "page_link": { "type": "string", "description": "Official hourly forecast page for this place." }, "start_time": { "type": "string", "description": "Local hourly start time in ISO 8601 with offset." }, "wind_speed": { "type": [ "string", "null" ], "description": "Wind speed as forecast text with units." }, "temperature": { "type": [ "number", "null" ], "description": "Forecast temperature." }, "dew_point_unit": { "type": "string", "description": "Dew point scale." }, "short_forecast": { "type": [ "string", "null" ], "description": "Short forecast in words." }, "wind_direction": { "type": [ "string", "null" ], "description": "Wind direction as text." }, "temperature_unit": { "type": "string", "description": "Temperature scale." }, "relative_humidity_percent": { "type": [ "number", "null" ], "description": "Relative humidity in percent." }, "chance_of_precipitation_percent": { "type": [ "number", "null" ], "description": "Chance of precipitation in percent." } }, "additionalProperties": false }, "description": "One row for each available forecast hour, in time order." }, "grid_x": { "type": "integer", "description": "Forecast office horizontal grid coordinate." }, "grid_y": { "type": "integer", "description": "Forecast office vertical grid coordinate." }, "latitude": { "type": "number", "description": "Latitude of the mapped location." }, "longitude": { "type": "number", "description": "Longitude of the mapped location." }, "updated_at": { "type": [ "string", "null" ], "description": "Last forecast update in ISO 8601 with offset." }, "matched_place": { "type": "string", "description": "Place matched to the location." }, "forecast_office": { "type": "string", "description": "Forecast office code." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
weather.gov/get_hourly_forecast- Returns
- matched place, coordinates, forecast office, hourly temperature, precipitation, humidity, dew point, wind and conditions
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_hourly_forecast with the inputs above.
Ask your agent
- What's the hour-by-hour forecast for Austin, TX over the next 3 days in Fahrenheit?
- I need hourly temperature, wind and rain chances for 90210 for the next 60 hours.
- Give me the next 24 hours of weather conditions in Celsius for 1600 Pennsylvania Ave NW, Washington DC.
- Can you pull up an hourly forecast on weather.gov for Portland, OR covering the next 12 hours?
- Show me humidity, dew point and hourly conditions for Denver, CO for the next 156 hours.
See more
All NWS methodsLooks 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_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 next 1 to 48 hourly forecasts for a city, address, ZIP code or postcode from The Weather Channel, with times local to the matched place.
weather.com/get_hourly_forecastGets 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_weather