MCP Tools Reference: mapstools.googleapis.com

เครื่องมือ: lookup_weather

ดึงข้อมูลสภาพอากาศที่ครอบคลุม รวมถึงสภาพอากาศปัจจุบัน การพยากรณ์อากาศรายชั่วโมง และรายวัน ข้อมูลที่เฉพาะเจาะจงที่พร้อมใช้งาน: อุณหภูมิ (ปัจจุบัน, อุณหภูมิที่รู้สึก, สูงสุด/ต่ำสุด, ดัชนีความร้อน), ลม (ความเร็ว, ลมกระโชก, ทิศทาง), ปรากฏการณ์ทางดาราศาสตร์ (พระอาทิตย์ขึ้น/ตก, ข้างขึ้นข้างแรม), ปริมาณน้ำฝน (ประเภท, ความน่าจะเป็น, ปริมาณ/QPF), สภาพอากาศ (ดัชนีรังสียูวี, ความชื้น, ปริมาณเมฆ, ความน่าจะเป็นที่จะเกิดพายุฝนฟ้าคะนอง) และที่อยู่ของสถานที่ที่เข้ารหัสพิกัดภูมิศาสตร์ ตำแหน่งและกฎตำแหน่ง (สำคัญ): ระบุตำแหน่งที่ขอข้อมูลสภาพอากาศโดยใช้ช่อง "location" ฟิลด์นี้เป็นโครงสร้าง "oneof" ซึ่งหมายความว่าคุณต้องระบุค่าสำหรับฟิลด์ย่อยตำแหน่งเพียง 1 ใน 3 รายการด้านล่างเพื่อให้มั่นใจว่าการค้นหาข้อมูลสภาพอากาศจะถูกต้อง 1. พิกัดทางภูมิศาสตร์ (lat_lng) * ใช้เมื่อได้รับพิกัดละติจูด/ลองจิจูดที่แน่นอน * ตัวอย่าง: "lat_lng": { "latitude": 34.0522, "longitude": -118.2437 } // ลอสแอนเจลิส 2. รหัสสถานที่ (place_id) * ตัวระบุสตริงที่ไม่กำกวม (รหัสสถานที่ของ Google Maps) * ดึงข้อมูล place_id ได้จากเครื่องมือ search_places * ตัวอย่าง: "place_id": "ChIJLU7jZClu5kcR4PcOOO6p3I0" // หอไอเฟล 3. สตริงที่อยู่ (address) * สตริงรูปแบบอิสระที่ต้องมีความเฉพาะเจาะจงสำหรับการเข้ารหัสพิกัดภูมิศาสตร์ * เมืองและภูมิภาค: ระบุภูมิภาค/ประเทศเสมอ (เช่น "ลอนดอน สหราชอาณาจักร" ไม่ใช่ "ลอนดอน") * ที่อยู่: ระบุที่อยู่แบบเต็ม (เช่น "1600 Pennsylvania Ave NW, Washington, DC") * รหัสไปรษณีย์: ต้องระบุชื่อประเทศด้วย (เช่น "90210, USA" ไม่ใช่ "90210") โหมดการใช้งาน: 1. สภาพอากาศปัจจุบัน: ระบุaddressเท่านั้น อย่าระบุ date และ hour 2. พยากรณ์รายชั่วโมง: ระบุ address, date และ hour (0-23) ใช้สำหรับเวลาที่เฉพาะเจาะจง (เช่น "ตอน 5 โมงเย็น") หรือคำอย่าง "อีก 2-3 ชั่วโมง" หรือ "ช่วงเย็นวันนี้" หากผู้ใช้ระบุนาที ให้ปัดเศษลงเป็นชั่วโมงที่ใกล้ที่สุด ระบบไม่รองรับการพยากรณ์รายชั่วโมงที่เกิน 48 ชั่วโมงนับจากนี้ 3. พยากรณ์อากาศประจำวัน: ระบุ address และ date อย่าระบุ hour ใช้สำหรับคำขอทั่วไปในแต่ละวัน (เช่น "สภาพอากาศวันพรุ่งนี้" "สภาพอากาศวันศุกร์" "สภาพอากาศวันที่ 25/12") หากวันที่ปัจจุบันไม่อยู่ในบริบท คุณควรชี้แจงให้ผู้ใช้ทราบ ระบบไม่รองรับการพยากรณ์อากาศรายวันเกิน 7 วัน รวมถึงวันนี้ ไม่รองรับสภาพอากาศย้อนหลัง ข้อจำกัดของพารามิเตอร์: * เขตเวลา: อินพุต date และ hour ทั้งหมดต้องสัมพันธ์กับเขตเวลาท้องถิ่นของสถานที่ตั้ง ไม่ใช่เขตเวลาของผู้ใช้ * รูปแบบวันที่: ต้องแยกอินพุตเป็นจำนวนเต็ม {year, month, day} * หน่วย: ค่าเริ่มต้นคือ METRIC ตั้งค่า units_system เป็น IMPERIAL สำหรับฟาเรนไฮต์/ไมล์ หากผู้ใช้ระบุมาตรฐานของสหรัฐอเมริกาหรือขออย่างชัดเจน

