Weatherbit Current Weather API
Returns current weather conditions from Weatherbit's global network of sub-hourly reporting weather stations and atmospheric meso-analyses. Supports lookup by lat/lon, city name, city ID, postal code, or station ID.
Returns current weather conditions from Weatherbit's global network of sub-hourly reporting weather stations and atmospheric meso-analyses. Supports lookup by lat/lon, city name, city ID, postal code, or station ID.
openapi: 3.0.1
info:
title: Weatherbit - Interactive Swagger UI Documentation
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
paths:
/alerts:
get:
tags:
- Alerts
summary: Weatherbit Returns Severe Weather Alerts Issued by Meteorological Agencies - Given a Lat/lon.
description: "Returns severe weather alerts issued by meteorological agencies - given a lat, and a lon."
parameters:
- name: lat
in: query
description: Latitude component of location.
schema:
type: number
format: double
example: 3.93
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 9.38
- 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: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
"200":
description: Weather Alert Object.
content:
application/json:
schema:
$ref: '#/components/schemas/WeatherAlert'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/current:
get:
tags:
- Current Weather Data
summary: Weatherbit Returns a Current Observation - Given a Lat/lon.
description: "Returns a Current Observation - given a lat, and a lon."
parameters:
- name: lat
in: query
description: Latitude component of location.
schema:
type: number
format: double
example: 58.5
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 74.68
- name: include
in: query
description: "Include 1 hour - minutely precip forecast in the response, or severe weather alerts"
schema:
type: string
format: string
enum:
- minutely
- alerts
example: minutely
- 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: stations
in: query
description: "Comma separated list of Station Call ID's. Example: KRDU,KBFI,KVNY"
schema:
type: string
format: string
example: example-value
- name: points
in: query
description: "Comma separated list of points. Example: (35.5, -75.5),(45, 65),(45.12, -130.5)"
schema:
type: string
format: string
example: example-value
- name: cities
in: query
description: "Comma separated list of City ID's. Example: 4487042, 4494942, 4504871"
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: uk
- name: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
"200":
description: An Observation Group object.
content:
application/json:
schema:
$ref: '#/components/schemas/CurrentObsGroup'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/forecast/daily:
get:
tags:
- 16 Day / Daily Forecast
summary: Weatherbit Returns a Daily Forecast - Given Lat/Lon.
description: "Returns a daily forecast, where each point represents one day (24hr) period. Every point has a datetime string in the format \"YYYY-MM-DD\". One day begins at 00:00 UTC, and ends at
23:59 UTC. \n"
parameters:
- name: lat
in: query
description: Latitude component of location.
schema:
type: number
format: double
example: 44.48
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 23.85
- 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: days
in: query
description: Number of days to return. Default 16.
schema:
type: number
format: integer
example: 29.76
- 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: el
- name: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
"200":
description: A forecast object.
content:
application/json:
schema:
$ref: '#/components/schemas/ForecastDay'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/forecast/minutely:
get:
tags:
- 60 Minute Rain/Snow Nowcast
summary: Weatherbit Returns a 60 Minute Precipitation Forecast - Given Lat/Lon.
description: "Returns a 60 minute precipitation forecast, where each point represents one minute (1 min) period."
parameters:
- name: lat
in: query
description: Latitude component of location.
schema:
type: number
format: double
example: 22.12
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 91.76
- 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: 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: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
"200":
description: A forecast object.
content:
application/json:
schema:
$ref: '#/components/schemas/FCMinutely'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/forecast/airquality:
get:
tags:
- Air Quality Forecast
summary: Weatherbit Returns 72 Hour (hourly) Air Quality Forecast - Given a Geolocation.
description: "Returns 72 hour (hourly) Air Quality forecast, where each point represents a one hour period."
parameters:
- name: lat
in: query
description: Latitude component of location.
schema:
type: number
format: double
example: 40.04
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 59.0
- 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: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
- name: hours
in: query
description: Number of hours to return.
schema:
type: integer
format: integer
example: 17
responses:
"200":
description: A forecast object.
content:
application/json:
schema:
$ref: '#/components/schemas/AQHourly'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/history/airquality:
get:
tags:
- Historical Air Quality
summary: Weatherbit Returns 72 Hours of Historical Air Quality Conditions - Given a Geolocation.
description: Returns historical air quality conditions. 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: 92.56
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 53.13
- 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: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
"200":
description: Historical air quality conditions
content:
application/json:
schema:
$ref: '#/components/schemas/AQCurrentGroup'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/current/airquality:
get:
tags:
- Current Air Quality
summary: Weatherbit Returns Current Air Quality Conditions - Given a Geolocation.
description: Returns current air quality conditions.
parameters:
- name: lat
in: query
description: Latitude component of location.
schema:
type: number
format: double
example: 1.36
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 36.08
- 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: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
"200":
description: Current air quality conditions
content:
application/json:
schema:
$ref: '#/components/schemas/AQCurrentGroup'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/forecast/hourly:
get:
tags:
- 240 Hour / Hourly Forecast
summary: Weatherbit Returns an Hourly Forecast - Given a Lat/lon.
description: "Returns an hourly forecast, where each point represents a one hour period. Every point has a datetime string in the format \"YYYY-MM-DD:HH\". Time is UTC. \n"
parameters:
- name: lat
in: query
description: Latitude component of location.
schema:
type: number
format: double
example: 86.82
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 7.04
- 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: 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: I
- 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: fr
- name: hours
in: query
description: Number of hours to return.
schema:
type: integer
format: integer
example: 71
- name: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
"200":
description: A forecast object.
content:
application/json:
schema:
$ref: '#/components/schemas/ForecastHourly'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/forecast/agweather:
get:
tags:
- AgWeather Forecast
summary: Weatherbit Returns Agweather Forecast - Given a Lat/lon.
description: "Returns Agweather Forecast - 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: 34.18
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 56.54
- 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: I
- name: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
"200":
description: An AGWeather Forecast Data Object.
content:
application/json:
schema:
$ref: '#/components/schemas/ForecastAG'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/history/agweather:
get:
tags:
- Historical AgWeather Data
summary: Weatherbit Returns Historical Agweather - Given a Lat/lon.
description: "Returns Historical Agweather 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: 41.08
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 16.98
- 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: tp
in: query
description: "Time period of calculation (daily [DEFAULT], or hourly)."
required: true
schema:
type: string
format: string
enum:
- daily
- hourly
example: hourly
- 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: I
- name: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
"200":
description: An AGWeather Historical Data Object.
content:
application/json:
schema:
$ref: '#/components/schemas/HistoryAG'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/normals:
get:
tags:
- Climate Normals (Averages)
summary: Weatherbit Returns Historical Climate Normals (Averages) - Given a Lat/lon.
description: "Returns Historical Climate Normals (Averages) - 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.
required: true
schema:
type: number
format: double
example: 8.25
- name: lon
in: query
description: Longitude component of location.
required: true
schema:
type: number
format: double
example: 21.65
- name: start_day
in: query
description: Start Day (MM-DD).
required: true
schema:
type: string
format: string
example: example-value
- name: end_day
in: query
description: End Day (MM-DD).
required: true
schema:
type: string
format: string
example: example-value
- name: tp
in: query
description: "Time period of calculation (daily, monthly, or hourly)."
required: true
schema:
type: string
format: string
enum:
- daily
- hourly
- monthly
example: daily
- 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: series_year
in: query
description: Series year for calculation. 2020 for 1991-2020. 2010 for 1981-2010.
required: true
schema:
type: number
format: number
example: 73.0
- name: key
in: query
description: Your registered API key.
required: true
schema:
type: string
format: string
example: abc123xyz
responses:
"200":
description: An Normals Data Object.
content:
application/json:
schema:
$ref: '#/components/schemas/Normals'
default:
description: No Data.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/history/daily:
get:
tags:
- Daily 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: 35.05
- name: lon
in: query
description: Longitude component of location.
schema:
type: number
format: double
example: 36.94
- 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:
# --- truncated at 32 KB (98 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/weatherbit/refs/heads/main/openapi/weatherbit-current-weather-openapi-original.yml