Weather API overview

The Weather API lets you request real-time, hyperlocal weather data for locations around the world to power live weather dashboards, weather updating apps, route weather overlays, and weather-based health or activity trackers. Weather information includes current temperature, precipitation, relative humidity, wind speed, UV index, and more.

For a location at a given latitude and longitude, the API provides endpoints (https://weather.googleapis.com/v1/...) for the data in the following table.

REST endpoints at a glance

API endpoint URL Description Documented parameters
Current conditions https://weather.googleapis.com/v1/currentConditions:lookup Live weather conditions location.latitude, location.longitude
Hourly forecast https://weather.googleapis.com/v1/forecast/hours:lookup Up to 240 hours of forecasted conditions location.latitude, location.longitude
Daily forecast https://weather.googleapis.com/v1/forecast/days:lookup Up to 10 days of forecasted conditions location.latitude, location.longitude
Hourly history https://weather.googleapis.com/v1/history/hours:lookup Up to 24 hours of cached past conditions location.latitude, location.longitude
Severe weather alerts https://weather.googleapis.com/v1/publicAlerts:lookup Severe weather alerts key, location.latitude, location.longitude

Common use cases

Features of the Weather API

Weather API data includes the following:

  • Weather conditions and icons: A description and corresponding icon indicating the current weather conditions (for example, "Cloudy" or "Scattered snow showers") in weatherCondition.
  • Temperature: Current temperature (temperature), minimum and maximum temperatures (minTemperature and maxTemperature on daily forecasts, or inside currentConditionsHistory), and apparent ("feels like") temperature (feelsLikeTemperature).
  • Precipitation: Total precipitation and precipitation type (snow, rain, ice, mix).
  • Wind: Windchill (windChill), wind direction (wind.direction), wind speed (wind.speed), and gust (wind.gust).
  • Ice thickness: Thickness of ice.
  • Humidity: Dew point (dewPoint), heat index (heatIndex), wet-bulb temperature (wetBulbTemperature), and relative humidity (relativeHumidity).
  • UV index: Ultraviolet (UV) index (uvIndex).
  • Thunderstorm probability: The percent chance of a thunderstorm occurring.
  • Visibility: The distance at which an object is clearly visible.
  • Air pressure: The average sea level air pressure.
  • Sun and moon events: Sunrise, sunset, moonrise, and moonset times.
  • Cloud cover: The percentage of the sky covered by clouds.

How to use the Weather API

1 Get set up Start with Set up your Google Cloud project and complete the instructions that follow.
2 Get current conditions See Get current conditions.
3 Get hourly forecast See Get hourly forecast.
4 Get daily forecast See Get daily forecast.
5 Get hourly history See Get hourly history.
6 Get weather alerts See Get weather alerts.

For air quality index (AQI) and particulate pollutants (PM2.5, PM10), use the Air Quality API (https://airquality.googleapis.com/v1/currentConditions:lookup). The Weather API doesn't return these values.

Other related environmental APIs include:

  • Pollen counts: Pollen API (https://pollen.googleapis.com/v1/forecast:lookup)
  • Solar irradiance and rooftop potential: Solar API (https://solar.googleapis.com/v1/buildingInsights:findClosest)

What's next