ตัวอย่างต่อไปนี้แสดงวิธีใช้ curl เพื่อเรียกใช้เครื่องมือ lookup_weather MCP

คำขอ Curl
                  
curl --location 'https://mapstools.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "lookup_weather",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

สคีมาอินพุต

คำขอสำหรับเมธอด LookupWeather - แสดงถึงสภาพอากาศในตำแหน่งที่ขอ

LookupWeatherRequest

การแสดง JSON
{
  "DEPRECATEDAddress": string,
  "unitsSystem": enum (UnitsSystem),
  "location": {
    object (Location)
  },

  // Union field _date can be only one of the following:
  "date": {
    object (google.type.Date)
  }
  // End of list of possible types for union field _date.

  // Union field _hour can be only one of the following:
  "hour": integer
  // End of list of possible types for union field _hour.
}
ช่อง
DEPRECATEDAddress
(deprecated)

string

เลิกใช้งานแล้ว: ใช้ตำแหน่งแทน

unitsSystem

enum (UnitsSystem)

ไม่บังคับ ระบบหน่วยที่ใช้สำหรับสภาพอากาศที่แสดง หากไม่ได้ระบุ ระบบจะแสดงสภาพอากาศที่ส่งคืนในระบบเมตริก (ค่าเริ่มต้น = METRIC)

location

object (Location)

ต้องระบุ สถานที่ตั้งที่จะรับข้อมูลสภาพอากาศ

ฟิลด์ Union _date

_date ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

date

object (google.type.Date)

ไม่บังคับ วันที่ของข้อมูลสภาพอากาศที่จำเป็น หมายเหตุ: วันที่นี้สัมพันธ์กับเขตเวลาท้องถิ่นของสถานที่ที่ระบุในช่องสถานที่ วันที่ต้องอยู่ภายใน 7 วันถัดไป

ฟิลด์ Union _hour

_hour ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

hour

integer

ไม่บังคับ ชั่วโมงของข้อมูลสภาพอากาศที่ขอในรูปแบบ 24 ชั่วโมง (0-23) ค่านี้สัมพันธ์กับเขตเวลาท้องถิ่นของสถานที่ตั้งที่ระบุในช่องสถานที่ตั้ง การพยากรณ์รายชั่วโมงรองรับเฉพาะ 48 ชั่วโมงถัดไปจากเวลาปัจจุบัน

วันที่

การแสดง JSON
{
  "year": integer,
  "month": integer,
  "day": integer
}
ช่อง
year

integer

ปีของวันที่ ต้องอยู่ระหว่าง 1 ถึง 9999 หรือ 0 เพื่อระบุวันที่โดยไม่มีปี

