Historical Weather API (daily)

This API returns historical weather data from our network of over 120,000 stations that report weather observations on a daily basis. This is daily historical data, and a request will return data from the nearest reporting stations within 15km. 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 of data per API call.
  • Starter Plan: No Access.
  • Advanced/Developer Plans: 1 month (31 days) of data per API call.

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)
  • M - [DEFAULT] Metric (Celcius, m/s, mm)
  • S - Scientific (Kelvin, m/s, mm)
  • I - Fahrenheit (F, mph, in)
callback=[function] (optional: JSON-P callback)

API Endpoints

Description Required Parameters Example(s)
Get history by lat/lon lat, lon, start_date, end_date &lat=38.123&lon=-78.543&start_date=2019-10-10&end_date=2019-10-11
Get history by city name city, state(optional), country (optional), start_date, end_date &city=Raleigh,NC&start_date=2019-10-10&end_date=2019-10-11
Get history by postal code postal_code, country (optional), start_date, end_date &postal_code=27601&country=US&start_date=2019-10-10&end_date=2019-10-11
Get history by city id city_id, start_date, end_date &city_id=8953360&start_date=2019-10-10&end_date=2019-10-11
Get history by ICAO or station id station, start_date, end_date &station=KRDU&start_date=2019-10-10&end_date=2019-10-11
* = Premium subscriptions only.

Example Request:


Example Response (JSON):

             "sources":["723060-13722", "USC00445050", "USW00013732"],
                }, ...


Field Decriptions:

  • lat: Latitude (Degrees).
  • lon: Longitude (Degrees).
  • timezone: Local IANA Timezone.
  • city_name: City name.
  • city_id: City ID.
  • station_id: Nearest station. [Deprecated]
  • country_code: Country abbreviation.
  • state_code: State abbreviation/code.
  • sources: List of stations used in response.
  • data: [
    • datetime: Date (YYYY-MM-DD).
    • ts: Timestamp UTC (Unix Timestamp).
    • 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 Celcius).
    • max_temp: Maximum temperature (default Celcius).
    • min_temp: Minimum temperature (default Celcius).
    • 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 Celcius).
    • 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+)
  • ... ]