More Settings

      PWS Historical - v2

      ObservationsHistoricalGlobalAttribution: Not required

      Overview

      Personal Weather Stations (PWS) Historical Data returns the historical PWS data for a single date, returning hourly data, summary data for the entire day, or both.

      The primary use case for this data is to view historical data from previous dates. Use cases that require past data from the current day should leverage alternative PWS APIs.

      HTTP Headers and Data Lifetime — Caching and Expiration

      For details on appropriate header values as well as caching and expiration definitions, see the Weather Company Data API Common Usage Guide.

      Unit of Measure

      The unit of measure for the response. The following values are supported:

      Code Description
      e Imperial (English) units
      m Metric units

      Atomic Endpoints

      EndpointAggregate Product Name
      v2/pws/history/hourlyv2-pws-history-hourly
      v2/pws/history/allv2-pws-history-all
      v2/pws/history/dailyv2-pws-history-daily

      URL Construction

      Request by PWS Station ID

      Required: stationId, format, units, date, apiKey

      Optional: numericPrecision, startDate, endDate

      https://api.weather.com/v2/pws/history/hourly?stationId=KCAOAKLA44&format=json&units=m&date=20181001&apiKey=yourApiKey

      Valid Parameter Definitions

      Parameter Value Description
      stationId KCAOAKLA44 Any valid PWS Station ID. Used as the location query parameter.
      date YYYYMMDD The date parameter is used to call a specific date request, using format YYYYMMDD.
      startDate YYYYMMDD Start of a range of days, used with endDate. The range is limited to 31 total days. Only available on the hourly and daily endpoints.
      endDate YYYYMMDD End of a range of days, used with startDate. The range is limited to 31 total days. Only available on the hourly and daily endpoints.
      numericPrecision decimal Optional. Set to 'decimal' to ensure data is returned in decimal format. Returns integers otherwise.

      Data Elements & Definitions

      Field names are sorted alphabetically for presentation. This does not represent the sort order of the API response.

      Field Description Type Range Sample Nulls
      dewptAvg Average dew point of the period integer/decimal -80 to 100 (°F) or -62 to 37 (°C) 43 Y
      dewptHigh Maximum dew point of the period integer/decimal -80 to 100 (°F) or -62 to 37 (°C) 43 Y
      dewptLow Minimum dew point of the period integer/decimal -80 to 100 (°F) or -62 to 37 (°C) 43 Y
      epoch Time in UNIX seconds epoch 1369252800 Y
      heatindexAvg Heat index average of the period integer/decimal 68 Y
      heatindexHigh Heat index high temperature of the period integer/decimal 71 Y
      heatindexLow Heat index low temperature of the period integer/decimal 61 Y
      humidityAvg Average Humidity of the period integer/decimal 32 Y
      humidityHigh Highest Humidity of the period integer/decimal 32 Y
      humidityLow Lowest Humidity of the period integer/decimal 32 Y
      imperial | metric Object containing fields that use a defined unit of measure. The object label is dependent on the units parameter: "imperial" or "metric". object imperial: {.....} N
      lat Latitude of PWS decimal Any valid latitude value. -90 to 90 29.8972 Y
      lon Longitude of PWS decimal Any valid longitude value. -180 to 180 -97.9362 Y
      obsTimeLocal Time observation is valid in local apparent time by timezone ISO YYYY-MM-dd HH:mm:ss 2016-09-27 00:59:39 Y
      obsTimeUtc GMT (UTC) time ISO ISO 8601 - yyyy-MM-dd'T'HH:mm:ssZZ 2016-09-27T06:59:39Z Y
      precipRate Rate of precipitation - instantaneous precipitation rate. integer/decimal 0 Y
      precipTotal Accumulated rain for the day from midnight to present in defined unit of measure. integer/decimal 0 Y
      pressureMax Highest Barometric pressure of the period. integer/decimal 30.12 Y
      pressureMin Lowest Barometric pressure of the period. integer/decimal 0.01 Y
      pressureTrend Pressure tendency over the preceding period. integer/decimal 28.09 Y
      qcStatus Quality control indicator: -1: No quality control check performed. 0: Marked as possibly incorrect. 1: Passed quality control. integer -1 to 1 1 N
      solarRadiationHigh Highest Solar Radiation of the period integer/decimal 947.00 Y
      stationID ID as registered by wunderground.com string KAZTUCSO539 N
      tempAvg Temperature average of the period integer/decimal 73 Y
      tempHigh High Temperature of the period integer/decimal 87 Y
      tempLow Low Temperature of the period integer/decimal 64 Y
      tz Time zone of PWS string America/Chicago Y
      uvHigh Highest UV Index of the period integer/decimal 2.00 Y
      winddirAvg Wind direction average of the period integer/decimal 170 Y
      windchillAvg Windchill average of the period integer/decimal 32 Y
      windchillHigh High Windchill temperature of the period integer/decimal 45 Y
      windchillLow Low Windchill temperature of the period integer/decimal 35 Y
      windgustAvg Wind gust average of the period integer/decimal 54 Y
      windgustHigh Highest Wind gust of the period integer/decimal 56 Y
      windgustLow Lowest Wind gust of the period integer/decimal 43 Y
      windspeedAvg Wind speed average of the period integer/decimal 3 Y
      windspeedHigh Highest Wind speed of the period integer/decimal 5 Y
      windspeedLow Lowest Wind speed of the period integer/decimal 1 Y

      JSON Sample

      {
        "stationID": "KMAHANOV10",
        "tz": "America/New_York",
        "obsTimeUtc": "2019-02-02T05:04:58Z",
        "obsTimeLocal": "2019-02-02 00:04:58",
        "epoch": 1549083898,
        "lat": 42.09263229,
        "lon": -70.86485291,
        "solarRadiationHigh": 940.00,
        "uvHigh": 2.00,
        "winddirAvg": 225,
        "humidityHigh": 73,
        "humidityLow": 73,
        "humidityAvg": 73,
        "qcStatus": 1,
        "imperial": {
          "tempHigh": 8,
          "tempLow": 7,
          "tempAvg": 7,
          "windspeedHigh": 0,
          "windspeedLow": 0,
          "windspeedAvg": 0,
          "windgustHigh": 0,
          "windgustLow": 0,
          "windgustAvg": 0,
          "dewptHigh": 0,
          "dewptLow": 0,
          "dewptAvg": 0,
          "windchillHigh": 8,
          "windchillLow": 7,
          "windchillAvg": 7,
          "heatindexHigh": 8,
          "heatindexLow": 7,
          "heatindexAvg": 7,
          "pressureMax": 30.26,
          "pressureMin": 30.25,
          "pressureTrend": -0.12,
          "precipRate": 0,
          "precipTotal": 0
        }
      }
      Level Access
      Glossary