Weatherbit Hourly Historical Weather Data API
The Hourly Historical Weather Data API from Weatherbit — 1 operation(s) for hourly historical weather data.
The Hourly Historical Weather Data API from Weatherbit — 1 operation(s) for hourly historical weather data.
openapi: 3.0.1
info:
title: Weatherbit - Interactive Swagger UI Documentation 16 Day / Daily Forecast Hourly Historical Weather Data API
description: This an interactive version of the documentation for the Weatherbit API. The base URL for the API is [http://api.weatherbit.io/v2.0/](http://api.weatherbit.io/v2.0/) or [https://api.weatherbit.io/v2.0/](http://api.weatherbit.io/v2.0/). Below is the Swagger UI documentation for the API. All API requests require the `key` parameter. An Example for a 48 hour forecast for London, UK would be `http://api.weatherbit.io/v2.0/forecast/hourly?lat=51.5072`&`lon=-0.1276`. See our [Weather API description page](https://www.weatherbit.io/api) for the full documentation.
version: 2.0.0
servers:
- url: https://api.weatherbit.io/v2.0
- url: http://api.weatherbit.io/v2.0
tags:
- name: Hourly Historical Weather Data
paths:
/history/hourly:
get:
tags:
- Hourly Historical Weather Data
summary: Weatherbit Returns Historical Observations - Given a Lat/lon.
description: Returns Historical Observations - Given a lat, and lon. See https://www.weatherbit.io/api for API specific rate limits.
parameters:
- name: lat
in: query
description: Latitude component of location.
schema:
type: number
format: double
example: 64.13
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 38.01
- name: city_id
in: query
description: 'City ID. Example: 4487042'
schema:
type: string
format: string
example: Kansas City
- name: city
in: query
description: City search.. Example - &city=Raleigh,NC or &city=Berlin,DE or city=Paris&country=FR
schema:
type: string
format: string
example: Kansas City
- name: postal_code
in: query
description: 'Postal Code. Example: 28546'
schema:
type: string
format: string
example: example-value
- name: country
in: query
description: Country Code (2 letter) - to be used with postal_code.
schema:
type: string
format: string
example: US
- name: station
in: query
description: Station Call ID.
schema:
type: string
format: string
example: example-value
- name: start_date
in: query
description: Start Date (YYYY-MM-DD or YYYY-MM-DD:HH).
required: true
schema:
type: string
format: string
example: example-value
- name: end_date
in: query
description: End Date (YYYY-MM-DD or YYYY-MM-DD:HH).
required: true
schema:
type: string
format: string
example: example-value
- name: units
in: query
description: Convert to units. Default Metric See <a target='blank' href='/api/requests'>units field description</a>
schema:
type: string
format: string
enum:
- S
- I
example: S
- name: lang
in: query
description: 'Language (Default: English) See <a target=''blank'' href=''/api/requests''>language field description</a>'
schema:
type: string
format: string
enum:
- 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
example: sv
- name: tz
in: query
description: Assume utc (default) or local time for start_date, end_date
schema:
type: string
format: string
enum:
- local
- utc
example: local
- name: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
'200':
description: An Historical Data Object.
content:
application/json:
schema:
$ref: '#/components/schemas/History'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
schemas:
HistoryObj:
type: object
properties:
ts:
type: number
description: Unix Timestamp
example: 1551718800
timestamp_local:
type: string
description: Timestamp in local time
example: 2019-03-04 12:00:00
timestamp_utc:
type: string
description: Timestamp UTC
example: 2019-03-04 17:00:00
revision_status:
type: string
description: Data revision status (interim or final)
example: final
datetime:
type: string
description: Date in format "YYYY-MM-DD:HH". All datetime is in (UTC)
example: 2019-03-04:17
slp:
type: number
description: Sea level pressure (mb)
example: 1020.1
pres:
type: number
description: Pressure (mb)
example: 845.0
rh:
type: integer
description: Relative Humidity as a percentage (%)
example: 85
dewpt:
type: number
description: Dew point (Default Celcius)
example: -1.5
temp:
type: number
description: Temperature (Default Celcius)
example: -1.2
app_temp:
type: number
description: Apparent Temperature or Wind Chill/Heat Index (Default Celcius)
example: -1.5
wind_spd:
type: number
description: Wind Speed (Default m/s)
example: 14.7
wind_gust_spd:
type: number
description: Wind Gust Speed - Default (m/s)
example: 16.85
wind_dir:
type: integer
description: Wind direction (Degrees)
example: 325
uv:
type: number
description: UV Index (1-11+)
example: 4.0
solar_rad:
type: number
description: Estimated solar radiation (W/m^2)
example: 300.0
ghi:
type: number
description: Global horizontal solar irradiance (W/m^2)
example: 1500.0
dhi:
type: number
description: Diffuse normal solar irradiance (W/m^2)
example: 200.0
dni:
type: number
description: Direct normal solar irradiance (W/m^2)
example: 400.0
elev_angle:
type: number
description: Solar elevation angle (Degrees)
example: 27.5
azimuth:
type: number
description: Azimuth angle (Degrees)
example: 50.5
vis:
type: number
description: Visibility (KM)
example: 10.0
pod:
type: string
description: Part of the day (d = day, n = night)
example: n
weather:
type: object
properties:
icon:
type: string
description: Icon code for forecast image display
example: s01n
code:
type: integer
description: Weather Condition code
example: 601
description:
type: string
description: Weather Condition description
example: Light Snow
clouds:
type: integer
description: Cloud Cover 0-100 (%)
example: 50
precip:
type: number
description: Liquid equivalent precipitation - Default (mm)
example: 3.0
snow:
type: number
description: Snowfall - Default (mm)
example: 30.0
Error:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
History:
type: object
properties:
city_name:
type: string
description: City name (Closest)
example: Seattle
state_code:
type: string
description: State abbreviation
example: WA
country_code:
type: string
description: Country abbreviation
example: US
timezone:
type: string
description: Local IANA time zone
example: America/New_York
lat:
type: number
description: Latitude
example: 47.61
lon:
type: number
description: Longitude
example: -122.33
sources:
type: array
description: List of data sources used in response
items:
type: string
example: 12345-89083
data:
type: array
items:
$ref: '#/components/schemas/HistoryObj'