Weather API
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
ה-API של weather.googleapis.com.
שירות: weather.googleapis.com
כדי לקרוא לשירות הזה, מומלץ להשתמש בספריות הלקוח ש-Google מספקת. אם האפליקציה שלכם צריכה להשתמש בספריות משלכם כדי לקרוא לשירות הזה, צריך להשתמש במידע הבא כששולחים את בקשות ה-API.
מסמך Discovery
מסמך Discovery הוא מפרט שקריא למכונות, שמתאר ממשקי API ל-REST ומאפשר שימוש בהם. הוא משמש ליצירת ספריות לקוח, יישומי פלאגין ל-IDE וכלים אחרים שמקיימים אינטראקציה עם Google APIs. שירות אחד יכול לספק כמה מסמכי גילוי. השירות הזה מספק את מסמך הגילוי הבא:
נקודת קצה של שירות
נקודת קצה של שירות היא כתובת URL בסיסית שצוינה בה כתובת הרשת של שירות API. לשירות אחד יכולות להיות כמה נקודות קצה של שירות. לשירות הזה יש את נקודת הקצה הבאה, וכל מזהי ה-URI שבהמשך הם יחסיים לנקודת הקצה הזו:
https://weather.googleapis.com
Methods |
lookup |
GET /v1/currentConditions:lookup
הפונקציה מחזירה את תנאי מזג האוויר הנוכחיים במיקום נתון. |
Methods |
lookup |
GET /v1/forecast/days:lookup
הפונקציה מחזירה עד 10 ימים של תחזיות יומיות במיקום נתון, החל מהיום הנוכחי. |
Methods |
lookup |
GET /v1/forecast/hours:lookup
הפונקציה מחזירה עד 240 שעות של תחזיות שעתיות במיקום נתון, החל מהשעה הנוכחית. |
Methods |
lookup |
GET /v1/history/hours:lookup
הפונקציה מחזירה עד 24 שעות של נתוני מזג אוויר היסטוריים שעתיים במיקום נתון, החל מהשעה האחרונה. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],[],null,["# Weather API\n\nweather.googleapis.com API.\n\n- [REST Resource: v1.currentConditions](#v1.currentConditions)\n- [REST Resource: v1.forecast.days](#v1.forecast.days)\n- [REST Resource: v1.forecast.hours](#v1.forecast.hours)\n- [REST Resource: v1.history.hours](#v1.history.hours)\n\nService: weather.googleapis.com\n-------------------------------\n\nTo call this service, we recommend that you use the Google-provided [client libraries](https://cloud.google.com/apis/docs/client-libraries-explained). If your application needs to use your own libraries to call this service, use the following information when you make the API requests.\n\n### Discovery document\n\nA [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:\n\n- \u003chttps://weather.googleapis.com/$discovery/rest?version=v1\u003e\n\n### Service endpoint\n\nA [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:\n\n- `https://weather.googleapis.com`\n\nREST Resource: [v1.currentConditions](/maps/documentation/weather/reference/rest/v1/currentConditions)\n------------------------------------------------------------------------------------------------------\n\n| Methods ||\n|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|\n| [lookup](/maps/documentation/weather/reference/rest/v1/currentConditions/lookup) | `GET /v1/currentConditions:lookup` Returns the current weather conditions at a given location. |\n\nREST Resource: [v1.forecast.days](/maps/documentation/weather/reference/rest/v1/forecast.days)\n----------------------------------------------------------------------------------------------\n\n| Methods ||\n|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|\n| [lookup](/maps/documentation/weather/reference/rest/v1/forecast.days/lookup) | `GET /v1/forecast/days:lookup` Returns up to 10 days of daily forecasts at a given location, starting from the current day. |\n\nREST Resource: [v1.forecast.hours](/maps/documentation/weather/reference/rest/v1/forecast.hours)\n------------------------------------------------------------------------------------------------\n\n| Methods ||\n|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| [lookup](/maps/documentation/weather/reference/rest/v1/forecast.hours/lookup) | `GET /v1/forecast/hours:lookup` Returns up to 240 hours of hourly forecasts at a given location, starting from the current hour. |\n\nREST Resource: [v1.history.hours](/maps/documentation/weather/reference/rest/v1/history.hours)\n----------------------------------------------------------------------------------------------\n\n| Methods ||\n|------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| [lookup](/maps/documentation/weather/reference/rest/v1/history.hours/lookup) | `GET /v1/history/hours:lookup` Returns up to 24 hours of hourly historical weather data at a given location, starting from the last hour. |"]]