- HTTP request
- Query parameters
- Request body
- Response body
- Authorization scopes
- CurrentConditionsHistory
Returns the current weather conditions at a given location.
HTTP request
GET https://weather.googleapis.com/v1/currentConditions:lookup
The URL uses gRPC Transcoding syntax.
Query parameters
Parameters | |
---|---|
location |
Required. The location to get the current weather conditions for. |
units |
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 |
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 currentConditions.lookup RPC - represents the current weather conditions at the requested location.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "currentTime": string, "timeZone": { object ( |
Fields | |
---|---|
current |
Current time (UTC) associated with the returned data. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
time |
The time zone at the requested location. |
weather |
The current weather condition. |
temperature |
The current temperature. |
feels |
The measure of how the temperature currently feels like at the requested location. |
dew |
The current dew point temperature. |
heat |
The current heat index temperature. |
wind |
The current wind chill, air temperature exposed on the skin. |
precipitation |
The current precipitation probability and amount of precipitation accumulated over the last hour. |
air |
The current air pressure conditions. |
wind |
The current wind conditions. |
visibility |
The current visibility. |
current |
The changes in the current conditions over the last 24 hours. |
is |
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 |
The current percent of relative humidity (values from 0 to 100). |
uv |
The current ultraviolet (UV) index. |
thunderstorm |
The current thunderstorm probability (values from 0 to 100). |
cloud |
The current percentage of the sky covered by clouds (values from 0 to 100). |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
CurrentConditionsHistory
Represents a set of changes in the current conditions over the last 24 hours.
JSON representation |
---|
{ "temperatureChange": { object ( |
Fields | |
---|---|
temperature |
The current temperature minus the temperature 24 hours ago. |
max |
The maximum (high) temperature in the past 24 hours. |
min |
The minimum (low) temperature in the past 24 hours. |
qpf |
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). |