Weather Data Scraper avatar

Weather Data Scraper

Pricing

Pay per usage

Go to Apify Store
Weather Data Scraper

Weather Data Scraper

Get weather forecasts and historical data from weather.com for any location worldwide. Supports 10-day daily forecasts, 48 hour hourly forecasts, and past weather observations with detailed hourly readings.

Pricing

Pay per usage

Rating

5.0

(1)

Developer

Filip Cicvárek

Filip Cicvárek

Maintained by Community

Actor stats

1

Bookmarked

32

Total users

6

Monthly active users

2 days ago

Last modified

Categories

Share

Get weather forecasts and historical observations from weather.com and Weather Underground for any location worldwide. This Actor provides structured JSON data for 10-day daily forecasts, 48-hour hourly forecasts, and historical weather observations with detailed hourly readings.

Features

  • 10-Day Daily Forecast - Get high/low temperatures, conditions, precipitation chance, humidity, and wind for the next 10 days
  • 48-Hour Hourly Forecast - Detailed hour-by-hour forecast including feels-like temperature, UV index, and cloud cover
  • Historical Weather Data - Access past weather observations, with optional hourly readings. Choose your source: personal weather stations (PWS, the default) for real precipitation and wind gusts, or official airport stations for the most reliable standardized data
  • Global Coverage - Works with any city worldwide, automatically finds the nearest weather station
  • Flexible Units - Choose between metric (Celsius, km/h, hPa) or imperial (Fahrenheit, mph, inHg)

Use Cases

  • Travel Planning - Check weather conditions at your destination before booking
  • Event Planning - Review historical weather to choose the best date for outdoor events
  • Agriculture - Analyze weather patterns for crop planning and irrigation scheduling
  • Research & Analytics - Climate data analysis and trend detection
  • Insurance - Weather verification for claims processing
  • Energy Sector - Solar and wind power forecasting based on historical patterns
  • Retail - Weather-based demand planning for seasonal products
  • Construction - Project scheduling based on weather conditions
  • Sports & Recreation - Plan outdoor activities with accurate forecasts
  • Logistics - Route planning considering weather impacts

Input Parameters

ParameterTypeRequiredDescription
dataTypestringYesType of weather data: forecast-daily, forecast-hourly, or history
locationsarrayYesList of city names (e.g., "San Francisco, CA", "Prague", "Tokyo, Japan")
startDatestringFor historyStart date in YYYY-MM-DD format (required for historical data)
endDatestringNoEnd date for historical range (defaults to startDate if not provided)
historyDetailstringNoDetail level for historical data: daily (summary only) or hourly (includes hourly observations). Default: hourly
historySourcestringNoSource for historical data: pws (personal weather stations, includes precipitation & gusts) or airport (official stations, most reliable, no precipitation). Default: pws
unitsstringNometric or imperial (default: metric)

Location Formats

The Actor accepts city names in various formats:

  • City only: Prague, Tokyo, Sydney
  • City, State/Region: San Francisco, CA, Munich, Bavaria
  • City, Country: London, UK, Paris, France, Tokyo, Japan

The API automatically finds the nearest weather station for your location. Forecasts use The Weather Channel models for the location's coordinates. Historical data uses whichever source you pick with historySource:

  • pws (default): the nearest Weather Underground personal weather stations, which report precipitation and wind gusts. If the closest station has no data for a date, the Actor falls back to the next-nearest station. Data quality varies by station (see Limitations).
  • airport: the nearest official airport/METAR station — standardized and more reliable, but it does not report precipitation.

Output Examples

All data types output one row per day for consistency.

10-Day Daily Forecast

Returns 10 rows (one per day) with flat structure:

{
"location": "San Francisco, CA",
"stationCode": "KSFO",
"stationName": "San Francisco",
"dataType": "forecast-daily",
"date": "2025-01-15",
"dayOfWeek": "Wednesday",
"units": "metric",
"scrapedAt": "2025-01-15T10:30:00.000Z",
"highTemp": 15,
"lowTemp": 9,
"conditions": "Partly Cloudy",
"precipChance": 10,
"humidity": 65,
"windSpeed": 12,
"windDirection": "W"
}

48-Hour Hourly Forecast

Returns 2-3 rows (one per day) with hourly data array:

{
"location": "San Francisco, CA",
"stationCode": "KSFO",
"stationName": "San Francisco",
"dataType": "forecast-hourly",
"date": "2025-01-15",
"units": "metric",
"scrapedAt": "2025-01-15T10:30:00.000Z",
"hourlyForecast": [
{
"time": "2025-01-15T11:00:00-08:00",
"temp": 12,
"feelsLike": 10,
"humidity": 68,
"windSpeed": 15,
"windDirection": "W",
"precipChance": 5,
"cloudCover": 40,
"uvIndex": 3,
"conditions": "Partly Cloudy"
}
]
}

Historical Data

Returns one row per day with summary and optional hourly observations:

{
"location": "San Francisco, CA",
"stationCode": "KCASANFR49",
"stationName": "San Francisco",
"dataType": "history",
"date": "2025-01-10",
"units": "metric",
"scrapedAt": "2025-01-15T10:30:00.000Z",
"summary": {
"highTemp": 14,
"lowTemp": 8,
"avgTemp": 11,
"precipitation": 2.3,
"dewPoint": 6,
"maxWindSpeed": 18,
"avgWindSpeed": 10,
"pressure": 1015.2,
"visibility": 16
},
"hourlyObservations": [
{
"time": "2025-01-10 00:59:57",
"temp": 9,
"dewPoint": 6,
"humidity": 78,
"windSpeed": 8,
"windDirection": "NW",
"windGust": 14,
"pressure": 1016.5,
"precipRate": 0.5,
"precipAccum": 1.8,
"conditions": "Light Rain"
}
]
}

Note on historical fields (default pws source): stationCode is the PWS station used (e.g., KCASANFR49). precipRate, precipAccum, and windGust are reported by PWS stations. precipAccum is the cumulative precipitation for the day up to that observation. conditions and summary.visibility are not measured by PWS stations, so they are backfilled from the nearest airport station (conditions from the observation at the closest time, visibility as the day's average). They fall back to empty/null only when no airport observations are available.

With historySource: airport, stationCode is the airport ICAO code (e.g., KSFO), conditions comes directly from the station, and precipRate/precipAccum are usually null (airport observations rarely include precipitation).

Data Sources

This Actor fetches data through The Weather Company's API (which powers both weather.com and Weather Underground), providing:

  • Forecasts from The Weather Channel's weather prediction models
  • Historical observations from your choice of source (historySource): Weather Underground's network of personal weather stations (PWS, default), which measure precipitation and wind gusts, or official airport/METAR stations, which are standardized and more reliable but do not report precipitation
  • For the PWS source, condition phrases (e.g., "Light Rain") and visibility are backfilled from the nearest airport station
  • Data available for thousands of stations worldwide

Limitations

  • Historical Data Range: Historical observations go back several years for well-covered areas.
  • Data quality (PWS source): The default pws source is a crowdsourced network of amateur weather stations. Quality varies with station hardware, placement, and maintenance — temperature can read high (poor siting) and wind can read low (low anemometer height). Weather Underground applies automated quality control. For standardized, professionally maintained data, use historySource: airport (at the cost of precipitation).
  • Fields not measured by PWS: with the pws source, conditions (weather phrase) and summary.visibility are backfilled from the nearest airport station and may be empty/null when no airport observations are available. The airport source reports both directly. Both are fully available for forecasts.
  • Precipitation (airport source): the airport source rarely reports precipitation, so precipRate/precipAccum are usually null (this is why pws is the default). Use pws when you need precipitation.
  • Rate Limits: The Actor includes built-in delays to respect API rate limits.
  • Station Coverage: PWS density varies by location. The Actor tries the nearest stations in order and falls back to the next one when a station has no data for a date; very remote areas may have no nearby PWS.