[Video](https://www.youtube.com/watch?v=O16qXvxI0yw)

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`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt), [`location.longitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt) |
| Hourly forecast | `https://weather.googleapis.com/v1/forecast/hours:lookup` | Up to 240 hours of forecasted conditions | [`location.latitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt), [`location.longitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt) |
| Daily forecast | `https://weather.googleapis.com/v1/forecast/days:lookup` | Up to 10 days of forecasted conditions | [`location.latitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt), [`location.longitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt) |
| Hourly history | `https://weather.googleapis.com/v1/history/hours:lookup` | Up to 24 hours of cached past conditions | [`location.latitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt), [`location.longitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt) |
| Severe weather alerts | `https://weather.googleapis.com/v1/publicAlerts:lookup` | Severe weather alerts | [`key`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/publicAlerts/lookup.md.txt), [`location.latitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt), [`location.longitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt) |

## Common use cases

- **Live weather and weather updating dashboards:** Query [`currentConditions:lookup`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/currentConditions/lookup.md.txt), [`forecast/hours:lookup`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/forecast.hours/lookup.md.txt), and [`forecast/days:lookup`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/forecast.days/lookup.md.txt) using GPS coordinates ([`location.latitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt) and [`location.longitude`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/LatLng.md.txt)) or geocoded city coordinates to display auto-updating temperature, humidity, and wind speed.
- **Route weather overlays:** Sample latitude and longitude waypoints along a route polyline from the [Routes API](https://developers.google.com/maps/documentation/routes) and call [`currentConditions:lookup`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/currentConditions/lookup.md.txt) or [`forecast/hours:lookup`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/forecast.hours/lookup.md.txt) at each waypoint's estimated arrival time to alert drivers to changing weather conditions.
- **Weather-based health, hydration, and activity trackers:** Fetch local [`temperature`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt), [`feelsLikeTemperature`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt), [`relativeHumidity`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/currentConditions/lookup.md.txt), [`heatIndex`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt), and [`uvIndex`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/currentConditions/lookup.md.txt) from [`currentConditions:lookup`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/currentConditions/lookup.md.txt) to adjust daily hydration goals or outdoor exercise recommendations.

## 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`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/WeatherCondition.md.txt).
- **Temperature:** Current temperature ([`temperature`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt)), minimum and maximum temperatures ([`minTemperature`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt) and [`maxTemperature`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt) on daily forecasts, or inside [`currentConditionsHistory`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/currentConditions/lookup.md.txt)), and apparent ("feels like") temperature ([`feelsLikeTemperature`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt)).
- **Precipitation:** Total precipitation and precipitation type (snow, rain, ice, mix).
- **Wind:** Windchill ([`windChill`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt)), wind direction ([`wind.direction`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Wind.md.txt)), wind speed ([`wind.speed`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Wind.md.txt)), and gust ([`wind.gust`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Wind.md.txt)).
- **Ice thickness:** Thickness of ice.
- **Humidity:** Dew point ([`dewPoint`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt)), heat index ([`heatIndex`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt)), wet-bulb temperature ([`wetBulbTemperature`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/Temperature.md.txt)), and relative humidity ([`relativeHumidity`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/currentConditions/lookup.md.txt)).
- **UV index:** Ultraviolet (UV) index ([`uvIndex`](https://developers.google.com/maps/documentation/weather/reference/rest/v1/currentConditions/lookup.md.txt)).
- **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](https://developers.google.com/maps/documentation/weather/cloud-setup) and complete the instructions that follow. |
| 2 | **Get current conditions** | See [Get current conditions](https://developers.google.com/maps/documentation/weather/current-conditions.md.txt). |
| 3 | **Get hourly forecast** | See [Get hourly forecast](https://developers.google.com/maps/documentation/weather/hourly-forecast.md.txt). |
| 4 | **Get daily forecast** | See [Get daily forecast](https://developers.google.com/maps/documentation/weather/daily-forecast.md.txt). |
| 5 | **Get hourly history** | See [Get hourly history](https://developers.google.com/maps/documentation/weather/hourly-history.md.txt). |
| 6 | **Get weather alerts** | See [Get weather alerts](https://developers.google.com/maps/documentation/weather/weather-alerts.md.txt). |

## Related environmental APIs

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

- [Set up your Google Cloud project](https://developers.google.com/maps/documentation/weather/cloud-setup)
- [Get current conditions](https://developers.google.com/maps/documentation/weather/current-conditions.md.txt)
- [Get hourly forecast](https://developers.google.com/maps/documentation/weather/hourly-forecast.md.txt)
- [Get daily forecast](https://developers.google.com/maps/documentation/weather/daily-forecast.md.txt)
- [Get hourly history](https://developers.google.com/maps/documentation/weather/hourly-history.md.txt)
- [Get weather alerts](https://developers.google.com/maps/documentation/weather/weather-alerts.md.txt)