# Weatherbit API

> Weather API documentation for current weather, forecasts, historical weather data, air quality, maps, lightning, agriculture, and energy APIs.

Weatherbit is a weather API from weatherbit.io. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 47 endpoints.

## At a glance

- Category: [Weather](https://www.openparable.com/apis/category/weather)
- Provider: weatherbit.io
- Authentication: API key
- HTTPS: Yes
- CORS: Not stated
- Base URL: https://api.weatherbit.io/v2.0
- Documentation: https://www.weatherbit.io/api
- OpenAPI description: https://api.apis.guru/v2/specs/weatherbit.io/2.0.0/swagger.json
- Version: 2.0.0
- Specification updated: 2023-03-06

## Example request

```bash
curl -X GET "https://api.weatherbit.io/v2.0/alerts?lat=LAT&lon=LON" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
```

## Endpoints

- `GET /alerts?lat={lat}&lon={lon}` — Returns severe weather alerts issued by meteorological agencies - Given a lat/lon.
- `GET /bulk/files/{file}` — Download pre-generated bulk datasets
- `GET /current/airquality?city={city}&country={country}` — Returns current air quality conditions - Given City and/or State, Country.
- `GET /current/airquality?city_id={city_id}` — Returns current air quality conditions - Given a City ID.
- `GET /current/airquality?lat={lat}&lon={lon}` — Returns current air quality conditions - Given a lat/lon.
- `GET /current/airquality?postal_code={postal_code}` — Returns current air quality conditions - Given a Postal Code.
- `GET /current?cities={cities}` — Returns a group of observations given a list of cities
- `GET /current?city={city}&country={country}` — Returns a Current Observation - Given City and/or State, Country.
- `GET /current?city_id={city_id}` — Returns a current observation by city id.
- `GET /current?lat={lat}&lon={lon}` — Returns a Current Observation - Given a lat/lon.
- `GET /current?points={points}` — Returns a group of observations given a list of points in the format (lat1, lon1), (lat2, lon2), (latN, lonN), ...
- `GET /current?postal_code={postal_code}` — Returns a current observation by postal code.
- `GET /current?station={station}` — Returns a Current Observation. - Given a station ID.
- `GET /current?stations={stations}` — Returns a group of observations given a list of stations
- `GET /forecast/airquality?city={city}&country={country}` — Returns 72 hour (hourly) Air Quality forecast - Given City and/or State, Country.
- `GET /forecast/airquality?city_id={city_id}` — Returns 72 hour (hourly) Air Quality forecast - Given a City ID.
- `GET /forecast/airquality?lat={lat}&lon={lon}` — Returns 72 hour (hourly) Air Quality forecast - Given a lat/lon.
- `GET /forecast/airquality?postal_code={postal_code}` — Returns 72 hour (hourly) Air Quality forecast - Given a Postal Code.
- `GET /forecast/daily?city={city}&country={country}` — Returns a daily forecast - Given City and/or State, Country.
- `GET /forecast/daily?city_id={city_id}` — Returns a daily forecast - Given a City ID.
- `GET /forecast/daily?lat={lat}&lon={lon}` — Returns a daily forecast - Given Lat/Lon.
- `GET /forecast/daily?postal_code={postal_code}` — Returns a daily forecast - Given a Postal Code.
- `GET /forecast/energy?lat={lat}&lon={lon}` — Returns Energy Forecast API response - Given a single lat/lon.
- `GET /forecast/hourly?city={city}&country={country}` — Returns an hourly forecast - Given City and/or State, Country.
- `GET /forecast/hourly?city_id={city_id}` — Returns an hourly forecast - Given a City ID.
- `GET /forecast/hourly?lat={lat}&lon={lon}` — Returns an hourly forecast - Given a lat/lon.
- `GET /forecast/hourly?postal_code={postal_code}` — Returns an hourly forecast - Given a Postal Code.
- `GET /history/airquality?city={city}&country={country}` — Returns 72 hours of historical quality conditions - Given City and/or State, Country.
- `GET /history/airquality?city_id={city_id}` — Returns 72 hours of historical air quality conditions - Given a City ID.
- `GET /history/airquality?lat={lat}&lon={lon}` — Returns 72 hours of historical air quality conditions - Given a lat/lon.
- `GET /history/airquality?postal_code={postal_code}` — Returns 72 hours of historical air quality conditions - Given a Postal Code.
- `GET /history/daily?city={city}&country={country}` — Returns Historical Observations - Given City and/or State, Country.
- `GET /history/daily?city_id={city_id}` — Returns Historical Observations - Given a City ID
- `GET /history/daily?lat={lat}&lon={lon}` — Returns Historical Observations - Given a lat/lon.
- `GET /history/daily?postal_code={postal_code}` — Returns Historical Observations - Given a Postal Code
- `GET /history/daily?station={station}` — Returns Historical Observations - Given a station ID.
- `GET /history/energy?lat={lat}&lon={lon}` — Returns Energy API response - Given a single lat/lon.
- `GET /history/hourly?city={city}&country={country}` — Returns Historical Observations - Given City and/or State, Country.
- `GET /history/hourly?city_id={city_id}` — Returns Historical Observations - Given a City ID
- `GET /history/hourly?lat={lat}&lon={lon}` — Returns Historical Observations - Given a lat/lon.
- `GET /history/hourly?postal_code={postal_code}` — Returns Historical Observations - Given a Postal Code
- `GET /history/hourly?station={station}` — Returns Historical Observations - Given a station ID.
- `GET /history/subhourly?city={city}&country={country}` — Returns Historical Observations - Given City and/or State, Country.
- `GET /history/subhourly?city_id={city_id}` — Returns Historical Observations - Given a City ID
- `GET /history/subhourly?lat={lat}&lon={lon}` — Returns Historical Observations - Given a lat/lon.
- `GET /history/subhourly?postal_code={postal_code}` — Returns Historical Observations - Given a Postal Code
- `GET /history/subhourly?station={station}` — Returns Historical Observations - Given a station ID.

## Questions

### Does the Weatherbit API need an API key?

Yes. The Weatherbit API uses API key authentication; the documentation explains how to get credentials.

### Does the Weatherbit API support HTTPS?

Yes, the Weatherbit API is served over HTTPS.

### How many endpoints does the Weatherbit API have?

Its OpenAPI description lists 47 endpoints in version 2.0.0. All of them are shown on this page.

### What are alternatives to the Weatherbit API?

Other Weather APIs include NOAA CO-OPS, NASA POWER, US Weather, AccuWeather, Aemet.

## Similar weather APIs

- [NOAA CO-OPS](https://www.openparable.com/apis/noaa-co-ops): US coastal tides, water levels, currents and meteorological observations
- [NASA POWER](https://www.openparable.com/apis/nasa-power): Global solar and weather data for energy and agriculture
- [US Weather](https://www.openparable.com/apis/us-weather): US National Weather Service
- [AccuWeather](https://www.openparable.com/apis/accuweather): Weather and forecast data
- [Aemet](https://www.openparable.com/apis/aemet): Weather and forecast data from Spain
- [OpenWeatherMap](https://www.openparable.com/apis/openweathermap): Explore OpenWeather's vast range of weather APIs including the versatile One Call API 4.0. Ideal for both beginners and professionals, our APIs offer current weather, minute-by-minute forecasts, historical data archives, and future predictions. Access weather data starting from 01-01-1979, global weather maps, solar irradiance predictions, air pollution data, and more. Our APIs support various for
- [Meteorologisk Institutt](https://www.openparable.com/apis/meteorologisk-institutt): Weather and climate data
- [AviationWeather](https://www.openparable.com/apis/aviationweather): NOAA aviation weather forecasts and observations
- [IPMA](https://www.openparable.com/apis/ipma): Portuguese weather and climate data
- [NOAA NGDC](https://www.openparable.com/apis/noaa-ngdc): Natural hazards data including earthquakes, tsunamis, and volcanic eruptions
- [AQICN](https://www.openparable.com/apis/aqicn): Air Quality Index Data for over 1000 cities
- [RainViewer](https://www.openparable.com/apis/rainviewer): Radar data collected from different websites across the Internet

Listed from: public-apis (MIT), public-apis database (MIT), APIs.guru (CC0). Check the provider's terms before use.

---

Source: https://www.openparable.com/apis/weatherbit (OpenParable). Cite the canonical URL above.
