wunderground APIwunderground.com ↗
Access real-time PWS observations, 7-day forecasts, and hourly historical weather data from Weather Underground via 6 structured endpoints.
What is the wunderground API?
The Weather Underground API exposes 6 endpoints covering current PWS station observations, 7-day forecasts, and hourly historical records for both personal weather stations and airport stations worldwide. The get_current_weather endpoint returns live readings including temperature, humidity, UV index, wind speed and direction, and barometric pressure for any PWS station ID. The search endpoint resolves city or airport names into the coordinates and station codes required by every other endpoint.
curl -X GET 'https://api.parse.bot/scraper/4645f09c-8fa2-4177-b560-e0c577209ea0/get_current_weather?units=m&station_id=ILONDO440' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace wunderground-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Weather Underground SDK — bounded, re-runnable; every call capped."""
from parse_apis.weather_underground_api import WeatherUnderground, UnitSystem, StationNotFound
wu = WeatherUnderground()
# Search for a location to discover station IDs and coordinates
result = wu.searchresults.search(query="London")
print(result.location["city"][0], result.location["latitude"][0], result.location["pwsId"][0])
# Get current weather for a PWS station (constructible)
station = wu.station("ILONDO440")
weather = station.current_weather(units=UnitSystem.METRIC)
print(weather.temp, weather.humidity, weather.wind_dir, weather.pressure)
# Get forecast for a location by coordinates
forecast = wu.forecasts.get(lat=51.5074, lon=-0.1278, units=UnitSystem.METRIC)
print(forecast.daily["dayOfWeek"][0], forecast.daily["narrative"][0])
# Browse PWS hourly history (last 7 days)
for obs in station.hourly_history(limit=3):
print(obs.obs_time_utc, obs.humidity_avg, obs.solar_radiation_high)
# Access airport historical observations via sub-resource
airport = wu.station("KJFK")
try:
for obs in airport.history.list(start_date="20260601", end_date="20260603", country_code="US", limit=5):
print(obs.temp, obs.wx_phrase, obs.wdir_cardinal, obs.pressure)
except StationNotFound as exc:
print(f"Station not found: {exc.station_id}")
print("exercised: searchresults.search / station.current_weather / forecasts.get / station.hourly_history / station.history.list")
Get current weather conditions for a PWS station. Returns the most recent observation including temperature, humidity, wind speed/direction, solar radiation, pressure, precipitation, and UV index. The station_id should be a PWS ID (e.g. ILONDO440) obtainable from the search endpoint's pwsId field.
| Param | Type | Description |
|---|---|---|
| units | string | Unit system: 'm' for metric, 'e' for english/imperial. |
| station_idrequired | string | PWS Station ID (e.g. ILONDO440). Obtain from search endpoint's pwsId field. |
{
"type": "object",
"fields": {
"uv": "number or null, UV index",
"lat": "number, station latitude",
"lon": "number, station longitude",
"temp": "number, temperature in selected units",
"time": "string, local observation time",
"humidity": "integer, relative humidity percentage",
"pressure": "number, barometric pressure",
"wind_dir": "string, cardinal wind direction",
"station_id": "string, the PWS station identifier",
"wind_speed": "number, wind speed in selected units",
"precip_rate": "number, precipitation rate",
"precip_total": "number, total precipitation",
"solar_radiation": "number or null, solar radiation in W/m²"
},
"sample": {
"data": {
"uv": 6,
"lat": 51.511337,
"lon": -0.127,
"temp": 13,
"time": "2026-06-10 10:27:28",
"humidity": 56,
"pressure": 1015.34,
"wind_dir": "WNW",
"station_id": "ILONDO440",
"wind_speed": 4,
"precip_rate": 0,
"precip_total": 0,
"solar_radiation": 624.2
},
"status": "success"
}
}About the wunderground API
What the API Covers
This API surfaces data from Weather Underground across four data types: real-time station readings, multi-day forecasts, historical airport observations, and PWS hourly history. Station discovery starts at search, which accepts a location keyword and returns parallel arrays of address, city, latitude, longitude, icaoCode, pwsId, and iataCode for each matched location. Those identifiers are the inputs to every other endpoint.
Current Conditions and Forecasts
get_current_weather accepts a station_id (PWS format, e.g. ILONDO440) and an optional units parameter ('m' for metric, 'e' for imperial). The response includes temp, humidity, wind_speed, wind_dir, pressure, uv, and the station's lat/lon coordinates. get_forecast works from coordinates (lat, lon) and returns a daily object with 7-day arrays — calendarDayTemperatureMax, calendarDayTemperatureMin, dayOfWeek, and narrative — plus a hourly object covering 48 hours with temperature, precipChance, windSpeed, windDirectionCardinal, and wxPhraseLong.
Historical Data
get_historical_airport queries a date range using start_date and end_date in YYYYMMDD format against an ICAO-coded airport station. Each observation in the returned array includes temp, pressure, rh (relative humidity), wspd, wdir_cardinal, wx_phrase, vis (visibility), feels_like, and uv_index. A metadata object describes the location, language, and unit system. get_monthly_observations wraps the same format but accepts a year and month integer pair, automatically covering the full calendar month — convenient for bulk analysis. For PWS stations specifically, get_pws_hourly_history returns the last 7 days of hourly readings including solarRadiationHigh, humidityAvg, winddirAvg, and a nested metric sub-object with precipitation totals and temperature highs/lows.
Station Coverage and Units
PWS coverage depends on the density of Weather Underground's contributor network, which is strongest in North America and Western Europe. Airport stations use ICAO codes and are available globally wherever ICAO-coded stations report. All endpoints that accept a units parameter default behavior should be tested per your target region; metric ('m') and imperial ('e') are the two supported options.
The wunderground API is a managed, monitored endpoint for wunderground.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when wunderground.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official wunderground.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Display live hyperlocal temperature and UV readings on a neighborhood dashboard using
get_current_weatherwith a PWS ID. - Build a 7-day forecast widget for any coordinates using the
calendarDayTemperatureMax,calendarDayTemperatureMin, andnarrativefields fromget_forecast. - Analyze month-over-month precipitation trends at an airport using
get_monthly_observationsfor consecutive months. - Power a construction site weather log by pulling the last 7 days of solar radiation and wind gusts from
get_pws_hourly_history. - Resolve a city name to PWS and ICAO station IDs via
searchbefore feeding them into observation or forecast endpoints. - Backfill climate data for an insurance model using
get_historical_airportover a multi-week date range with hourlytemp,pressure, andvisreadings. - Correlate hourly
feels_likeandwx_phraseairport observations with flight delay records for operational research.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Weather Underground have an official developer API?+
What distinguishes `get_historical_airport` from `get_monthly_observations`?+
get_historical_airport accepts arbitrary start_date and end_date strings in YYYYMMDD format, so you can request any date range spanning days or weeks. get_monthly_observations accepts year and month integers and automatically covers the full calendar month. Both return the same observation array format with fields like temp, rh, wspd, wx_phrase, and uv_index.Can I retrieve historical observations for a PWS station beyond the last 7 days?+
get_pws_hourly_history covers only the last 7 days for PWS stations. Longer historical ranges are available through get_historical_airport and get_monthly_observations, but those endpoints require an ICAO airport station code, not a PWS ID. You can fork this API on Parse and revise it to add a dedicated long-range PWS history endpoint if that capability is needed.Does the forecast endpoint return hourly data beyond 48 hours?+
hourly object from get_forecast covers the next 48 hours. The daily object extends to 7 days but at day-level granularity — temperature ranges, narrative summaries, and daypart breakdowns rather than per-hour values. You can fork this API on Parse and revise it to add extended hourly forecast coverage if a longer window is required.Are there coverage gaps for PWS stations in certain regions?+
search endpoint will return available pwsId values for a location; if none are returned, no contributing stations are registered nearby. Airport ICAO stations have broader global coverage for historical and current data.