month

integer

เดือนของปี ต้องมีค่าระหว่าง 1 ถึง 12 หรือ 0 เพื่อระบุปีโดยไม่มีเดือนและวัน

day

integer

วันของเดือน ต้องมีค่าตั้งแต่ 1 ถึง 31 และใช้ได้กับปีและเดือน หรือ 0 เพื่อระบุปีอย่างเดียว หรือปีและเดือนที่ไม่มีวัน

ตำแหน่ง

การแสดง JSON
{

  // Union field location_type can be only one of the following:
  "latLng": {
    object (google.type.LatLng)
  },
  "placeId": string,
  "address": string
  // End of list of possible types for union field location_type.
}
ช่อง
ฟิลด์ Union location_type วิธีต่างๆ ในการแสดงสถานที่ location_type ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น
latLng

object (google.type.LatLng)

จุดที่ระบุโดยใช้พิกัดทางภูมิศาสตร์

placeId

string

รหัสสถานที่ที่เชื่อมโยงกับสถานที่ตั้ง

address

string

ที่อยู่ที่มนุษย์อ่านได้หรือ Plus Code ดูรายละเอียดได้ที่ https://plus.codes

LatLng

การแสดง JSON
{
  "latitude": number,
  "longitude": number
}
ช่อง
latitude

number

ละติจูดเป็นองศา ต้องอยู่ในช่วง [-90.0, +90.0]

longitude

number

ลองจิจูดในหน่วยองศา ต้องอยู่ในช่วง [-180.0, +180.0]

สคีมาเอาต์พุต

การตอบกลับสำหรับ RPC LookupWeather - แสดงถึงสภาพอากาศในตำแหน่งที่ขอ

คำตอบนี้แสดงข้อมูลทั้งรายชั่วโมงและรายวัน ดังนั้นคำตอบจึงแบ่งออกเป็น 3 ส่วน ได้แก่ รายชั่วโมง รายวัน และแชร์ ระบบจะทำเครื่องหมายช่อง Only-Hourly และ Only-Daily เป็นช่องที่ไม่บังคับ สำหรับช่องที่แชร์ระหว่างข้อมูลรายชั่วโมงและรายวัน บางช่องจะแสดงเสมอจึงไม่ได้ทำเครื่องหมายว่าไม่บังคับ ส่วนช่องอื่นๆ จะทำเครื่องหมายว่าไม่บังคับเนื่องจากไม่ได้พร้อมใช้งานเสมอไป

LookupWeatherResponse

การแสดง JSON
{
  "weatherCondition": {
    object (WeatherCondition)
  },
  "precipitation": {
    object (Precipitation)
  },
  "wind": {
    object (Wind)
  },
  "DEPRECATEDGeocodedAddress": string,
  "returnedLocation": {
    object (Location)
  },

  // Union field _temperature can be only one of the following:
  "temperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _temperature.

  // Union field _feels_like_temperature can be only one of the following:
  "feelsLikeTemperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _feels_like_temperature.

  // Union field _heat_index can be only one of the following:
  "heatIndex": {
    object (Temperature)
  }
  // End of list of possible types for union field _heat_index.

  // Union field _air_pressure can be only one of the following:
  "airPressure": {
    object (AirPressure)
  }
  // End of list of possible types for union field _air_pressure.

  // Union field _max_temperature can be only one of the following:
  "maxTemperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _max_temperature.

  // Union field _min_temperature can be only one of the following:
  "minTemperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _min_temperature.

  // Union field _feels_like_max_temperature can be only one of the following:
  "feelsLikeMaxTemperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _feels_like_max_temperature.

  // Union field _feels_like_min_temperature can be only one of the following:
  "feelsLikeMinTemperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _feels_like_min_temperature.

  // Union field _max_heat_index can be only one of the following:
  "maxHeatIndex": {
    object (Temperature)
  }
  // End of list of possible types for union field _max_heat_index.

  // Union field _sun_events can be only one of the following:
  "sunEvents": {
    object (SunEvents)
  }
  // End of list of possible types for union field _sun_events.

  // Union field _moon_events can be only one of the following:
  "moonEvents": {
    object (MoonEvents)
  }
  // End of list of possible types for union field _moon_events.

  // Union field _relative_humidity can be only one of the following:
  "relativeHumidity": integer
  // End of list of possible types for union field _relative_humidity.

  // Union field _uv_index can be only one of the following:
  "uvIndex": integer
  // End of list of possible types for union field _uv_index.

  // Union field _thunderstorm_probability can be only one of the following:
  "thunderstormProbability": integer
  // End of list of possible types for union field _thunderstorm_probability.

  // Union field _cloud_cover can be only one of the following:
  "cloudCover": integer
  // End of list of possible types for union field _cloud_cover.
}
ช่อง
weatherCondition

