Package google.maps.weather.v1

Index

Weather

Service definition for the Weather API.

LookupCurrentConditions

rpc LookupCurrentConditions(LookupCurrentConditionsRequest) returns (LookupCurrentConditionsResponse)

Returns the current weather conditions at a given location.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform
LookupForecastDays

rpc LookupForecastDays(LookupForecastDaysRequest) returns (LookupForecastDaysResponse)

Returns up to 10 days of daily forecasts at a given location, starting from the current day.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform
LookupForecastHours

rpc LookupForecastHours(LookupForecastHoursRequest) returns (LookupForecastHoursResponse)

Returns up to 240 hours of hourly forecasts at a given location, starting from the current hour.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform
LookupHistoryHours

rpc LookupHistoryHours(LookupHistoryHoursRequest) returns (LookupHistoryHoursResponse)

Returns up to 24 hours of hourly historical weather data at a given location, starting from the last hour.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

AirPressure

Represents the atmospheric air pressure conditions.

Fields
mean_sea_level_millibars

float

The mean sea level air pressure in millibars.

CardinalDirection

Represents a cardinal direction (including ordinal directions).

Enums
CARDINAL_DIRECTION_UNSPECIFIED The cardinal direction is unspecified.
NORTH The north cardinal direction.
NORTH_NORTHEAST The north-northeast secondary intercardinal direction.
NORTHEAST The northeast intercardinal direction.
EAST_NORTHEAST The east-northeast secondary intercardinal direction.
EAST The east cardinal direction.
EAST_SOUTHEAST The east-southeast secondary intercardinal direction.
SOUTHEAST The southeast intercardinal direction.
SOUTH_SOUTHEAST The south-southeast secondary intercardinal direction.
SOUTH The south cardinal direction.
SOUTH_SOUTHWEST The south-southwest secondary intercardinal direction.
SOUTHWEST The southwest intercardinal direction.
WEST_SOUTHWEST The west-southwest secondary intercardinal direction.
WEST The west cardinal direction.
WEST_NORTHWEST The west-northwest secondary intercardinal direction.
NORTHWEST The northwest intercardinal direction.
NORTH_NORTHWEST The north-northwest secondary intercardinal direction.

ForecastDay

Represents a daily forecast record at a given location.

Fields
interval

Interval

The UTC time interval when this forecasted day is starts (inclusive) and ends (exclusive). Note: a day starts at 7am and ends at 7am next day, local time. For example: If the local time zone is UTC-7, then the interval will start at the time 14:00:00.000Z and end at the same hour the next day.

display_date

Date

The local date in the time zone of the location (civil time) which this daily forecast is calculated for. This field may be used for display purposes on the client.

daytime_forecast

ForecastDayPart

The forecasted weather conditions for the daytime part of the day (7am to 7pm local time).

nighttime_forecast

ForecastDayPart

The forecasted weather conditions for the nighttime part of the day (7pm to 7am next day, local time).

max_temperature

Temperature

The maximum (high) temperature throughout the day.

min_temperature

Temperature

The minimum (low) temperature throughout the day.

feels_like_max_temperature

Temperature

The maximum (high) feels-like temperature throughout the day.

feels_like_min_temperature

Temperature

The minimum (low) feels-like temperature throughout the day.

max_heat_index

Temperature

The maximum heat index temperature throughout the day.

sun_events

SunEvents

The events related to the sun (e.g. sunrise, sunset).

moon_events

MoonEvents

The events related to the moon (e.g. moonrise, moonset).

ice_thickness

IceThickness

The accumulated amount of ice throughout entire the day.

ForecastDayPart

Represents a forecast record for a part of the day.

Fields
interval

Interval

The UTC date and time when this part of the day starts (inclusive) and ends (exclusive). Note: a part of a day starts at 7am and ends at 7pm the same day, local time. For example: If the local time zone is UTC-7, then the daytime interval will start at the time 14:00:00.000Z and end at 02:00:00.000Z the next day and the nighttime interval will start at 02:00:00.000Z the next day and end at 14:00:00.000Z that same day.

weather_condition

WeatherCondition

The forecasted weather condition.

precipitation

Precipitation

