v1

latestSwagger 2.02026-07-132137180.4 KB
Hourly Historical Weather Data

Returns Historical Observations - Given a lat/lon.

Returns Historical Observations - Given a lat, and lon. See https://www.weatherbit.io/api for API specific rate limits.

get/history/hourly

Query parameters

latnumber double

Latitude component of location.

lonnumber double

Longitude component of location.

citystring string

City search.. Example - &city=Raleigh,NC or &city=Berlin,DE or city=Paris&country=FR

postal_codestring string

Postal Code. Example: 28546

countrystring string

Country Code (2 letter) - to be used with postal_code.

stationstring string

Station Call ID.

start_datestring string required

Start Date (YYYY-MM-DD or YYYY-MM-DD:HH).

end_datestring string required

End Date (YYYY-MM-DD or YYYY-MM-DD:HH).

units'S' | 'I' | 'M' string

Convert to units. Default Metric. Options (I = Imperial, M = Metric, S = Scientific)

lang'ar' | 'az' | 'be' | 'bg' | 'bs' | 'ca' | 'cs' | 'de' | 'fi' | 'fr' | 'el' | 'es' | 'et' | 'hr' | 'hu' | 'id' | 'it' | 'is' | 'kw' | 'nb' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sr' | 'sv' | 'tr' | 'uk' | 'zh' | 'zh-tw' string

Language (Default: English) See <a target='blank' href='/api/requests'>language field description</a>

tz'local' | 'utc' string

Assume utc (default) or local time for start_date, end_date

keystring string required

Your registered API key.

Response

An Historical Data Object.

city_namestring

Nearest city name

state_codestring

State abbreviation

country_codestring

Country abbreviation

timezonestring

Local IANA time zone

latnumber

Latitude

lonnumber

Longitude

city_idstring

Nearest city ID

sourcesstring[]

List of data sources used in response

station_idstring

[DEPRECATED] Deprecated - use 'sources'

Example response

{
  "city_name": "Seattle",
  "state_code": "WA",
  "country_code": "US",
  "timezone": "America/New_York",
  "lat": 47.61,
  "lon": -122.33,
  "city_id": "4487042",
  "sources": [
    "12345-89083"
  ],
  "station_id": "12345-999999",
  "data": [
    {
      "timestamp_local": "2019-03-04T12:00:00",
      "timestamp_utc": "2019-03-04T17:00:00",
      "revision_status": "final",
      "revision_version": "1.1",
      "datetime": "2019-03-04:17",
      "slp": 1020.1,
      "pres": 845,
      "rh": 85,
      "dewpt": -1.5,
      "temp": -1.2,
      "app_temp": -1.5,
      "wind_spd": 14.7,
      "wind_gust_spd": 16.85,
      "wind_dir": 325,
      "uv": 4,
      "solar_rad": 300,
      "ghi": 1500,
      "dhi": 200,
      "dni": 400,
      "h_angle": 15,
      "elev_angle": 27.5,
      "azimuth": 50.5,
      "vis": 10,
      "pod": "n",
      "weather": {
        "icon": "s01n",
        "code": 601,
        "description": "Light Snow"
      },
      "clouds": 50,
      "precip": 3,
      "snow": 30
    }
  ]
}