Weather Underground API: Get historical weather
Gets daily weather and time-ordered airport observations for a past date near a city, airport, or ZIP code. Summary averages use the available observations; missing measurements are null.
Unofficial. Not affiliated with or endorsed by Weather Underground.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Date, required
date Past date in YYYY-MM-DD format, for example 2024-07-04.
2024-07-04
- Units optional
units Measurement system, for example imperial.
imperial
One of
imperial,metric. Defaultimperial.- Location, required
location City, airport, or ZIP code, for example Boston or 02108.
Boston
Input as JSON
{ "date": "2024-07-04", "units": "imperial", "location": "Boston"}Output
{ "date": "2024-07-04", "units": { "pressure": "inHg", "wind_speed": "mph", "temperature": "°F", "precipitation": "in" }, "page_url": "https://www.wunderground.com/history/daily/us/ma/boston/KBOS/date/2024-07-04" , "observations": [ { "pressure": 30.03, "dew_point": 53, "wind_gust": null, "conditions": "Fair", "local_time": "2024-07-04T00:54:00-04:00", "wind_speed": 12, "temperature": 67, "precipitation": 0, "wind_direction": "SW", "humidity_percent": 61 }, { "pressure": 30.02, "dew_point": 54, "wind_gust": null, "conditions": "Fair", "local_time": "2024-07-04T01:54:00-04:00", "wind_speed": 8, "temperature": 67, "precipitation": 0, "wind_direction": "SSW", "humidity_percent": 63 }, { "pressure": 30.01, "dew_point": 55, "wind_gust": null, "conditions": "Fair", "local_time": "2024-07-04T02:54:00-04:00", "wind_speed": 9, "temperature": 66, "precipitation": 0, "wind_direction": "SSW", "humidity_percent": 68 } ], "station_code": "KBOS", "station_name": "Logan Intl Airport", "daily_summary": { "low_temperature": 65, "average_pressure": 29.91, "high_temperature": 85, "maximum_wind_speed": 16, "average_temperature": 74.08, "total_precipitation": 0, "average_humidity_percent": 71.71 }}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"wunderground.com/get_historical_weather","input":{"date":"2024-07-04","units":"imperial","location":"Boston"}}' # 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": "wunderground.com/get_historical_weather" , "input": { "date": "2024-07-04", "units": "imperial", "location": "Boston" }})# 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": "wunderground.com/get_historical_weather" , "input": { "date": "2024-07-04", "units": "imperial", "location": "Boston" } }), 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 wunderground.com/get_historical_weather# with {"date":"2024-07-04","units":"imperial","location":"Boston"}"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", "date" ], "properties": { "date": { "type": "string", "description": "Past date in YYYY-MM-DD format, for example 2024-07-04." }, "units": { "enum": [ "imperial", "metric" ], "type": "string", "default": "imperial", "description": "Measurement system, for example imperial." }, "location": { "type": "string", "minLength": 1, "description": "City, airport, or ZIP code, for example Boston or 02108." } }}Output schema
{ "type": "object", "required": [ "station_name", "station_code", "date", "page_url", "units", "daily_summary", "observations" ], "properties": { "date": { "type": "string" }, "units": { "type": "object", "properties": { "pressure": { "type": "string" }, "wind_speed": { "type": "string" }, "temperature": { "type": "string" }, "precipitation": { "type": "string" } } }, "page_url": { "type": "string" }, "observations": { "type": "array", "items": { "type": "object", "properties": { "pressure": { "type": [ "number", "null" ] }, "dew_point": { "type": [ "number", "null" ] }, "wind_gust": { "type": [ "number", "null" ] }, "conditions": { "type": [ "string", "null" ] }, "local_time": { "type": "string" }, "wind_speed": { "type": [ "number", "null" ] }, "temperature": { "type": [ "number", "null" ] }, "precipitation": { "type": [ "number", "null" ] }, "wind_direction": { "type": [ "string", "null" ] }, "humidity_percent": { "type": [ "number", "null" ] } } } }, "station_code": { "type": "string" }, "station_name": { "type": "string" }, "daily_summary": { "type": "object", "properties": { "low_temperature": { "type": [ "number", "null" ] }, "average_pressure": { "type": [ "number", "null" ] }, "high_temperature": { "type": [ "number", "null" ] }, "maximum_wind_speed": { "type": [ "number", "null" ] }, "average_temperature": { "type": [ "number", "null" ] }, "total_precipitation": { "type": [ "number", "null" ] }, "average_humidity_percent": { "type": [ "number", "null" ] } } } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
wunderground.com/get_historical_weather- Returns
- station, page URL, units, daily summary, hourly observations
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 wunderground.com/get_historical_weather with the inputs above.
Ask your agent
- What was the weather like in Chicago on 2023-12-25? I need the daily highs, lows, and hourly readings.
- Pull historical observations for Denver International Airport on 2024-02-14 in metric units.
- Can you get the past daily weather summary and hourly temperature and wind for ZIP code 94103 on 2022-08-09?
- On wunderground, show me the hourly conditions at Miami on 2021-11-03 with imperial units.
- I need a record of what the weather was near Seattle-Tacoma airport on 2025-01-18, including precipitation and humidity by hour.
See more
Gets 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_weatherGets 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_weatherLooks 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 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 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_forecastLooks 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_forecast