The forecasted precipitation.

wind

Wind

The average wind direction and maximum speed and gust.

relative_humidity

int32

The forecasted percent of relative humidity (values from 0 to 100).

uv_index

int32

The maximum forecasted ultraviolet (UV) index.

thunderstorm_probability

int32

The average thunderstorm probability.

cloud_cover

int32

Average cloud cover percent.

ForecastHour

Represents an hourly forecast record at a given location.

Fields
interval

Interval

The one hour interval (in UTC time) this forecast data is valid for (the timestamps are rounded down to the closest hour).

display_date_time

DateTime

The local date and time in the time zone of the location (civil time) which this hourly forecast is calculated for. This field may be used for display purposes on the client. Note: this date will consist of the year, month, day, hour and offset from UTC.

weather_condition

WeatherCondition

The foreacasted weather condition.

temperature

Temperature

The forecasted temperature.

feels_like_temperature

Temperature

The measure of how the temperature will feel like at the requested location.

dew_point

Temperature

The forecasted dew point temperature.

heat_index

Temperature

The forecasted heat index temperature.

wind_chill

Temperature

The forecasted wind chill, air temperature exposed on the skin.

wet_bulb_temperature

Temperature

The forecasted wet bulb temperature, lowest temperature achievable by evaporating water.

precipitation

Precipitation

The forecasted precipitation probability and amount of precipitation accumulated over the last hour.

air_pressure

AirPressure

The forecasted air pressure conditions.

wind

Wind

The forecasted wind conditions.

visibility

Visibility

The forecasted visibility.

ice_thickness

IceThickness

The forecasted ice thickness.

is_daytime

bool

True if this hour is between the local sunrise (inclusive) and sunset (exclusive) times. Otherwise, it is nighttime (between the sunset and the next sunrise). Note: this hour will be considered as daytime or nighttime if the interval intersects with the local sunrise and sunset times respectively (e.g.: if the interval is from 5am to 6am and sunrise is at 5:59am, then is_daytime will be true).

relative_humidity

int32

The forecasted percent of relative humidity (values from 0 to 100).

uv_index

int32

The forecasted ultraviolet (UV) index.

thunderstorm_probability

int32

The forecasted thunderstorm probability (values from 0 to 100).

cloud_cover

int32

The forecasted percentage of the sky covered by clouds (values from 0 to 100).

HistoryHour

Represents an hourly history record at a given location.

Fields
interval

Interval

The one hour interval (in UTC time) this historical data is valid for (the timestamps are rounded down to the closest hour).

display_date_time

DateTime

The local date and time in the time zone of the location (civil time) which this hourly record is calculated for. This field may be used for display purposes on the client. Note: this date will consist of the year, month, day, hour and offset from UTC.

weather_condition

WeatherCondition

The historical weather condition.

temperature

Temperature

The historical temperature.

feels_like_temperature

Temperature

The measure of how the temperature felt like at the requested location.

dew_point

Temperature

The historical dew point temperature.

heat_index

Temperature

The historical heat index temperature.

wind_chill

Temperature

The historical wind chill, air temperature exposed on the skin.

wet_bulb_temperature

Temperature

The historical wet bulb temperature, lowest temperature achievable by evaporating water.

precipitation

Precipitation

The historical precipitation probability and amount of precipitation accumulated over the last hour.

air_pressure

AirPressure

The historical air pressure conditions.

wind

Wind

The historical wind conditions.

visibility

Visibility

The historical visibility.

ice_thickness

IceThickness

The historical ice thickness.

is_daytime

bool

True if this hour is between the local sunrise (inclusive) and sunset (exclusive) times. Otherwise, it is nighttime (between the sunset and the next sunrise). Note: this hour will be considered as daytime or nighttime if the interval intersects with the local sunrise and sunset times respectively (e.g.: if the interval is from 5am to 6am and sunrise is at 5:59am, then is_daytime will be true).

relative_humidity

int32

The historical percent of relative humidity (values from 0 to 100).

uv_index

int32

The historical ultraviolet (UV) index.

thunderstorm_probability

int32

The historical thunderstorm probability (values from 0 to 100).

cloud_cover

int32

