v1
latestSwagger 2.02026-07-132137180.4 KBHistorical Degree Day API
Returns Energy API response - Given a single lat/lon.
Returns aggregate energy specific historical weather fields, over a specified time period. See https://www.weatherbit.io/api for API specific rate limits.
get/history/energy
Query parameters
latnumber double required
Latitude component of location.
lonnumber double required
Longitude component of location.
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).
tp'hourly' | 'daily' | 'monthly' string
Time period to aggregate by (daily, monthly)
thresholdnumber double
Temperature threshold to use to calculate degree days (default 18 C)
units'S' | 'I' | 'M' string
Convert to units. Default Metric. Options (I = Imperial, M = Metric, S = Scientific)
keystring string required
Your registered API key.
Response
An Energy Data Object.
Example response
{
"start_date": "2017-01-01",
"end_date": "2017-01-30",
"city_name": "Raleigh",
"city_id": 4487042,
"state_code": "NC",
"country_code": "US",
"timezone": "America/New_York",
"lat": 38,
"lon": -78.25,
"threshold_units": "C",
"threshold_value": "18",
"sources": [
"12345-89083"
],
"station_id": "12345-999999",
"data": [
{
"date": "2018-06-01",
"timestamp_local": "2019-03-04T12:00:00",
"timestamp_utc": "2019-03-04T17:00:00",
"revision_status": "final",
"revision_version": "1.1",
"cdd": 10,
"hdd": 120,
"rh": 75,
"dewpt": 12,
"max_wind_dir": 150,
"max_wind_spd": 15.2,
"wind_dir": 125,
"wind_spd": 5.85,
"temp": 13.85,
"temp_wetbulb": 11.3,
"clouds": 42,
"t_ghi": 3000,
"t_dhi": 450,
"t_dni": 1200,
"t_solar_rad": 1250,
"sun_hours": 4.5,
"precip": 2,
"snow": 10
}
]
}