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] English
  • ar - Arabic
  • az - Azerbaijani
  • be - Belarusian
  • bg - Bulgarian
  • bs - Bosnian
  • ca - Catalan
  • cz - Czech
  • da - Danish
  • de - German
  • fi - Finnish
  • fr - French
  • el - Greek
  • et - Estonian
  • hr - Croation
  • hu - Hungarian
  • id - Indonesian
  • it - Italian
  • is - Icelandic
  • kw - Cornish
  • lt - Lithuanian
  • nb - Norwegian BokmÃ¥l
  • nl - Dutch
  • pl - Polish
  • pt - Portuguese
  • ro - Romanian
  • ru - Russian
  • sk - Slovak
  • sl - Slovenian
  • sr - Serbian
  • sv - Swedish
  • tr - Turkish
  • uk - Ukrainian
  • zh - 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 observations
  • t - 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)
  • &city=Raleigh&country=US
  • &city=Raleigh,NC
  • &city=Raleigh,North+Carolina
Get observation by postal code postal_code, country (optional) &postal_code=27601&country=US
Get observation by city name ip
  • &ip=auto
  • &ip=107.13.237.210
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
= Premium subscriptions only.

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,
                     "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
                  }
               ],
               "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: { }
    • vis: Visibility (default KM).
    • precip: Accumulated liquid equivalent precipitation (default mm).
    • snow: Accumulated snowfall (default mm).
    • uv: UV Index (0-11+).
    • 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: Solar hour angle (degrees).
  • ]