The historical percentage of the sky covered by clouds (values from 0 to 100).

IceThickness

Represents ice thickness conditions.

Fields
unit

Unit

The code that represents the unit used to measure the ice thickness.

thickness

float

The ice thickness value.

Unit

Represents the unit used to measure the ice thickness.

Enums
UNIT_UNSPECIFIED The unit is not specified.
MILLIMETERS The thickness is measured in millimeters.
INCHES The thickness is measured in inches.

LookupCurrentConditionsRequest

Request for the LookupCurrentConditions RPC.

Fields
location

LatLng

Required. The location to get the current weather conditions for.

units_system

UnitsSystem

Optional. The units system to use for the returned weather conditions. If not provided, the returned weather conditions will be in the metric system (default = METRIC).

language_code

string

Optional. Allows the client to choose the language for the response. If data cannot be provided for that language, the API uses the closest match. Allowed values rely on the IETF BCP-47 standard. The default value is "en".

LookupCurrentConditionsResponse

Response for the LookupCurrentConditions RPC - represents the current weather conditions at the requested location.

Fields
current_time

Timestamp

Current time (UTC) associated with the returned data.

time_zone

TimeZone

The time zone at the requested location.

weather_condition

WeatherCondition

The current weather condition.

temperature

Temperature

The current temperature.

feels_like_temperature

Temperature

The measure of how the temperature currently feels like at the requested location.

dew_point

Temperature

The current dew point temperature.

heat_index

Temperature

The current heat index temperature.

wind_chill

Temperature

The current wind chill, air temperature exposed on the skin.

precipitation

Precipitation

The current precipitation probability and amount of precipitation accumulated over the last hour.

air_pressure

AirPressure

The current air pressure conditions.

wind

Wind

The current wind conditions.

visibility

Visibility

The current visibility.

current_conditions_history

CurrentConditionsHistory

The changes in the current conditions over the last 24 hours.

is_daytime

bool

True if the current time at the requested location is between the local sunrise (inclusive) and the sunset (exclusive) times. Otherwise, it is nighttime (between the sunset and the next sunrise).

relative_humidity

int32

The current percent of relative humidity (values from 0 to 100).

uv_index

int32

The current ultraviolet (UV) index.

thunderstorm_probability

int32

The current thunderstorm probability (values from 0 to 100).

cloud_cover

int32

The current percentage of the sky covered by clouds (values from 0 to 100).

CurrentConditionsHistory

Represents a set of changes in the current conditions over the last 24 hours.

Fields
temperature_change

Temperature

The current temperature minus the temperature 24 hours ago.

max_temperature

Temperature

The maximum (high) temperature in the past 24 hours.

min_temperature

Temperature

The minimum (low) temperature in the past 24 hours.

qpf

QuantitativePrecipitationForecast

The amount of precipitation (rain or snow), measured as liquid water equivalent, that has accumulated over the last 24 hours. Note: QPF is an abbreviation for Quantitative Precipitation Forecast (please see the QuantitativePrecipitationForecast definition for more details).

LookupForecastDaysRequest

Request for the LookupForecastDays RPC.

Fields
location

LatLng

Required. The location to get the daily forecast for.

units_system

UnitsSystem

Optional. The units system to use for the returned weather conditions. If not provided, the returned weather conditions will be in the metric system (default = METRIC).

page_size

int32

Optional. The maximum number of daily forecast records to return per page - a value from 1 to 10 (inclusive). The default value is 5.

page_token

string

Optional. A page token received from a previous request. It is used to retrieve the subsequent page.

days

int32

Optional. Limits the amount of total days to fetch starting from the current day - a value from 1 to 10 (inclusive). The default value is the maximum allowed value of 10.

language_code

string

Optional. Allows the client to choose the language for the response. If data cannot be provided for that language, the API uses the closest match. Allowed values rely on the IETF BCP-47 standard. The default value is "en".

LookupForecastDaysResponse

Response for the LookupForecastDays RPC.

Fields
forecast_days[]

ForecastDay

The daily forecast records, according to the number of days and page size specified in the request.

time_zone

TimeZone

The time zone at the requested location.

next_page_token

string

The token to retrieve the next page.