object (WeatherCondition)

สภาพอากาศ

precipitation

object (Precipitation)

ความน่าจะเป็นที่จะเกิดฝน/ลูกเห็บ/หิมะและปริมาณฝน/ลูกเห็บ/หิมะที่สะสม

wind

object (Wind)

สภาพลม

DEPRECATEDGeocodedAddress
(deprecated)

string

เลิกใช้งานแล้ว: ใช้ returned_location แทน

returnedLocation

object (Location)

ต้องระบุ สถานที่ตั้งที่แสดงข้อมูลสภาพอากาศ สถานที่ตั้งนี้เหมือนกับสถานที่ตั้งในคำขอ แต่จะแตกต่างจากสถานที่ตั้งในคำขอได้หากสถานที่ตั้งที่ขอเป็นที่อยู่แบบข้อความอิสระที่ค้นหาตำแหน่งแบบหยาบ (เช่น "เมาน์เทนวิว แคลิฟอร์เนีย")

ฟิลด์ Union _temperature

_temperature ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

temperature

object (Temperature)

อุณหภูมิรายชั่วโมง

ฟิลด์ Union _feels_like_temperature

_feels_like_temperature ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

feelsLikeTemperature

object (Temperature)

การวัดความรู้สึกถึงอุณหภูมิเป็นรายชั่วโมง

ฟิลด์ Union _heat_index

_heat_index ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

heatIndex

object (Temperature)

อุณหภูมิดัชนีความร้อนรายชั่วโมง

ฟิลด์ Union _air_pressure

_air_pressure ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

airPressure

object (AirPressure)

สภาพความกดอากาศรายชั่วโมง

ฟิลด์ Union _max_temperature

_max_temperature ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

maxTemperature

object (Temperature)

อุณหภูมิสูงสุดตลอดทั้งวัน

ฟิลด์ Union _min_temperature

_min_temperature ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

minTemperature

object (Temperature)

อุณหภูมิต่ำสุดตลอดทั้งวัน

ฟิลด์ Union _feels_like_max_temperature

_feels_like_max_temperature ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

feelsLikeMaxTemperature

object (Temperature)

อุณหภูมิสูงสุด (สูง) ที่รู้สึกได้ตลอดทั้งวัน

ฟิลด์ Union _feels_like_min_temperature

_feels_like_min_temperature ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

feelsLikeMinTemperature

object (Temperature)

อุณหภูมิที่รู้สึกต่ำสุด (ต่ำ) ตลอดทั้งวัน

ฟิลด์ Union _max_heat_index

_max_heat_index ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

maxHeatIndex

object (Temperature)

อุณหภูมิสูงสุดของดัชนีความร้อนตลอดทั้งวัน

ฟิลด์ Union _sun_events

_sun_events ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

sunEvents

object (SunEvents)

เหตุการณ์ที่เกี่ยวข้องกับดวงอาทิตย์ (เช่น พระอาทิตย์ขึ้น พระอาทิตย์ตก)

