# 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/workflows/weather-underground
- Handle: `@weather-underground`
- Category: [Weather](https://fous.com/workflows/category/weather)
- Source website: https://wunderground.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Weather Underground.

## Methods

### Get historical weather

Operation `get_historical_weather`, version 1. 1 credit per call.

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

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_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.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

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=120) 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.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_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);
```

Or describe the data in plain language: send `{"api":"@weather-underground","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## 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

### Is Fous affiliated with Weather Underground?

No. Fous is not affiliated with Weather Underground. This workflow reads the public wunderground.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. 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; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check 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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/iqair.md): City air quality readings and forecasts from IQAir.
- [Time and Date API](https://fous.com/workflows/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/workflows/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/workflows/airnow.md): Current and forecast air quality for reporting areas in the United States and covered cities in Canada and Mexico.
- [All Weather workflows](https://fous.com/workflows/category/weather)
