Twinkle HubTwinkle Hub

縣市天氣預報 · 未來 1 週 (CWA F-D0047-091)

tw_rt_cwa_weekly_forecast

氣象水情 · 同一族🇹🇼 台灣唯讀

關鍵字 / Keywords: 天氣預報 週預報 七日預報 中央氣象署 CWA weekly forecast 7-day

臺灣各縣市未來 1 週天氣預報 (22 縣市, 逐 12 小時約 7 天: 最高/最低溫、降雨機率、天氣現象、紫外線…).

今明兩天用 tw_rt_cwa_36h_forecast;未來一週用這支.

Args: locationName: 縣市名 (e.g. "高雄市";「高雄」「台北」會對到正式名稱;多個用逗號分隔). None=全 22 縣市. 「新竹」「嘉義」市縣都有 → invalid_params 要求指定. elementName: 要哪些要素, 逗號分隔 (e.g. "紫外線指數,平均溫度"). None=預設 4 項 (天氣現象、最高溫度、 最低溫度、12小時降雨機率); "all"=全部 15 項 (另有平均溫度、體感溫度、相對濕度、露點、 舒適度、風速、風向、紫外線指數、天氣預報綜合描述; 資料量大, 建議同時給 locationName). limit: max 縣市數 (default 22).

Source: CWA F-D0047-091. License: OGDL v1 + 氣象資料開放平臺使用規範. 5-min cache.

參數

參數型別說明
locationNamestring—
elementNamestring—
limitinteger—
原始 JSON schema
{
  "properties": {
    "locationName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Locationname"
    },
    "elementName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Elementname"
    },
    "limit": {
      "default": 22,
      "title": "Limit",
      "type": "integer"
    }
  },
  "title": "tw_rt_cwa_weekly_forecastArguments",
  "type": "object",
  "additionalProperties": false
}

呼叫​方式

起手式——參數見上表
tw_rt_cwa_weekly_forecast({ locationName: "…" })