ฟิลด์ Union _moon_events

_moon_events ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

moonEvents

object (MoonEvents)

เหตุการณ์ที่เกี่ยวข้องกับดวงจันทร์ (เช่น ขึ้นและตก)

ฟิลด์ Union _relative_humidity

_relative_humidity ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

relativeHumidity

integer

เปอร์เซ็นต์ของความชื้นสัมพัทธ์ (ค่าตั้งแต่ 0 ถึง 100) ระบุเป็นไม่บังคับเนื่องจากไม่พร้อมใช้งานเสมอไป

ฟิลด์ Union _uv_index

_uv_index ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

uvIndex

integer

ดัชนีรังสีอัลตราไวโอเลต (UV) สูงสุด กำหนดเป็นตัวเลือกเนื่องจากอาจไม่พร้อมใช้งานเสมอไป

ฟิลด์ Union _thunderstorm_probability

_thunderstorm_probability ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

thunderstormProbability

integer

ความน่าจะเป็นที่จะเกิดพายุฝนฟ้าคะนอง (ค่าตั้งแต่ 0 ถึง 100) กำหนดเป็นไม่บังคับเนื่องจากอาจไม่พร้อมใช้งานเสมอไป

ฟิลด์ Union _cloud_cover

_cloud_cover ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

cloudCover

integer

เปอร์เซ็นต์ของท้องฟ้าที่ปกคลุมด้วยเมฆ (ค่าตั้งแต่ 0 ถึง 100) ระบุเป็นไม่บังคับเนื่องจากไม่พร้อมใช้งานเสมอไป

อุณหภูมิ

การแสดง JSON
{
  "unit": enum (TemperatureUnit),

  // Union field _degrees can be only one of the following:
  "degrees": number
  // End of list of possible types for union field _degrees.
}
ช่อง
unit

enum (TemperatureUnit)

รหัสของหน่วยที่ใช้ในการวัดค่าอุณหภูมิ

ฟิลด์ Union _degrees

_degrees ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

degrees

number

ค่าอุณหภูมิ (เป็นองศา) ในหน่วยที่ระบุ

AirPressure

การแสดง JSON
{

  // Union field _mean_sea_level_millibars can be only one of the following:
  "meanSeaLevelMillibars": number
  // End of list of possible types for union field _mean_sea_level_millibars.
}
ช่อง

ฟิลด์ Union _mean_sea_level_millibars

_mean_sea_level_millibars ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

meanSeaLevelMillibars

number

ความกดอากาศที่ระดับน้ำทะเลโดยเฉลี่ยในหน่วยมิลลิบาร์

SunEvents

การแสดง JSON
{
  "sunriseTime": string,
  "sunsetTime": string
}
ช่อง
sunriseTime

string (Timestamp format)

เวลาที่พระอาทิตย์ขึ้น

หมายเหตุ: ในบางกรณีที่พิเศษ (เช่น ทางเหนือของอาร์กติกเซอร์เคิล) อาจไม่มีเวลาพระอาทิตย์ขึ้นในวันนั้น ในกรณีเหล่านี้ ระบบจะไม่ตั้งค่าช่องนี้

ใช้ RFC 3339 โดยเอาต์พุตที่สร้างขึ้นจะได้รับการแปลงเป็นรูปแบบ Z เสมอ และใช้ตัวเลขเศษส่วน 0, 3, 6 หรือ 9 หลัก นอกจากนี้ ระบบยังยอมรับออฟเซ็ตอื่นๆ นอกเหนือจาก "Z" ด้วย เช่น "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" หรือ "2014-10-02T15:01:23+05:30"

sunsetTime

string (Timestamp format)

เวลาที่พระอาทิตย์ตก

หมายเหตุ: ในบางกรณีที่พิเศษ (เช่น ทางเหนือของอาร์กติกเซอร์เคิล) อาจไม่มีเวลาตกของดวงอาทิตย์ในวันนั้น ในกรณีเหล่านี้ ระบบจะไม่ตั้งค่าช่องนี้

