Method: publicAlerts.lookup

Returns public weather alerts for a given location.

HTTP request

GET https://weather.googleapis.com/v1/publicAlerts:lookup

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
location

object (LatLng)

Required. The location to get public weather alerts for. The service will return alerts whose affected area intersects with this location.

pageSize

integer

Optional. The maximum number of public weather alert records to return per page.

pageToken

string

Optional. A page token received from a previous publicAlerts.lookup call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to publicAlerts.lookup must match the call that provided the page token.

languageCode

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 publicAlerts.lookup RPC.

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

JSON representation
{
  "weatherAlerts": [
    {
      object (PublicAlerts)
    }
  ],
  "regionCode": string,
  "nextPageToken": string
}
Fields
weatherAlerts[]

object (PublicAlerts)

The public weather alert records, according to the number of alerts and page size specified in the request.

regionCode

string

The ISO_3166-1 alpha-2 code of the region corresponding to the location provided in the request. The region is stated using ISO_3166-1_alpha-2.

nextPageToken

string

A token that can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages.

Authorization scopes

Requires the following OAuth scope:

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

PublicAlerts

Represents the public weather alerts.

JSON representation
{
  "alertId": string,
  "alertTitle": {
    object (LocalizedText)
  },
  "eventType": enum (WeatherEventType),
  "areaName": string,
  "instruction": [
    string
  ],
  "safetyRecommendations": [
    {
      object (SafetyRecommendation)
    }
  ],
  "timezoneOffset": string,
  "startTime": string,
  "expirationTime": string,
  "dataSource": {
    object (DataSource)
  },
  "polygon": string,
  "description": string,
  "severity": enum (Severity),
  "certainty": enum (Certainty),
  "urgency": enum (Urgency)
}
Fields
alertId

string

The unique identifier for this alert.

alertTitle

object (LocalizedText)

The localized title for the alert.

eventType

enum (WeatherEventType)

The type of weather event.

areaName

string

The name of the area where the alert is issued.

instruction[]

string

Instructions recommended by the publisher. Please note that while this field should be localized, it is not guaranteed that it will be.

safetyRecommendations[]

object (SafetyRecommendation)

Safety recommendations directive to the user, these can be provided by the publisher or other authorities.

timezoneOffset

string

The time zone offset from UTC for the location of the alert. The value is formatted as a string ending in 's', e.g., "-14400s" for 4 hours behind UTC.

startTime

string (Timestamp format)

The start time of the event.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

expirationTime

string (Timestamp format)

The expiration time of the event.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

dataSource

object (DataSource)

Details of the publisher that issued the alert.

polygon

string

A GeoJSON representation of the areas where the alert is issued.

The GeoJSON data must be in RFC 7946 format and represent either a Polygon (for a single contiguous area) or a MultiPolygon (for multiple distinct areas).

Example:

{ "type": "Polygon", "coordinates": [ [ [-1, -1], [-1, 0], [0, 0], [-1, -1] ] ] }

A sample MultiPolygon GeoJson string looks like:

{ "type": "MultiPolygon", "coordinates": [ [ [0, 0], [-1, 0], [-1, 1], [0, 0] ], [ [0, 0], [-2, 0], [-2, 2], [0, 0] ] ]

description

string

The latest text describing the alert as issued by the official authority. Please note that while this field should be localized, it is not guaranteed that it will be.

severity

enum (Severity)

The severity level of the alert.

certainty

enum (Certainty)

The certainty of the alert.

urgency

enum (Urgency)

The urgency of the alert.

WeatherEventType

The type of the weather event.

Enums
WEATHER_EVENT_TYPE_UNSPECIFIED Unspecified weather event type.
ACID_RAIN Acid rain event.
AFTERSHOCK Aftershock event.
AVALANCHE Avalanche event.
BLIZZARD Blizzard event.
BLOWING_SNOW Blowing snow event.
BUSHFIRE Bushfire event.
COASTAL_FLOOD Coastal flood event.
COASTAL_HAZARD Coastal hazard event.
COLD Cold event.
CYCLONE Cyclone event.
DROUGHT Drought event.
DUST_STORM Dust storm event.
EARTHQUAKE Earthquake event.
EXTRATROPICAL_CYCLONE Extra tropical cyclone event.
FIRE Fire event.
FIRE_WEATHER Fire weather event.
FLASH_FLOOD Flash flood event.
FLOOD Flood event.
FOG Fog event.
FREEZING Freezing event.
FREEZING_AIR_TEMPERATURE Freezing air temperature event.
FREEZING_DRIZZLE Freezing drizzle event.
FREEZING_RAIN_EVENT Freezing rain event.
FROST Frost event.
GALE Gale event.
GLAZE Glaze event.
HAIL Hail event.
HAZARDOUS_SEAS Hazardous seas event.
HEAT Heat event.
HUMIDITY Humidity event.
HURRICANE Hurricane event.
ICE_STORM Ice storm event.
INDUSTRIAL_FIRE Industrial fire event.
LAKE_EFFECT_SNOW Lake effect snow event.
LANDSLIDE Landslide event.
MONSOON Monsoon event.
MUDDY_FLOOD Muddy flood event.
OUTFLOW Outflow event.
RADIATION Radiation event.
RAIN_EVENT Rain event.
RIVER_FLOODING River flooding event.
SEVERE_THUNDERSTORM_WARNING Severe thunderstorm warning event.
SNOWSQUALL Snowsquall event.
SNOW_EVENT Snow event.
STORM Storm event.
STORM_SURGE Storm surge event.
THUNDER Thunder event.
THUNDERSTORM Thunderstorm event.
TORNADO Tornado event.
TORNADO_WARNING Tornado warning event.
TROPICAL_CYCLONE Tropical cyclone event.
TROPICAL_CYCLONE_WARNINGS_AND_WATCHES Tropical cyclone warnings and watches event.
TROPICAL_DISTURBANCE Tropical disturbance event.
TROPICAL_STORM Tropical storm event.
TSUNAMI Tsunami event.
TYPHOON Typhoon event.
VOLCANIC_ASH Volcanic ash event.
VOLCANIC_ERUPTION Volcanic eruption event.
WILDFIRE Wildfire event.
WIND Wind event.
WIND_CHILL Wind chill event.
WIND_WAVE Wind wave event.
WINTER_STORM Winter storm event.

Severity

The code denoting the severity of the subject event of the alert message.

Enums
SEVERITY_UNKNOWN Severity not known.
EXTREME Extraordinary threat to life or property.
SEVERE Significant threat to life or property.
MODERATE Possible threat to life or property.
MINOR Minor threat to life or property.

Certainty

The code denoting the certainty of the subject event of the alert message.

Enums
CERTAINTY_UNKNOWN Certainty not known.
OBSERVED Determined to have occurred or to be ongoing.
VERY_LIKELY Very likely.
LIKELY Likely (p > ~50%).
POSSIBLE Possible but not likely (p <= ~50%).
UNLIKELY Unlikely (p ~ 0%).

Urgency

The code denoting the urgency of the subject event of the alert message.

Enums
URGENCY_UNKNOWN Urgency not known.
IMMEDIATE Responsive action SHOULD be taken immediately.
EXPECTED Responsive action SHOULD be taken soon (within next hour).
FUTURE Responsive action SHOULD be taken in the near future.
PAST Responsive action is no longer required.

SafetyRecommendation

Represents a safety recommendation.

JSON representation
{
  "directive": string,
  "subtext": string
}
Fields
directive

string

A directive to the user. Please note that while this field should be localized, it is not guaranteed that it will be.

subtext

string

An optional subtext for the directive, which may contain additional context for the user. Please note that while this field should be localized, it is not guaranteed that it will be.

DataSource

Represents a link to a data source.

JSON representation
{
  "publisher": enum (Publisher),
  "name": string,
  "authorityUri": string
}
Fields
publisher

enum (Publisher)

The publisher of the alert.

name

string

Official publisher name. Please note that while this field should be localized, it is not guaranteed that it will be.

authorityUri

string

The URL of the authority's website.

Publisher

The publisher of the alert.

Enums
PUBLISHER_UNSPECIFIED Publisher unspecified.
AUSTRALIA_ACT_ESA Australia Australian Capital Territory
AUSTRALIA_NSW_RFS New South Wales
AUSTRALIA_QLD_QFES Queensland
AUSTRALIA_SA_CFS South Australia
METEO_ALARM_AT Meteoalarm / EUMETNET Austria
METEO_ALARM_BS Bosnia
BRAZIL_CENAD Brazil Disaster Agency in Brazil
BRAZIL_INMET Meteorological Agency in Brazil
UK_ENV_AGENCY United Kingdom
METEO_ALARM_BG Meteoalarm / EUMETNET Bulgaria
METEO_ALARM_CR Croatia
METEO_ALARM_CY Cyprus
METEO_ALARM_CS Czechia
METEO_ALARM_DK Denmark
EC_INAMHI Ecuador
METEO_ALARM_FI Meteoalarm / EUMETNET Finland
METEO_ALARM_FR France
DE_DWD Germany
METEO_ALARM_GB Meteoalarm / EUMETNET Great Britain
METEO_ALARM_GR Greece
METEO_ALARM_HU Hungary
METEO_ALARM_IS Iceland
METEO_ALARM_IE Ireland
METEO_ALARM_IT Italy
JM_JMS Jamaica
JMA Japan
METEO_ALARM_NL Meteoalarm / EUMETNET Netherlands
METEO_ALARM_LV Latvia
METEO_ALARM_LT Lithuania
METEO_ALARM_LU Luxembourg
MEXICO_CIRES Mexico Mexico CIRES
NZ_GEONET New Zealand New Zealand GeoNet
NZ_NMS MetService
METEO_ALARM_MK Meteoalarm / EUMETNET North Macedonia
METEO_ALARM_NO Norway
PHILIPPINES_PAGASA Philippines
METEO_ALARM_PL Meteoalarm / EUMETNET Poland
METEO_ALARM_PT Portugal
METEO_ALARM_RO Romania
METEO_ALARM_RS Serbia
SG_MSS Singapore
METEO_ALARM_SK Meteoalarm / EUMETNET Slovakia
METEO_ALARM_SI Slovenia
SB_MET Solomon Islands
METEO_ALARM_ES Meteoalarm / EUMETNET Spain
METEO_ALARM_SE Sweden
METEO_ALARM_CH Switzerland
TAIWAN_NCDR Taiwan
NOAA United States NOAA
WCATWC National Tsunami Warning Center