Omówienie interfejsu Weather API
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Interfejs Weather API umożliwia wysyłanie zapytań o dane pogodowe w czasie rzeczywistym dla konkretnych lokalizacji na całym świecie. Informacje o pogodzie obejmują temperaturę, opady, wilgotność i inne dane.
W przypadku lokalizacji o określonej szerokości i długości geograficznej interfejs API udostępnia punkty końcowe, które umożliwiają wysyłanie zapytań o:
- Aktualne warunki: bieżące warunki pogodowe.
- Prognoza godzinowa: do 240 godzin prognozowanych warunków dla wszystkich elementów.
- Prognoza dzienna: prognoza warunków na maksymalnie 10 dni dla wszystkich elementów.
- Historia godzinowa: do 24 godzin zapisanych w pamięci podręcznej danych o warunkach z przeszłości dla wszystkich elementów.
Funkcje interfejsu Weather API
Dane interfejsu Weather API obejmują:
- Warunki pogodowe i ikony: opis i odpowiednia ikona wskazujące aktualne warunki pogodowe (np. „Pochmurno” lub „Przelotne opady śniegu”).
- Temperatura: minimalna, maksymalna i odczuwalna.
- Opady: całkowita ilość opadów i rodzaj opadów (śnieg, deszcz, lód, mieszane).
- Wiatr: średnia temperatura odczuwalna, kierunek wiatru, maksymalna prędkość i porywy.
- Grubość lodu: grubość lodu.
- Wilgotność: punkt rosy, temperatura odczuwalna, temperatura mokrego termometru i wilgotność względna.
- Indeks UV: indeks promieniowania ultrafioletowego (UV).
- Prawdopodobieństwo burzy: procentowe prawdopodobieństwo wystąpienia burzy.
- Widoczność: odległość, z jakiej obiekt jest wyraźnie widoczny.
- Ciśnienie powietrza: średnie ciśnienie powietrza na poziomie morza.
- Wydarzenia związane ze słońcem i księżycem: godziny wschodu i zachodu słońca oraz wschodu i zachodu księżyca.
- Zachmurzenie: odsetek nieba pokrytego chmurami.
Jak korzystać z interfejsu Weather API
Co dalej?
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-29 UTC.
[null,null,["Ostatnia aktualizacja: 2025-08-29 UTC."],[],[],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)"]]