# Weather Underground API

> Weather Underground returns historical weather observations and daily summaries, available as a workflow and API.

Weather Underground (Wunderground) provides historical daily weather and time-ordered airport observations for a past date. Get historical weather needs a past date and a city, airport, or ZIP code; measurement units are optional.

- Page: https://fous.com/tools/weather-underground
- Handle: `@weather-underground`
- Category: [Weather](https://fous.com/tools/category/weather)
- Source website: https://wunderground.com
- Last verified: Sep 29, 2026

## Methods

### Get historical weather

Operation `get_historical_weather`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get daily weather and time-ordered airport observations for a past date near a city, airport, or ZIP code. Summary averages use available observations; missing measurements are null.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `date` | string | yes | `"2020-01-01"` | Past date in YYYY-MM-DD format, for example 2024-07-04. |
| `units` | string | no | `"metric"` | Measurement system, for example imperial. |
| `location` | string | yes | `"02108"` | City, airport, or ZIP code, for example Boston or 02108. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "location",
    "date"
  ],
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Past date in YYYY-MM-DD format, for example 2024-07-04.",
      "examples": [
        "2020-01-01",
        "2024-07-04"
      ]
    },
    "units": {
      "enum": [
        "imperial",
        "metric"
      ],
      "type": "string",
      "default": "imperial",
      "description": "Measurement system, for example imperial.",
      "examples": [
        "metric"
      ]
    },
    "location": {
      "type": "string",
      "description": "City, airport, or ZIP code, for example Boston or 02108.",
      "examples": [
        "02108",
        "Boston",
        "New York City"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "date": "2020-01-01",
      "units": "metric",
      "location": "02108"
    },
    {
      "date": "2024-07-04",
      "location": "Boston"
    },
    {
      "date": "2024-07-04",
      "location": "New York City"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `date` | string | `"2020-01-01"` |  |
| `units` | object |  |  |
| `units.pressure` | string | `"hPa"` |  |
| `units.wind_speed` | string | `"km/h"` |  |
| `units.temperature` | string | `"°C"` |  |
| `units.precipitation` | string | `"mm"` |  |
| `page_url` | string | `"https://www.wunderground.com/history/daily/us/ma/boston/KBOS/date/2020-01-01"` |  |
| `observations` | array |  |  |
| `observations[].pressure` | number or null | `998.95` |  |
| `observations[].dew_point` | number or null | `0` |  |
| `observations[].wind_gust` | number or null | `35` |  |
| `observations[].conditions` | string or null | `"Cloudy"` |  |
| `observations[].local_time` | string | `"2020-01-01T00:54:00-05:00"` | Local time with UTC offset. |
| `observations[].wind_speed` | number or null | `19` |  |
| `observations[].temperature` | number or null | `4` |  |
| `observations[].precipitation` | number or null | `0` |  |
| `observations[].wind_direction` | string or null | `"WSW"` |  |
| `observations[].humidity_percent` | number or null | `73` |  |
| `station_code` | string | `"KBOS"` |  |
| `station_name` | string | `"Logan Intl Airport"` |  |
| `daily_summary` | object |  |  |
| `daily_summary.low_temperature` | number or null | `2` |  |
| `daily_summary.average_pressure` | number or null | `1002.72` |  |
| `daily_summary.high_temperature` | number or null | `6` |  |
| `daily_summary.maximum_wind_speed` | number or null | `33` |  |
| `daily_summary.average_temperature` | number or null | `3.79` |  |
| `daily_summary.total_precipitation` | number or null | `1.02` |  |
| `daily_summary.average_humidity_percent` | number or null | `55.04` |  |

**Example input**

```json
{
  "date": "2020-01-01",
  "units": "metric",
  "location": "02108"
}
```

**Example output**

```json
{
  "date": "2020-01-01",
  "units": {
    "pressure": "hPa",
    "wind_speed": "km/h",
    "temperature": "°C",
    "precipitation": "mm"
  },
  "page_url": "https://www.wunderground.com/history/daily/us/ma/boston/KBOS/date/2020-01-01",
  "observations": [
    {
      "pressure": 998.95,
      "dew_point": 0,
      "wind_gust": null,
      "conditions": "Cloudy",
      "local_time": "2020-01-01T00:54:00-05:00",
      "wind_speed": 19,
      "temperature": 4,
      "precipitation": 0,
      "wind_direction": "WSW",
      "humidity_percent": 73
    },
    {
      "pressure": 999.63,
      "dew_point": -2,
      "wind_gust": 35,
      "conditions": "Cloudy",
      "local_time": "2020-01-01T01:54:00-05:00",
      "wind_speed": 28,
      "temperature": 4,
      "precipitation": 0,
      "wind_direction": "WSW",
      "humidity_percent": 65
    },
    {
      "pressure": 999.97,
      "dew_point": -2,
      "wind_gust": 35,
      "conditions": "Cloudy",
      "local_time": "2020-01-01T02:54:00-05:00",
      "wind_speed": 26,
      "temperature": 4,
      "precipitation": 0,
      "wind_direction": "W",
      "humidity_percent": 65
    }
  ],
  "station_code": "KBOS",
  "station_name": "Logan Intl Airport",
  "daily_summary": {
    "low_temperature": 2,
    "average_pressure": 1002.72,
    "high_temperature": 6,
    "maximum_wind_speed": 33,
    "average_temperature": 3.79,
    "total_precipitation": 1.02,
    "average_humidity_percent": 55.04
  }
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@weather-underground",
  "visibility": "public",
  "operation": "get_historical_weather",
  "version": 1,
  "input": {
    "date": "2020-01-01",
    "units": "metric",
    "location": "02108"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@weather-underground\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_historical_weather\",\n  \"version\": 1,\n  \"input\": {\n    \"date\": \"2020-01-01\",\n    \"units\": \"metric\",\n    \"location\": \"02108\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@weather-underground",
  "visibility": "public",
  "operation": "get_historical_weather",
  "version": 1,
  "input": {
    "date": "2020-01-01",
    "units": "metric",
    "location": "02108"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/weather-underground`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_historical_weather`: Get historical weather. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-weather-underground https://api.fous.com/mcp/tools/weather-underground --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Review past temperatures and precipitation for a location
- Compare hourly airport observations across dates
- Summarize daily wind, pressure, and humidity
- Check historical conditions near a city or ZIP code

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Weather Underground tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Weather Underground account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from wunderground.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What was the weather in a city on a past date?

Get historical weather returns daily summaries and time-ordered observations for a past date and city.

### What were the temperatures and precipitation that day?

Get historical weather includes daily high, low, and average temperatures, total precipitation, and observations.

### Which airport observations are available for a past date?

Get historical weather returns time-ordered airport observations, including local time, conditions, wind, and humidity.

## Related

- [The Weather Channel API](https://fous.com/tools/the-weather-channel.md): The Weather Channel returns current conditions, today’s high/low, up to 15 daily forecasts (sometimes fewer), 1–48 local hourly forecasts, and active severe weather alerts.
- [National Weather Service API](https://fous.com/tools/national-weather-service.md): National Weather Service provides U.S. day-and-night forecasts for seven days, hourly forecasts for up to 156 hours where available, active alerts, and latest nearby station observations.
- [AccuWeather API](https://fous.com/tools/accuweather.md): AccuWeather provides current conditions and RealFeel, plus up to 15 available daily forecasts; shorter public forecasts may return fewer days.
- [MSN Weather API](https://fous.com/tools/msn-weather.md): MSN Weather provides current conditions and forecasts for places worldwide, including up to 10 days ahead and optional hourly forecasts for the next 24 hours.
- [IQAir API](https://fous.com/tools/iqair.md): City air quality readings and forecasts from IQAir.
- [Time and Date API](https://fous.com/tools/time-and-date.md): Time and Date provides current city times, zones, daylight-saving changes; meeting conversions (1970–2030); daily solar times and twilight; and business-day counts based on published holiday calendars.
- [FlightAware API](https://fous.com/tools/flightaware.md): FlightAware provides public flight status and dated flight details, airport arrivals and departures limited to displayed history and 20 flights per direction, plus today’s delays and cancellations when shown.
- [AirNow API](https://fous.com/tools/airnow.md): Current and forecast air quality for reporting areas in the United States and covered cities in Canada and Mexico.
- [All Weather tools](https://fous.com/tools/category/weather)
