Method: forecast.hours.lookup

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

HTTP request

GET https://weather.googleapis.com/v1/forecast/hours:lookup

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
location

object ( LatLng )

Required. The location to get the hourly forecast for.

units System

enum ( 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

integer

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

integer

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".

Request body

The request body must be empty.

Response body

Response for the hours.lookup RPC.

If successful, the response body contains data with the following structure:

JSON representation
 { 
 "forecastHours" 
 : 
 [ 
 { 
 object (  ForecastHour 
 
) 
 } 
 ] 
 , 
 "timeZone" 
 : 
 { 
 object (  TimeZone 
 
) 
 } 
 , 
 "nextPageToken" 
 : 
 string 
 } 
Fields
forecast Hours[]

object ( ForecastHour )

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

time Zone

object ( TimeZone )

The time zone at the requested location.

next Page Token

string

The token to retrieve the next page.

Authorization scopes

Requires the following OAuth scope:

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

ForecastHour

Represents an hourly forecast record at a given location.

JSON representation
 { 
 "interval" 
 : 
 { 
 object (  Interval 
 
) 
 } 
 , 
 "displayDateTime" 
 : 
 { 
 object (  DateTime 
 
) 
 } 
 , 
 "weatherCondition" 
 : 
 { 
 object (  WeatherCondition 
 
) 
 } 
 , 
 "temperature" 
 : 
 { 
 object (  Temperature 
 
) 
 } 
 , 
 "feelsLikeTemperature" 
 : 
 { 
 object (  Temperature 
 
) 
 } 
 , 
 "dewPoint" 
 : 
 { 
 object (  Temperature 
 
) 
 } 
 , 
 "heatIndex" 
 : 
 { 
 object (  Temperature 
 
) 
 } 
 , 
 "windChill" 
 : 
 { 
 object (  Temperature 
 
) 
 } 
 , 
 "wetBulbTemperature" 
 : 
 { 
 object (  Temperature 
 
) 
 } 
 , 
 "precipitation" 
 : 
 { 
 object (  Precipitation 
 
) 
 } 
 , 
 "airPressure" 
 : 
 { 
 object (  AirPressure 
 
) 
 } 
 , 
 "wind" 
 : 
 { 
 object (  Wind 
 
) 
 } 
 , 
 "visibility" 
 : 
 { 
 object (  Visibility 
 
) 
 } 
 , 
 "iceThickness" 
 : 
 { 
 object (  IceThickness 
 
) 
 } 
 , 
 "isDaytime" 
 : 
 boolean 
 , 
 "relativeHumidity" 
 : 
 integer 
 , 
 "uvIndex" 
 : 
 integer 
 , 
 "thunderstormProbability" 
 : 
 integer 
 , 
 "cloudCover" 
 : 
 integer 
 } 
Fields
interval

object ( 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

object ( 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

object ( WeatherCondition )

The foreacasted weather condition.

temperature

object ( Temperature )

The forecasted temperature.

feels Like Temperature

object ( Temperature )

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

dew Point

object ( Temperature )

The forecasted dew point temperature.

heat Index

object ( Temperature )

The forecasted heat index temperature.

wind Chill

object ( Temperature )

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

wet Bulb Temperature

object ( Temperature )

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

precipitation

object ( Precipitation )

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

air Pressure

object ( AirPressure )

The forecasted air pressure conditions.

wind

object ( Wind )

The forecasted wind conditions.

visibility

object ( Visibility )

The forecasted visibility.

ice Thickness

object ( IceThickness )

The forecasted ice thickness.

is Daytime

boolean

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 isDaytime will be true).

relative Humidity

integer

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

uv Index

integer

The forecasted ultraviolet (UV) index.

thunderstorm Probability

integer

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

cloud Cover

integer

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

Create a Mobile Website
View Site in Mobile | Classic
Share by: