Current Weather API
This API returns current conditions from our network of over 45,000 stations. Every API request will return the nearest, and most recent observation.
All parameters should be supplied to the Weather API as query string parameters.
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- Greeket- Estonianhr- Croationhu- Hungarianid- Indonesianit- Italianis- Icelandickw- 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 (Celcius, m/s, mm)S- Scientific (Kelvin, m/s, mm)I- Fahrenheit (F, mph, in)
callback=[function] (optional: JSON-P callback)
marine=[boolean] (optional)
f- [DEFAULT] Exclude buoys/offshore observationst- Include buoys/offshore observations
API Endpoints
| Description | Required Parameters | Example(s) |
|---|---|---|
| Get observation by lat/lon | 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 name | ip |
|
| Get observation by city id's | city_id | &city_id=8953360 |
| Get observation by airport ICAO, or station id | station | &station=KSEA |
| 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 | stations | &stations=KRDU,718533-99999,KSEA |
Example Request:
https://api.weatherbit.io/v2.0/current?city=Raleigh,NC&key={API_KEY}
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,
"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,
"station":"CMVN7",
"wind_dir":50,
"elev_angle":63,
"datetime":"2017-08-28:17",
"precip":0,
"dhi":444.4,
"city_name":"Raleigh",
"sunrise":"10:44",
"sunset":"23:47",
"temp":24.19,
"lat":"35.7721",
"slp":1022.2
}
],
"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:Source station ID.ob_time:Last observation time (YYYY-MM-DD HH:MM).datetime: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).wind_dir:Wind direction (degrees).wind_cdir:Abbreviated wind direction.wind_cdir_full:Verbal wind direction.temp:Temperature (default Celcius).app_temp:Apparent/"Feels Like" temperature (default Celcius).rh:Relative humidity (%).dewpt:Dew point (default Celcius).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:Accumulated liquid equivalent precipitation (default mm).snow:Accumulated snowfall (default mm).dhi:Direct component of solar radiation (W/m^2).uv:UV Index (0-11+).elev_angle:Solar elevation angle (degrees).h_angle:Solar hour angle (degrees).]