Current Weather API
This API returns current conditions from our network of sub-hourly reporting weather stations, as well as relevant atmospheric meso-analyses (For example, the RTMA). Every API request will return the nearest, and most recent observation.
All parameters should be supplied to the Weather API as query string parameters.
Note: Archiving data from this API may lead to data inconsistencies, and is not recommended. For analytical usage we recommend using the Sub-hourly (15 minute interval) historical weather API, or the Hourly historical weather API.
Base URL
HTTP: http://api.weatherbit.io/v2.0/current
HTTPS: https://api.weatherbit.io/v2.0/current
Supported Methods: GET
Request Parameters
key=[key] (REQUIRED)
key
- Your API Key.
lang=[language](optional)
en
- [DEFAULT] Englishar
- Arabicaz
- Azerbaijanibe
- Belarusianbg
- Bulgarianbs
- Bosnianca
- Catalancz
- Czechda
- Danishde
- Germanfi
- Finnishfr
- Frenchel
- Greekes
- Spanishet
- Estonianja
- Japanesehr
- Croationhu
- Hungarianid
- Indonesianit
- Italianis
- Icelandiciw
- Hebrewkw
- Cornishlt
- Lithuaniannb
- Norwegian Bokmålnl
- Dutchpl
- Polishpt
- Portuguesero
- Romanianru
- Russiansk
- Slovaksl
- Sloveniansr
- Serbiansv
- Swedishtr
- Turkishuk
- Ukrainianzh
- Chinese (Simplified)zh-tw
- Chinese (Traditional)
units=[units](optional)
M
- [DEFAULT] Metric (Celsius, m/s, mm)S
- Scientific (Kelvin, m/s, mm)I
- Fahrenheit (F, mph, in)
include=minutely,alerts (optional: Include a 1 hour / minutely forecast , and severe weather alert in the response)*
*Counts as an extra request against quota.
API Endpoints
Description | Required Parameters | Example(s) |
---|---|---|
Get observation by lat/lon (Recommended) | lat,lon | &lat=38.123&lon=-78.543 |
Get observation by city name | city, state(optional), country (optional) |
|
Get observation by postal code | postal_code, country (optional) | &postal_code=27601&country=US |
Get observation by city id's | city_id | &city_id=8953360 |
Get observation by ICAO or station id [Use with Caution] | station | &station=KRDU |
Get multiple observations from a list of city id's | cities | &cities=8953360,8953361,8953362 |
Get multiple observations by airport ICAO's, or station id's [Use with Caution] | stations | &stations=KRDU,KSEA,LEBB |
Get multiple observations by lat/lon(s). Format: "(lat1, lon1),(lat2, lon2), ..." | points | &points=(35.88,-78.79),(47.45,-122.3),(43.3,-2.93) |
Example Request:
https://api.weatherbit.io/v2.0/current?lat=35.7796&lon=-78.6382&key=API_KEY&include=minutely
Example Response (JSON):
{
"data":[
{
"wind_cdir":"NE",
"rh":59,
"pod":"d",
"lon":-78.63861,
"pres":1006.6,
"timezone":"America\/New_York",
"ob_time":"2017-08-28 16:45",
"country_code":"US",
"clouds":75,
"vis":10,
"wind_spd":6.17,
"gust": 8,
"wind_cdir_full":"northeast",
"app_temp":24.25,
"state_code":"NC",
"ts":1503936000,
"h_angle":0,
"dewpt":15.65,
"weather":{
"icon":"c03d",
"code": 803,
"description":"Broken clouds"
},
"uv":2,
"aqi":45,
"station":"CMVN7",
"sources": ["rtma", "CMVN7"],
"wind_dir":50,
"elev_angle":63,
"datetime":"2017-08-28:17",
"precip":0,
"ghi":444.4,
"dni":500,
"dhi":120,
"solar_rad":350,
"city_name":"Raleigh",
"sunrise":"10:44",
"sunset":"23:47",
"temp":24.19,
"lat":35.7721,
"slp":1022.2
}
],
"minutely":[ ... ],
"count":1
}
Field Decriptions:
count:
Count of returned observations.data: [
lat:
Latitude (Degrees).lon:
Longitude (Degrees).sunrise:
Sunrise time (HH:MM).sunset:
Sunset time (HH:MM).timezone:
Local IANA Timezone.station:
[DEPRECATED] Nearest reporting station ID.sources:
List of data sources used in response.ob_time:
Last observation time (YYYY-MM-DD HH:MM).datetime:
[DEPRECATED] Current cycle hour (YYYY-MM-DD:HH).ts:
Last observation time (Unix timestamp).city_name:
City name.country_code:
Country abbreviation.state_code:
State abbreviation/code.pres:
Pressure (mb).slp:
Sea level pressure (mb).wind_spd:
Wind speed (Default m/s).gust:
Wind gust speed (Default m/s).wind_dir:
Wind direction (degrees).wind_cdir:
Abbreviated wind direction.wind_cdir_full:
Verbal wind direction.temp:
Temperature (default Celsius).app_temp:
Apparent/"Feels Like" temperature (default Celsius).rh:
Relative humidity (%).dewpt:
Dew point (default Celsius).clouds:
Cloud coverage (%).pod:
Part of the day (d = day / n = night).-
weather: {
icon:
Weather icon code.code:
Weather code.description:
Text weather description.
}
vis:
Visibility (default KM).precip:
Liquid equivalent precipitation rate (default mm/hr).snow:
Snowfall (default mm/hr).uv:
UV Index (0-11+).aqi:
Air Quality Index [US - EPA standard 0 - +500]dhi:
Diffuse horizontal solar irradiance (W/m^2) [Clear Sky]dni:
Direct normal solar irradiance (W/m^2) [Clear Sky]ghi:
Global horizontal solar irradiance (W/m^2) [Clear Sky]solar_rad:
Estimated Solar Radiation (W/m^2).elev_angle:
Solar elevation angle (degrees).h_angle:
[DEPRECATED] Solar hour angle (degrees).]