Daily Historical Weather

This API returns daily historical weather data from our network of over 120,000 stations as well as re-analysis data. This is daily historical data, and a request will return data from data sources within ~15km of the requested point. This API returns daily data. For hourly historical data, see the Hourly Historical Weather API.

The following per API call limitations apply (See pricing):

  • Trial Plan: 1 day per API call.
  • *Plus / Business / Enterprise plans: 28 days of data per API call.
  • Other plan(s): No access

*For convenience, up to 1 year of data can be requested per API call. However, requests that exceed 28 days will count as multiple requests against the plan daily quota. Example: 365 days = 14 requests, 180 days = 7 requests, etc.

All parameters should be supplied to the Weather API as query string parameters.

Base URL

HTTP: http://api.weatherbit.io/v2.0/history/daily
HTTPS: https://api.weatherbit.io/v2.0/history/daily
Supported Methods: GET

Request Parameters

key=[key] (REQUIRED)
  • key - Your API Key.
start_date=[YYYY-MM-DD] (REQUIRED)
end_date=[YYYY-MM-DD] (REQUIRED)
units=[units](optional)
  • M - [DEFAULT] Metric (Celsius, m/s, mm)
  • S - Scientific (Kelvin, m/s, mm)
  • I - Fahrenheit (F, mph, in)

API Endpoints

Description Required Parameters Example(s)
Get history by lat/lon (Recommended) lat, lon, start_date, end_date &lat=38.123&lon=-78.543&start_date=2024-03-25&end_date=2024-03-26
Get history by city name city, state(optional), country (optional), start_date, end_date &city=Raleigh,NC&start_date=2024-03-25&end_date=2024-03-26
Get history by postal code postal_code, country (optional), start_date, end_date &postal_code=27601&country=US&start_date=2024-03-25&end_date=2024-03-26
Get history by city id city_id, start_date, end_date &city_id=8953360&start_date=2024-03-25&end_date=2024-03-26
Get history by ICAO or station id [Use with Caution] station, start_date, end_date &station=KRDU&start_date=2024-03-25&end_date=2024-03-26

Example Request:

https://api.weatherbit.io/v2.0/history/daily?postal_code=27601&country=US&start_date=2024-03-25&end_date=2024-03-26&key=API_KEY

Example Response (JSON):


          {  
             "timezone":"America\/New_York",
             "state_code":"NC",
             "lat":35.7721,
             "lon":-78.63861,
             "country_code":"US",
             "station_id":"723060-13722",
             "sources":["723060-13722", "USC00445050", "USW00013732"],
             "data":[  
                {  
                   "rh":70.2,
                   "wind_spd":3.8,
                   "slp":1022,
                   "max_wind_spd":6.7,
                   "max_wind_dir":220,
                   "max_wind_spd_ts":1483232400,
                   "wind_gust_spd":12.7,
                   "min_temp_ts":1483272000,
                   "max_temp_ts":1483308000,
                   "dewpt":1.8,
                   "snow":0,
                   "snow_depth":1.0,
                   "precip":10.5,
                   "precip_gpm":13.5,
                   "wind_dir":189,
                   "max_dhi":736.3,
                   "dhi":88,
                   "max_temp":10,
                   "pres":1006.4,
                   "max_uv":5,
                   "t_dhi":2023.6,
                   "datetime":"2024-03-25",
                   "temp":7.86,
                   "min_temp":5,
                   "clouds":43,
                   "ts":1483228800,
                   "revision_status":"final"
                }, ...
             ],
             "city_name":"Raleigh",
             "city_id":"4487042"
          }

        

Field Decriptions:

  • lat: Latitude (Degrees).
  • lon: Longitude (Degrees).
  • timezone: Local IANA Timezone.
  • city_name: City name.
  • city_id: City ID.
  • station_id: [DEPRECATED] Nearest station.
  • country_code: Country abbreviation.
  • state_code: State abbreviation/code.
  • sources: List of data sources used in response.
  • data: [
    • datetime: Date (YYYY-MM-DD).
    • ts: Timestamp UTC (Unix Timestamp).
    • revision_status Data revision status - interim (subject to revisions) or final.
    • pres: Average pressure (mb).
    • slp: Average sea level pressure (mb).
    • wind_spd: Average wind speed (Default m/s).
    • wind_gust_spd: Wind gust speed (m/s).
    • max_wind_spd: Maximum 2 minute wind speed (m/s).
    • wind_dir: Average wind direction (degrees).
    • max_wind_dir: Direction of maximum 2 minute wind gust (degrees).
    • max_wind_ts: Time of maximum wind gust UTC (Unix Timestamp).
    • temp: Average temperature (default Celsius).
    • max_temp: Maximum temperature (default Celsius).
    • min_temp: Minimum temperature (default Celsius).
    • max_temp_ts: Time of daily maximum temperature UTC (Unix Timestamp).
    • min_temp_ts: Time of daily minimum temperature UTC (Unix Timestamp).
    • rh: Average relative humidity (%).
    • dewpt: Average dew point (default Celsius).
    • clouds: [Satellite based] average cloud coverage (%).
    • precip: Accumulated precipitation (default mm).
    • precip_gpm: Accumulated precipitation [satellite/radar estimated] (default mm).
    • snow: Accumulated snowfall (default mm).
    • snow_depth: Snow Depth (default mm).
    • solar_rad: Average solar radiation (W/M^2)
    • t_solar_rad: Total solar radiation (W/M^2)
    • ghi: Average global horizontal solar irradiance (W/m^2).
    • t_ghi: Day total global horizontal solar irradiance (W/m^2) [Clear Sky]
    • max_ghi: Maximum value of global horizontal solar irradiance in day (W/m^2) [Clear Sky]
    • dni: Average direct normal solar irradiance (W/m^2) [Clear Sky]
    • t_dni: Day total direct normal solar irradiance (W/m^2) [Clear Sky]
    • max_dni: Maximum value of direct normal solar irradiance in day (W/m^2) [Clear Sky]
    • dhi: Average diffuse horizontal solar irradiance (W/m^2) [Clear Sky]
    • t_dhi: Day total diffuse horizontal solar irradiance (W/m^2) [Clear Sky]
    • max_dhi: Maximum value of diffuse horizontal solar irradiance in day (W/m^2) [Clear Sky]
    • max_uv: Maximum UV Index (0-11+)
  • ... ]