Weather API 總覽
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
您可以使用 Weather API,要求取得全球各地即時的超區域天氣資料。天氣資訊包括溫度、降水、濕度等。
對於特定經緯度的位置,API 提供端點,可讓您查詢:
- 目前天氣:目前的天氣狀況。
- 每小時天氣預報:所有天氣要素的預測狀況最多可達 240 小時。
- 每日預報:所有元素的預測狀況最多可達 10 天。
- 每小時記錄:所有元素最多 24 小時的快取過往狀況。
Weather API 的功能
天氣 API 資料包括:
- 天氣狀況和圖示:說明和相應圖示,指出目前的天氣狀況 (例如「多雲」或「偶有陣雪」)。
- 溫度:最低、最高和體感溫度。
- 降水:總降水量和降水類型 (雪、雨、冰、雨夾雪)。
- 風:平均體感溫度、風向、最大風速和陣風。
- 冰層厚度:冰層厚度。
- 濕度:露點、酷熱指數、溼球溫度和相對濕度。
- 紫外線指數:紫外線指數。
- 雷雨機率:發生雷雨的機率百分比。
- 能見度:可清楚看見物體的距離。
- 氣壓:平均海平面氣壓。
- 日出和月出活動:日出、日落、月出和月落時間。
- 雲量:雲朵遮蓋天空的百分比。
如何使用 Weather API
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[],[],null,["# Weather API overview\n\nThe Weather API lets you request real-time, hyperlocal weather data for\nlocations around the world. Weather information includes temperature,\nprecipitation, humidity, and more.\n\nFor a location at a given latitude and longitude, the API provides endpoints\nthat let you query:\n\n- **Current conditions:** The current weather conditions.\n- **Hourly forecast:** Up to 240 hours of forecasted conditions for all elements.\n- **Daily forecast:** Up to 10 days of forecasted conditions for all elements.\n- **Hourly history:** Up to 24 hours of cached past conditions for all elements.\n\nFeatures of the Weather API\n---------------------------\n\nWeather API data includes the following:\n\n- **Weather conditions and icons:** A description and corresponding icon indicating the current weather conditions (for example, \"Cloudy\" or \"Scattered snow showers\").\n- **Temperature:** Minimum, maximum, and apparent (\"feels like\") temperatures.\n- **Precipitation:** Total precipitation and precipitation type (snow, rain, ice, mix).\n- **Wind:** Average windchill, wind direction, maximum speed, and gust.\n- **Ice thickness:** Thickness of ice.\n- **Humidity:** Dew point, heat index, wet-bulb temperature, and relative humidity.\n- **UV index:** Ultraviolet (UV) index.\n- **Thunderstorm probability:** The percent chance of a thunderstorm occurring.\n- **Visibility:** The distance at which an object is clearly visible.\n- **Air pressure:** The average sea level air pressure.\n- **Sun and moon events:** Sunrise, sunset, moonrise, and moonset times.\n- **Cloud cover:** The percentage of the sky covered by clouds.\n\nHow to use the Weather API\n--------------------------\n\n|---|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Get set up** | Start with [Set up your Google Cloud project](/maps/documentation/weather/cloud-setup) and complete the instructions that follow. |\n| 2 | **Get current conditions** | See [Get current conditions](/maps/documentation/weather/current-conditions). |\n| 3 | **Get hourly forecast** | See [Get hourly forecast](/maps/documentation/weather/hourly-forecast). |\n| 4 | **Get daily forecast** | See [Get daily forecast](/maps/documentation/weather/daily-forecast). |\n| 5 | **Get hourly history** | See [Get hourly history](/maps/documentation/weather/hourly-history). |\n\nWhat's next\n-----------\n\n- [Set up your Google Cloud project](/maps/documentation/weather/cloud-setup)\n- [Get current conditions](/maps/documentation/weather/current-conditions)\n- [Get hourly forecast](/maps/documentation/weather/hourly-forecast)\n- [Get daily forecast](/maps/documentation/weather/daily-forecast)\n- [Get hourly history](/maps/documentation/weather/hourly-history)"]]