ใช้ RFC 3339 โดยเอาต์พุตที่สร้างขึ้นจะได้รับการแปลงเป็นรูปแบบ Z เสมอ และใช้ตัวเลขเศษส่วน 0, 3, 6 หรือ 9 หลัก นอกจากนี้ ระบบยังยอมรับออฟเซ็ตอื่นๆ นอกเหนือจาก "Z" ด้วย เช่น "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" หรือ "2014-10-02T15:01:23+05:30"

การประทับเวลา

การแสดง JSON
{
  "seconds": string,
  "nanos": integer
}
ช่อง
seconds

string (int64 format)

แสดงวินาทีของเวลา UTC ตั้งแต่ Epoch ของ Unix 1970-01-01T00:00:00Z ต้องอยู่ระหว่าง -62135596800 ถึง 253402300799 เท่านั้น (ซึ่งสอดคล้องกับ 0001-01-01T00:00:00Z ถึง 9999-12-31T23:59:59Z)

nanos

integer

เศษส่วนของวินาทีที่ไม่เป็นลบที่ความละเอียดระดับนาโนวินาที ฟิลด์นี้คือส่วนของระยะเวลาที่เป็นนาโนวินาที ไม่ใช่ทางเลือกแทนวินาที ค่าวินาทีที่เป็นลบซึ่งมีเศษส่วนยังคงต้องมีค่านาโนที่เป็นบวกซึ่งนับไปข้างหน้าตามเวลา ต้องอยู่ระหว่าง 0 ถึง 999,999,999 เท่านั้น

MoonEvents

การแสดง JSON
{
  "moonriseTimes": [
    string
  ],
  "moonsetTimes": [
    string
  ],
  "moonPhase": enum (MoonPhase)
}
ช่อง
moonriseTimes[]

string (Timestamp format)

