הצגת התנאים הנוכחיים
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
נקודת הקצה currentConditions מספקת מידע על תנאי מזג האוויר הנוכחיים במיקום מסוים. ה-API מחזיר את הנתונים הבאים:
- תיאור של תנאי מזג האוויר הנוכחיים עם סמל מתאים
- הטמפרטורה הנוכחית
- הטמפרטורה המורגשת
- נקודת הטל
- מדד החום
- צינת רוח
- לחות יחסית
- מדד UV
- הסבירות, האחוז וסוג המשקעים
- סבירות לסופות רעמים
- לחץ בגובה פני הים
- כיוון הרוח, המהירות והמשבים
- חשיפה וכיסוי עננים
- נתונים היסטוריים מ-24 השעות האחרונות, כולל שינויים בטמפרטורה, טמפרטורות מקסימליות ומינימליות וכמויות משקעים
APIs Explorer מאפשר לכם לשלוח בקשות בזמן אמת כדי להכיר את ה-API ואת האפשרויות שלו:
מידע על בקשות של תנאים עדכניים
כדי לבקש את התנאים הנוכחיים, שולחים בקשת HTTP GET אל:
https://weather.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY&location.latitude=LATITUDE&location.longitude=LONGITUDE
כוללים בבקשה את קואורדינטות קו האורך וקו הרוחב של המיקום בפרמטרים של כתובת ה-URL.
דוגמאות לבקשות של התנאים הנוכחיים
בדוגמה הבאה מוצגת בקשה למידע על התנאים הנוכחיים במאונטן וויו, קליפורניה:
curl -X GET "https://weather.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY&location.latitude=37.4220&location.longitude=-122.0841"
התשובה תהיה בפורמט הבא:
{
"currentTime": "2025-01-28T22:04:12.025273178Z",
"timeZone": {
"id": "America/Los_Angeles"
},
"isDaytime": true,
"weatherCondition": {
"iconBaseUri": "https://maps.gstatic.com/weather/v1/sunny",
"description": {
"text": "Sunny",
"languageCode": "en"
},
"type": "CLEAR"
},
"temperature": {
"degrees": 13.7,
"unit": "CELSIUS"
},
"feelsLikeTemperature": {
"degrees": 13.1,
"unit": "CELSIUS"
},
"dewPoint": {
"degrees": 1.1,
"unit": "CELSIUS"
},
"heatIndex": {
"degrees": 13.7,
"unit": "CELSIUS"
},
"windChill": {
"degrees": 13.1,
"unit": "CELSIUS"
},
"relativeHumidity": 42,
"uvIndex": 1,
"precipitation": {
"probability": {
"percent": 0,
"type": "RAIN"
},
"qpf": {
"quantity": 0,
"unit": "MILLIMETERS"
}
},
"thunderstormProbability": 0,
"airPressure": {
"meanSeaLevelMillibars": 1019.16
},
"wind": {
"direction": {
"degrees": 335,
"cardinal": "NORTH_NORTHWEST"
},
"speed": {
"value": 8,
"unit": "KILOMETERS_PER_HOUR"
},
"gust": {
"value": 18,
"unit": "KILOMETERS_PER_HOUR"
}
},
"visibility": {
"distance": 16,
"unit": "KILOMETERS"
},
"cloudCover": 0,
"currentConditionsHistory": {
"temperatureChange": {
"degrees": -0.6,
"unit": "CELSIUS"
},
"maxTemperature": {
"degrees": 14.3,
"unit": "CELSIUS"
},
"minTemperature": {
"degrees": 3.7,
"unit": "CELSIUS"
},
"qpf": {
"quantity": 0,
"unit": "MILLIMETERS"
}
}
}
ציון מערכת יחידות
כברירת מחדל, הנתונים שמוחזרים מ-Weather API הם במערכת המטרית. כדי לבקש נתוני מזג אוויר באמצעות המערכת האימפריאלית, מציינים את הפרמטר unitsSystem
בבקשה.
בדוגמה הבאה מוצגת בקשה לנתוני מזג אוויר של מאונטן וויו, קליפורניה, ביחידות מידה אימפריאליות:
curl -X GET "https://weather.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY&location.latitude=37.4220&location.longitude=-122.0841&unitsSystem=IMPERIAL"
התשובה תהיה בפורמט הבא:
{
"currentTime": "2025-01-28T22:13:56.723468335Z",
"timeZone": {
"id": "America/Los_Angeles"
},
"isDaytime": true,
"weatherCondition": {
"iconBaseUri": "https://maps.gstatic.com/weather/v1/sunny",
"description": {
"text": "Sunny",
"languageCode": "en"
},
"type": "CLEAR"
},
"temperature": {
"degrees": 56.6,
"unit": "FAHRENHEIT"
},
"feelsLikeTemperature": {
"degrees": 55.7,
"unit": "FAHRENHEIT"
},
"dewPoint": {
"degrees": 33.9,
"unit": "FAHRENHEIT"
},
"heatIndex": {
"degrees": 56.6,
"unit": "FAHRENHEIT"
},
"windChill": {
"degrees": 55.7,
"unit": "FAHRENHEIT"
},
"relativeHumidity": 42,
"uvIndex": 1,
"precipitation": {
"probability": {
"percent": 0,
"type": "RAIN"
},
"qpf": {
"quantity": 0,
"unit": "INCHES"
}
},
"thunderstormProbability": 0,
"airPressure": {
"meanSeaLevelMillibars": 1019.12
},
"wind": {
"direction": {
"degrees": 335,
"cardinal": "NORTH_NORTHWEST"
},
"speed": {
"value": 5,
"unit": "MILES_PER_HOUR"
},
"gust": {
"value": 11,
"unit": "MILES_PER_HOUR"
}
},
"visibility": {
"distance": 10,
"unit": "MILES"
},
"cloudCover": 0,
"currentConditionsHistory": {
"temperatureChange": {
"degrees": -1.2,
"unit": "FAHRENHEIT"
},
"maxTemperature": {
"degrees": 57.8,
"unit": "FAHRENHEIT"
},
"minTemperature": {
"degrees": 38.6,
"unit": "FAHRENHEIT"
},
"qpf": {
"quantity": 0,
"unit": "INCHES"
}
}
}
רוצה לנסות?
באמצעות APIs Explorer אפשר לשלוח בקשות לדוגמה כדי להכיר את ה-API ואת האפשרויות שלו.
לוחצים על סמל ה-API api בצד שמאל של הדף.
אפשר לערוך את פרמטרים הבקשה.
לוחצים על הלחצן Execute (הפעלה). בתיבת הדו-שיח, בוחרים את החשבון שרוצים להשתמש בו כדי לשלוח את הבקשה.
בחלונית APIs Explorer, בוחרים בסמל המסך המלא
מסך מלא כדי להרחיב את החלון של APIs Explorer.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-29 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-29 (שעון UTC)."],[],[],null,["# Get current conditions\n\nThe\n[currentConditions](/maps/documentation/weather/reference/rest/v1/currentConditions/lookup)\nendpoint provides information about the current weather conditions at a specific\nlocation. The API returns the following:\n\n- A description of the current [weather\n conditions](/maps/documentation/weather/reference/rest/v1/WeatherCondition#type) with a corresponding [icon](/maps/documentation/weather/weather-condition-icons)\n- Current temperature\n- Apparent (\"feels like\") temperature\n- Dew point\n- Heat index\n- Wind chill\n- Relative humidity\n- UV index\n- Probability, percentage, and [type](/maps/documentation/weather/reference/rest/v1/Precipitation#precipitationtype) of precipitation\n- Probability of thunderstorms\n- Sea level pressure\n- Wind [direction](/maps/documentation/weather/reference/rest/v1/Wind#cardinaldirection), speed, and gust\n- Visibility and cloud cover\n- Historical data for the past 24 hours, including temperature changes, maximum and minimum temperatures, and precipitation amounts\n\nThe APIs Explorer lets you make live requests so that you can get familiar with\nthe API and the API options: \n[Try it!](#try_it)\n\nAbout current conditions requests\n---------------------------------\n\nTo request current conditions, send an HTTP GET request to: \n\n```html\nhttps://weather.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY&location.latitude=LATITUDE&location.longitude=LONGITUDE\n```\n\nInclude the latitude and longitude coordinates of the location in your request\nURL\n[parameters](/maps/documentation/weather/reference/rest/v1/currentConditions/lookup#query-parameters).\n\nCurrent conditions request examples\n-----------------------------------\n\nThe following example requests current conditions information for Mountain View,\nCA: \n\n```bash\ncurl -X GET \"https://weather.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY&location.latitude=37.4220&location.longitude=-122.0841\"\n```\n\nThe response is in the form: \n\n```json\n{\n \"currentTime\": \"2025-01-28T22:04:12.025273178Z\",\n \"timeZone\": {\n \"id\": \"America/Los_Angeles\"\n },\n \"isDaytime\": true,\n \"weatherCondition\": {\n \"iconBaseUri\": \"https://maps.gstatic.com/weather/v1/sunny\",\n \"description\": {\n \"text\": \"Sunny\",\n \"languageCode\": \"en\"\n },\n \"type\": \"CLEAR\"\n },\n \"temperature\": {\n \"degrees\": 13.7,\n \"unit\": \"CELSIUS\"\n },\n \"feelsLikeTemperature\": {\n \"degrees\": 13.1,\n \"unit\": \"CELSIUS\"\n },\n \"dewPoint\": {\n \"degrees\": 1.1,\n \"unit\": \"CELSIUS\"\n },\n \"heatIndex\": {\n \"degrees\": 13.7,\n \"unit\": \"CELSIUS\"\n },\n \"windChill\": {\n \"degrees\": 13.1,\n \"unit\": \"CELSIUS\"\n },\n \"relativeHumidity\": 42,\n \"uvIndex\": 1,\n \"precipitation\": {\n \"probability\": {\n \"percent\": 0,\n \"type\": \"RAIN\"\n },\n \"qpf\": {\n \"quantity\": 0,\n \"unit\": \"MILLIMETERS\"\n }\n },\n \"thunderstormProbability\": 0,\n \"airPressure\": {\n \"meanSeaLevelMillibars\": 1019.16\n },\n \"wind\": {\n \"direction\": {\n \"degrees\": 335,\n \"cardinal\": \"NORTH_NORTHWEST\"\n },\n \"speed\": {\n \"value\": 8,\n \"unit\": \"KILOMETERS_PER_HOUR\"\n },\n \"gust\": {\n \"value\": 18,\n \"unit\": \"KILOMETERS_PER_HOUR\"\n }\n },\n \"visibility\": {\n \"distance\": 16,\n \"unit\": \"KILOMETERS\"\n },\n \"cloudCover\": 0,\n \"currentConditionsHistory\": {\n \"temperatureChange\": {\n \"degrees\": -0.6,\n \"unit\": \"CELSIUS\"\n },\n \"maxTemperature\": {\n \"degrees\": 14.3,\n \"unit\": \"CELSIUS\"\n },\n \"minTemperature\": {\n \"degrees\": 3.7,\n \"unit\": \"CELSIUS\"\n },\n \"qpf\": {\n \"quantity\": 0,\n \"unit\": \"MILLIMETERS\"\n }\n }\n}\n```\n\n### Specify unit system\n\nBy default, the Weather API returns data in the metric system. To request\nweather data using the imperial system, specify the `unitsSystem` parameter in\nyour request.\n\nThe following example requests weather data for Mountain View, CA in imperial\nunits: \n\n```scdoc\ncurl -X GET \"https://weather.googleapis.com/v1/currentConditions:lookup?key=YOUR_API_KEY&location.latitude=37.4220&location.longitude=-122.0841&unitsSystem=IMPERIAL\"\n```\n\nThe response is in the form: \n\n```json\n{\n \"currentTime\": \"2025-01-28T22:13:56.723468335Z\",\n \"timeZone\": {\n \"id\": \"America/Los_Angeles\"\n },\n \"isDaytime\": true,\n \"weatherCondition\": {\n \"iconBaseUri\": \"https://maps.gstatic.com/weather/v1/sunny\",\n \"description\": {\n \"text\": \"Sunny\",\n \"languageCode\": \"en\"\n },\n \"type\": \"CLEAR\"\n },\n \"temperature\": {\n \"degrees\": 56.6,\n \"unit\": \"FAHRENHEIT\"\n },\n \"feelsLikeTemperature\": {\n \"degrees\": 55.7,\n \"unit\": \"FAHRENHEIT\"\n },\n \"dewPoint\": {\n \"degrees\": 33.9,\n \"unit\": \"FAHRENHEIT\"\n },\n \"heatIndex\": {\n \"degrees\": 56.6,\n \"unit\": \"FAHRENHEIT\"\n },\n \"windChill\": {\n \"degrees\": 55.7,\n \"unit\": \"FAHRENHEIT\"\n },\n \"relativeHumidity\": 42,\n \"uvIndex\": 1,\n \"precipitation\": {\n \"probability\": {\n \"percent\": 0,\n \"type\": \"RAIN\"\n },\n \"qpf\": {\n \"quantity\": 0,\n \"unit\": \"INCHES\"\n }\n },\n \"thunderstormProbability\": 0,\n \"airPressure\": {\n \"meanSeaLevelMillibars\": 1019.12\n },\n \"wind\": {\n \"direction\": {\n \"degrees\": 335,\n \"cardinal\": \"NORTH_NORTHWEST\"\n },\n \"speed\": {\n \"value\": 5,\n \"unit\": \"MILES_PER_HOUR\"\n },\n \"gust\": {\n \"value\": 11,\n \"unit\": \"MILES_PER_HOUR\"\n }\n },\n \"visibility\": {\n \"distance\": 10,\n \"unit\": \"MILES\"\n },\n \"cloudCover\": 0,\n \"currentConditionsHistory\": {\n \"temperatureChange\": {\n \"degrees\": -1.2,\n \"unit\": \"FAHRENHEIT\"\n },\n \"maxTemperature\": {\n \"degrees\": 57.8,\n \"unit\": \"FAHRENHEIT\"\n },\n \"minTemperature\": {\n \"degrees\": 38.6,\n \"unit\": \"FAHRENHEIT\"\n },\n \"qpf\": {\n \"quantity\": 0,\n \"unit\": \"INCHES\"\n }\n }\n}\n```\n\nTry it!\n-------\n\nThe APIs Explorer lets you make sample requests so\nthat you can get familiar with the API and the API options.\n\n1. Select the API icon api\n on the right side of the page.\n\n2. Optionally edit the request parameters.\n\n3. Select the **Execute** button. In the dialog, choose the account\n that you want to use to make the request.\n\n4. In the APIs Explorer panel, select the fullscreen icon\n fullscreen to expand the APIs Explorer window."]]