LookupForecastHoursRequest

Request for the LookupForecastHours RPC.

Fields
location

LatLng

Required. The location to get the hourly forecast for.

units_system

UnitsSystem

Optional. The units system to use for the returned weather conditions. If not provided, the returned weather conditions will be in the metric system (default = METRIC).

page_size

int32

Optional. The maximum number of hourly forecast records to return per page - a value from 1 to 24 (inclusive). The default is the maximum allowed value of 24.

page_token

string

Optional. A page token received from a previous request. It is used to retrieve the subsequent page.

hours

int32

Optional. Limits the amount of total hours to fetch starting from the current hour - a value from 1 to 240 (inclusive). The default is the maximum allowed value of 240.

language_code

string

Optional. Allows the client to choose the language for the response. If data cannot be provided for that language, the API uses the closest match. Allowed values rely on the IETF BCP-47 standard. The default value is "en".

LookupForecastHoursResponse

Response for the LookupForecastHours RPC.

Fields
forecast_hours[]

ForecastHour

The hourly forecast records, according to the number of hours and page size specified in the request.

time_zone

TimeZone

The time zone at the requested location.

next_page_token

string

The token to retrieve the next page.

LookupHistoryHoursRequest

Request for the LookupHistoryHours RPC.

Fields
location

LatLng

Required. The location to get the hourly historical data for.

units_system

UnitsSystem

Optional. The units system to use for the returned weather conditions. If not provided, the returned weather conditions will be in the metric system (default = METRIC).

page_size

int32

Optional. The maximum number of hourly historical records to return per page - a value from 1 to 24 (inclusive). The default is the maximum allowed value of 24.

page_token

string

Optional. A page token received from a previous request. It is used to retrieve the subsequent page.

hours

int32

Optional. Limits the amount of total hours to fetch starting from the last hour - a from 1 to 24 (inclusive). The default is the maximum allowed value of 24.

language_code

string

Optional. Allows the client to choose the language for the response. If data cannot be provided for that language, the API uses the closest match. Allowed values rely on the IETF BCP-47 standard. The default value is "en".

LookupHistoryHoursResponse

Response for the LookupHistoryHours RPC.

Fields
history_hours[]

HistoryHour

The hourly historical records, according to the number of hours and page size specified in the request.

time_zone

TimeZone

The time zone at the requested location.

next_page_token

string

The token to retrieve the next page.

MoonEvents

Represents the events related to the moon (e.g. moonrise, moonset).

Fields
moonrise_times[]

Timestamp

The time when the upper limb of the moon appears above the horizon (see https://en.wikipedia.org/wiki/Moonrise_and_moonset).

NOTE: For most cases, there'll be a single moon rise time per day. In other cases, the list might be empty (e.g. when the moon rises after next day midnight). However, in unique cases (e.g. in polar regions), the list may contain more than one value. In these cases, the values are sorted in ascending order.

moonset_times[]

Timestamp

The time when the upper limb of the moon disappears below the horizon (see https://en.wikipedia.org/wiki/Moonrise_and_moonset).

NOTE: For most cases, there'll be a single moon set time per day. In other cases, the list might be empty (e.g. when the moon sets after next day midnight). However, in unique cases (e.g. in polar regions), the list may contain more than one value. In these cases, the values are sorted in ascending order.

moon_phase

MoonPhase

The moon phase (a.k.a. lunar phase).

MoonPhase

Marks the moon phase (a.k.a. lunar phase).

Enums
MOON_PHASE_UNSPECIFIED Unspecified moon phase.
NEW_MOON The moon is not illuminated by the sun.
WAXING_CRESCENT The moon is lit by 0%-50% on its right side in the northern hemisphere 🌒 and on its left side in the southern hemisphere 🌘.
FIRST_QUARTER The moon is lit by 50.1% on its right side in the northern hemisphere 🌓 and on its left side in the southern hemisphere 🌗.
WAXING_GIBBOUS The moon is lit by 50%-100% on its right side in the northern hemisphere 🌔 and on its left side in the southern hemisphere 🌖.
FULL_MOON The moon is fully illuminated.
WANING_GIBBOUS The moon is lit by 50%-100% on its left side in the northern hemisphere 🌖 and on its right side in the southern hemisphere 🌔.
LAST_QUARTER The moon is lit by 50.1% on its left side in the northern hemisphere 🌗 and on its right side in the southern hemisphere 🌓.
WANING_CRESCENT The moon is lit by 0%-50% on its left side in the northern hemisphere 🌘 and on its right side in the southern hemisphere 🌒.

Precipitation

Represents a set of precipitation values at a given location.

Fields
probability

PrecipitationProbability

The probability of precipitation (values from 0 to 100).

qpf

QuantitativePrecipitationForecast

The amount of precipitation (rain or snow), measured as liquid water equivalent, that has accumulated over a period of time. Note: QPF is an abbreviation for Quantitative Precipitation Forecast (please see the QuantitativePrecipitationForecast definition for more details).

PrecipitationProbability

Represents the probability of precipitation at a given location.

Fields
type

PrecipitationType

A code that indicates the type of precipitation.

percent

int32

A percentage from 0 to 100 that indicates the chances of precipitation.

PrecipitationType

Represents the type of precipitation at a given location.

Enums
PRECIPITATION_TYPE_UNSPECIFIED Unspecified precipitation type.
NONE No precipitation.
SNOW Snow precipitation.
RAIN Rain precipitation.
LIGHT_RAIN Light rain precipitation.
HEAVY_RAIN Heavy rain precipitation.
RAIN_AND_SNOW Both rain and snow precipitations.
SLEET Sleet precipitation.
FREEZING_RAIN Freezing rain precipitation.

QuantitativePrecipitationForecast

Represents the expected amount of melted precipitation accumulated over a specified time period over a specified area (reference: https://en.wikipedia.org/wiki/Quantitative_precipitation_forecast) - usually abbreviated QPF for short.

Fields
unit

Unit

The code of the unit used to measure the amount of accumulated precipitation.

quantity

float

The amount of precipitation, measured as liquid water equivalent, that has accumulated over a period of time.

Unit

Represents the unit used to measure the amount of accumulated precipitation.

Enums
UNIT_UNSPECIFIED Unspecified precipitation unit.
MILLIMETERS The amount of precipitation is measured in millimeters.
INCHES The amount of precipitation is measured in inches.

SpeedUnit

Represents the unit used to measure speed.

Enums
SPEED_UNIT_UNSPECIFIED The speed unit is unspecified.
KILOMETERS_PER_HOUR The speed is measured in kilometers per hour.
MILES_PER_HOUR The speed is measured in miles per hour.

SunEvents

Represents the events related to the sun (e.g. sunrise, sunset).

Fields
sunrise_time

Timestamp

The time when the sun rises.

NOTE: In some unique cases (e.g. north of the artic circle) there may be no sunrise time for a day. In these cases, this field will be unset.

sunset_time

Timestamp

The time when the sun sets.

NOTE: In some unique cases (e.g. north of the artic circle) there may be no sunset time for a day. In these cases, this field will be unset.

Temperature

Represents a temperature value.

Fields
unit

TemperatureUnit

The code for the unit used to measure the temperature value.

degrees

float

The temperature value (in degrees) in the specified unit.

TemperatureUnit

Represents a unit used to measure temperatures.

Enums
TEMPERATURE_UNIT_UNSPECIFIED The temperature unit is unspecified.
CELSIUS The temperature is measured in Celsius.
FAHRENHEIT The temperature is measured in Fahrenheit.

UnitsSystem

Represents the units system used to measure values.

Enums
UNITS_SYSTEM_UNSPECIFIED The units system is unspecified.
IMPERIAL The imperial units system (e.g. Fahrenheit, miles, etc).
METRIC The metric units system (e.g. Celsius, kilometers, etc).

Visibility

Represents visibility conditions, the distance at which objects can be discerned.

Fields
unit

Unit

The code that represents the unit used to measure the distance.

distance

float

The visibility distance in the specified unit.

Unit

Represents the unit used to measure the visibility distance.

Enums
UNIT_UNSPECIFIED The visibility unit is unspecified.
KILOMETERS The visibility is measured in kilometers.
MILES The visibility is measured in miles.

WeatherCondition

Represents a weather condition for a given location at a given period of time.

Disclaimer: Weather icons and condition codes are subject to change. Google may introduce new codes and icons or update existing ones as needed. We encourage you to refer to this documentation regularly for the most up-to-date information.

Fields
icon_base_uri

string

The base URI for the icon not including the file type extension. To display the icon, append a theme if desired and the file type extension (.png or .svg) to this URI. By default, the icon is light themed, but _dark can be appended for dark mode. For example: "https://maps.gstatic.com/weather/v1/dust.svg" or "https://maps.gstatic.com/weather/v1/dust_dark.svg", where icon_base_uri is "https://maps.gstatic.com/weather/v1/dust".

description

LocalizedText

The textual description for this weather condition (localized).

type

Type

The type of weather condition.

Type

Marks the weather condition type in a forecast element's context.

Enums
TYPE_UNSPECIFIED The weather condition is unspecified.
CLEAR No clouds.
MOSTLY_CLEAR Periodic clouds.
PARTLY_CLOUDY Party cloudy (some clouds).
MOSTLY_CLOUDY Mostly cloudy (more clouds than sun).
CLOUDY Cloudy (all clouds, no sun).
WINDY High wind.
WIND_AND_RAIN High wind with precipitation.
LIGHT_RAIN_SHOWERS Light intermittent rain.
CHANCE_OF_SHOWERS Chance of intermittent rain.
SCATTERED_SHOWERS Intermittent rain.
RAIN_SHOWERS Showers are considered to be rainfall that has a shorter duration than rain, and is characterized by suddenness in terms of start and stop times, and rapid changes in intensity.
HEAVY_RAIN_SHOWERS Intense showers.
LIGHT_TO_MODERATE_RAIN Rain (light to moderate in quantity).
MODERATE_TO_HEAVY_RAIN Rain (moderate to heavy in quantity).
RAIN Moderate rain.
LIGHT_RAIN Light rain.
HEAVY_RAIN Heavy rain.
RAIN_PERIODICALLY_HEAVY Rain periodically heavy.
LIGHT_SNOW_SHOWERS Light snow that is falling at varying intensities for brief periods of time.
CHANCE_OF_SNOW_SHOWERS Chance of snow showers.
SCATTERED_SNOW_SHOWERS Snow that is falling at varying intensities for brief periods of time.
SNOW_SHOWERS Snow showers.
HEAVY_SNOW_SHOWERS Heavy snow showers.
LIGHT_TO_MODERATE_SNOW Light to moderate snow.
MODERATE_TO_HEAVY_SNOW Moderate to heavy snow.
SNOW Moderate snow.
LIGHT_SNOW Light snow.
HEAVY_SNOW Heavy snow.
SNOWSTORM Snow with possible thunder and lightning.
SNOW_PERIODICALLY_HEAVY Snow, at times heavy.
HEAVY_SNOW_STORM Heavy snow with possible thunder and lightning.
BLOWING_SNOW Snow with intense wind.
RAIN_AND_SNOW Rain and snow mix.
HAIL Hail.
HAIL_SHOWERS Hail that is falling at varying intensities for brief periods of time.
THUNDERSTORM Thunderstorm.
THUNDERSHOWER A shower of rain accompanied by thunder and lightning.
LIGHT_THUNDERSTORM_RAIN Light thunderstorm rain.
SCATTERED_THUNDERSTORMS Thunderstorms that has rain in various intensities for brief periods of time.
HEAVY_THUNDERSTORM Heavy thunderstorm.

Wind

Represents a set of wind properties.

Fields
direction

WindDirection

The direction of the wind, the angle it is coming from.

speed

WindSpeed

The speed of the wind.

gust

WindSpeed

The wind gust (sudden increase in the wind speed).

WindDirection

Represents the direction from which the wind originates.

Fields
cardinal

CardinalDirection

The code that represents the cardinal direction from which the wind is blowing.

degrees

int32

The direction of the wind in degrees (values from 0 to 360).

WindSpeed

Represents the speed of the wind.

Fields
unit

SpeedUnit

The code that represents the unit used to measure the wind speed.

value

float

The value of the wind speed.