เวลาที่แขนบนของดวงจันทร์ปรากฏเหนือขอบฟ้า (ดู https://en.wikipedia.org/wiki/Moonrise_and_moonset)

หมายเหตุ: ในกรณีส่วนใหญ่ จะมีเวลาขึ้นของดวงจันทร์เพียงครั้งเดียวต่อวัน ในกรณีอื่นๆ รายการอาจว่างเปล่า (เช่น เมื่อดวงจันทร์ขึ้นหลังเที่ยงคืนของวันถัดไป) อย่างไรก็ตาม ในกรณีพิเศษ (เช่น ในเขตขั้วโลก) รายการอาจมีค่ามากกว่า 1 ค่า ในกรณีเหล่านี้ ระบบจะจัดเรียงค่าจากน้อยไปมาก

ใช้ RFC 3339 โดยเอาต์พุตที่สร้างขึ้นจะได้รับการแปลงเป็นรูปแบบ Z เสมอ และใช้ตัวเลขเศษส่วน 0, 3, 6 หรือ 9 หลัก นอกจากนี้ ระบบยังยอมรับออฟเซ็ตอื่นๆ นอกเหนือจาก "Z" ด้วย เช่น "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" หรือ "2014-10-02T15:01:23+05:30"

moonsetTimes[]

string (Timestamp format)

เวลาที่แขนบนของดวงจันทร์ลับหายไปใต้เส้นขอบฟ้า (ดู https://en.wikipedia.org/wiki/Moonrise_and_moonset)

หมายเหตุ: ในกรณีส่วนใหญ่ จะมีเวลาดวงจันทร์ตกเพียงครั้งเดียวต่อวัน ในกรณีอื่นๆ รายการอาจว่างเปล่า (เช่น เมื่อดวงจันทร์ตกหลังเที่ยงคืนของวันถัดไป) อย่างไรก็ตาม ในกรณีพิเศษ (เช่น ในเขตขั้วโลก) รายการอาจมีค่ามากกว่า 1 ค่า ในกรณีเหล่านี้ ระบบจะจัดเรียงค่าจากน้อยไปมาก

ใช้ RFC 3339 โดยเอาต์พุตที่สร้างขึ้นจะได้รับการแปลงเป็นรูปแบบ Z เสมอ และใช้ตัวเลขเศษส่วน 0, 3, 6 หรือ 9 หลัก นอกจากนี้ ระบบยังยอมรับออฟเซ็ตอื่นๆ นอกเหนือจาก "Z" ด้วย เช่น "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" หรือ "2014-10-02T15:01:23+05:30"

moonPhase

enum (MoonPhase)

ข้างขึ้นข้างแรม (หรือที่เรียกว่าข้างขึ้นข้างแรมของดวงจันทร์)

WeatherCondition

การแสดง JSON
{
  "iconBaseUri": string,
  "description": {
    object (google.type.LocalizedText)
  },
  "type": enum (Type)
}
ช่อง
iconBaseUri

string

URI ฐานสำหรับไอคอนที่ไม่รวมนามสกุลประเภทไฟล์ หากต้องการแสดงไอคอน ให้ต่อท้ายธีม (หากต้องการ) และนามสกุลประเภทไฟล์ (.png หรือ .svg) ไปยัง URI นี้ โดยค่าเริ่มต้น ไอคอนจะเป็นธีมสว่าง แต่สามารถเพิ่ม _dark สำหรับโหมดมืดได้ เช่น "https://maps.gstatic.com/weather/v1/dust.svg" หรือ "https://maps.gstatic.com/weather/v1/dust_dark.svg" โดยที่ icon_base_uri คือ "https://maps.gstatic.com/weather/v1/dust"

description

object (google.type.LocalizedText)

คำอธิบายที่เป็นข้อความสำหรับสภาพอากาศนี้ (แปลแล้ว)

type

enum (Type)

ประเภทสภาพอากาศ

LocalizedText

การแสดง JSON
{
  "text": string,
  "languageCode": string
}
ช่อง
text

string

สตริงที่แปลแล้วในภาษาที่สอดคล้องกับ google.type.LocalizedText.language_code ด้านล่าง

languageCode

string

รหัสภาษา BCP-47 ของข้อความ เช่น "en-US" หรือ "sr-Latn"

ดูข้อมูลเพิ่มเติมได้ที่ http://www.unicode.org/reports/tr35/#Unicode_locale_identifier

โอกาสเกิดฝน

การแสดง JSON
{
  "probability": {
    object (PrecipitationProbability)
  },
  "snowQpf": {
    object (QuantitativePrecipitationForecast)
  },
  "qpf": {
    object (QuantitativePrecipitationForecast)
  }
}
ช่อง
probability

object (PrecipitationProbability)

ความน่าจะเป็นที่จะมีฝนตก (ค่าตั้งแต่ 0 ถึง 100)

snowQpf

object (QuantitativePrecipitationForecast)

ปริมาณหิมะที่สะสมในช่วงระยะเวลาหนึ่ง ซึ่งวัดเป็นปริมาณน้ำเทียบเท่า หมายเหตุ: QPF เป็นตัวย่อของ Quantitative Precipitation Forecast (โปรดดูรายละเอียดเพิ่มเติมที่คำจำกัดความของ QuantitativePrecipitationForecast)

qpf

object (QuantitativePrecipitationForecast)

ปริมาณน้ำฝนที่วัดเป็นปริมาณน้ำเทียบเท่าที่สะสมในช่วงระยะเวลาหนึ่ง หมายเหตุ: QPF เป็นตัวย่อของ Quantitative Precipitation Forecast (โปรดดูรายละเอียดเพิ่มเติมที่คำจำกัดความของ QuantitativePrecipitationForecast)

PrecipitationProbability

การแสดง JSON
{
  "type": enum (PrecipitationType),

  // Union field _percent can be only one of the following:
  "percent": integer
  // End of list of possible types for union field _percent.
}
ช่อง
type

enum (PrecipitationType)

รหัสที่ระบุประเภทการตกตะกอน

ฟิลด์ Union _percent

_percent ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

percent

integer

เปอร์เซ็นต์ตั้งแต่ 0 ถึง 100 ที่ระบุโอกาสเกิดฝน

QuantitativePrecipitationForecast

การแสดง JSON
{
  "unit": enum (Unit),

  // Union field _quantity can be only one of the following:
  "quantity": number
  // End of list of possible types for union field _quantity.
}
ช่อง
unit

enum (Unit)

รหัสของหน่วยที่ใช้ในการวัดปริมาณน้ำฝนสะสม

ฟิลด์ Union _quantity

_quantity ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

quantity

number

ปริมาณน้ำฝนที่วัดเป็นปริมาณน้ำเทียบเท่าที่สะสมในช่วงระยะเวลาหนึ่ง

ลม

การแสดง JSON
{
  "direction": {
    object (WindDirection)
  },
  "speed": {
    object (WindSpeed)
  },
  "gust": {
    object (WindSpeed)
  }
}
ช่อง
direction

object (WindDirection)

ทิศทางลม มุมที่ลมพัดมา

speed

object (WindSpeed)

ความเร็วลม

gust

object (WindSpeed)

ลมกระโชกแรง (ความเร็วลมเพิ่มขึ้นอย่างรวดเร็ว)

WindDirection

การแสดง JSON
{
  "cardinal": enum (CardinalDirection),

  // Union field _degrees can be only one of the following:
  "degrees": integer
  // End of list of possible types for union field _degrees.
}
ช่อง
cardinal

enum (CardinalDirection)

รหัสที่แสดงทิศทางหลักที่ลมพัด

ฟิลด์ Union _degrees

_degrees ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

degrees

integer

ทิศทางลมเป็นองศา (ค่าตั้งแต่ 0 ถึง 360)

WindSpeed

การแสดง JSON
{
  "unit": enum (SpeedUnit),

  // Union field _value can be only one of the following:
  "value": number
  // End of list of possible types for union field _value.
}
ช่อง
unit

enum (SpeedUnit)

รหัสที่แสดงหน่วยที่ใช้ในการวัดความเร็วลม

ฟิลด์ Union _value

_value ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

value

number

ค่าของความเร็วลม

ตำแหน่ง

การแสดง JSON
{

  // Union field location_type can be only one of the following:
  "latLng": {
    object (google.type.LatLng)
  },
  "placeId": string,
  "address": string
  // End of list of possible types for union field location_type.
}
ช่อง
ฟิลด์ Union location_type วิธีต่างๆ ในการแสดงสถานที่ location_type ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น
latLng

object (google.type.LatLng)

จุดที่ระบุโดยใช้พิกัดทางภูมิศาสตร์

placeId

string

รหัสสถานที่ที่เชื่อมโยงกับสถานที่ตั้ง

address

string

ที่อยู่ที่มนุษย์อ่านได้หรือ Plus Code ดูรายละเอียดได้ที่ https://plus.codes

LatLng

การแสดง JSON
{
  "latitude": number,
  "longitude": number
}
ช่อง
latitude

number

ละติจูดเป็นองศา ต้องอยู่ในช่วง [-90.0, +90.0]

longitude

number

ลองจิจูดในหน่วยองศา ต้องอยู่ในช่วง [-180.0, +180.0]

คำอธิบายประกอบเครื่องมือ

คำแนะนำที่ทำให้เกิดการเปลี่ยนแปลง: ❌ | คำแนะนำที่ทำให้เกิดการเปลี่ยนแปลงแบบไอดีมโปเทนต์: ❌ | คำแนะนำแบบอ่านอย่างเดียว: ✅ | คำแนะนำแบบโลกเปิด: ❌