在開發與天氣相關的應用時,獲取準確的天氣信息是一個關鍵需求。萬維易源提供的“天氣預報查詢”API為開發者提供了一個高效、便捷的工具,可以通過簡單的接口調用查詢全國范圍內的天氣信息。本文將詳細介紹如何使用該API,以及其核心功能和調用方法。
一、API概述
1. 接入點說明
根據地名,獲取地名對應的區域code,再根據區域code取得天氣情況。如果存在多個相同的地名,會選取第一條(數據庫中默認的區域code的排序順序取第一條)區域信息作為前提條件來查詢天氣。
2. 接口地址
```
https://route.showapi.com/9-2?appKey={your_appKey}
```
請將 `{your_appKey}` 替換為你在萬維易源平臺申請的個人 `appKey`。
3. 更新頻率
- 實時天氣和惡劣天氣預警:30分鐘更新一次。
- f1-f7預報數據:一天更新3次,分別在7:30、12:00、18:00更新從當天起往后7天的預報數據。
二、請求參數
以下是提交天氣查詢任務所需的請求參數:
表格
參數名稱 | 類型 | 示例值 | 必須 | 描述 |
---|---|---|---|---|
areaCode | String | 530700 | 否 | 要查詢的地區code。 |
area | String | 麗江 | 否 | 要查詢的地區名稱。與?areaCode ?兩個字段必須輸入其中一個。當兩者都輸入時,系統只取?areaCode 。 |
needMoreDay | String | 0 | 否 | 是否需要返回7天數據中的后4天。1 ?為返回,0 ?為不返回。 |
needIndex | String | 0 | 否 | 是否需要返回指數數據,比如穿衣指數、紫外線指數等。1 ?為返回,0 ?為不返回。 |
need3HourForcast | String | 0 | 否 | 是否需要當天每3/6/8小時一次的天氣預報列表。1 ?為需要,0 ?為不需要。注意?f1 ?是3小時間隔,但?f2 ?到?f7 ?的間隔可能是6或8小時。 |
needAlarm | String | 0 | 否 | 是否需要天氣預警。1 ?為需要,0 ?為不需要。 |
needHourData | String | 0 | 否 | 是否需要每小時數據的累積數組。由于本系統是半小時刷一次實時狀態,因此實時數組最大長度為48。每天0點長度初始化為0。1 ?為需要,0 ?為不需要。 |
三、返回參數
以下是接口返回的參數及其描述:
表格
參數名稱 | 類型 | 示例值 | 描述 | ||
---|---|---|---|---|---|
time | String | 201203061100 | 預報發布時間。 | ||
cityInfo | Object | (地區基本資料) | 查詢的地區基本資料。 | ||
- c1 | String | (區域id) | 區域id。 | ||
- c2 | String | beijing | 城市英文名。 | ||
- c3 | String | 北京 | 城市中文名。 | ||
- c4 | String | beijing | 城市所在市英文名。 | ||
- c5 | String | 北京 | 城市所在市中文名。 | ||
- c6 | String | beijing | 城市所在省英文名。 | ||
- c7 | String | 北京 | 城市所在省中文名。 | ||
- c8 | String | china | 城市所在國家英文名。 | ||
- c9 | String | 中國 | 城市所在國家中文名。 | ||
- c10 | String | 1 | 城市級別。 | ||
- c11 | String | 010 | 城市區號。 | ||
- c12 | String | 100000 | 郵編。 | ||
- longitude | String | 116.391 | 經度。 | ||
- latitude | String | 39.904 | 緯度。 | ||
- c15 | String | 33 | 海拔。 | ||
- c16 | String | AZ9010 | 雷達站號。 | ||
- c17 | String | +8 | 時區。 | ||
- c0 | String | 110114 | 地區code。 | ||
f1 | Object | (今天的天氣預報) | 今天的天氣預報。 | ||
- day_weather | String | 多云 | 白天天氣。 | ||
- night_weather | String | 暴雨 | 晚上天氣。 | ||
- day_air_temperature | String | 26 | 白天天氣溫度(攝氏度)。 | ||
- night_air_temperature | String | 12 | 晚上天氣溫度(攝氏度)。 | ||
- day_wind_direction | String | 東北風 | 白天風向編號。 | ||
- night_wind_direction | String | 西北風 | 晚上風向編號。 | ||
- day_wind_power | String | 3-4級10~17m/h | 白天風力編號。 | ||
- night_wind_power | String | 微風<10m/h | 晚上風力編號。 | ||
- sun_begin_end | String | `06:44 | 18:21` | 日出日落時間(中間用` | `分割)。 |
- index | Object | (指數對象) | 指數對象。 | ||
- beauty | String | (化妝指數) | 化妝指數。 | ||
- clothes | String | (穿衣指數) | 穿衣指數。 | ||
- cold | String | (感冒) | 感冒。 | ||
- comfort | String | (舒適) | 舒適。 | ||
- glass | String | (太陽鏡) | 太陽鏡。 | ||
- sports | String | (運動) | 運動。 | ||
- travel | String | (旅游) | 旅游。 | ||
- uv | String | (紫外線) | 紫外線。 | ||
- wash_car | String | (洗車) | 洗車。 | ||
- aqi | String | (大氣污染) | 大氣污染。 | ||
- ac | String | (空調控制) | 空調控制。 | ||
- ag | String | (過敏指數) | 過敏指數。 | ||
- cl | String | (晨練指數) | 晨練指數。 | ||
- dy | String | (釣魚指數) | 釣魚指數。 | ||
- gj | String | (逛街指數) | 逛街指數。 | ||
- hc | String | (劃船指數) | 劃船指數。 | ||
- ls | String | (晾曬指數) | 晾曬指數。 | ||
- mf | String | (美發指數) | 美發指數。 | ||
- nl | String | (夜生活指數) | 夜生活指數。 | ||
- pj | String | (啤酒指數) | 啤酒指數。 | ||
- pk | String | (放風箏指數) | 放風箏指數。 | ||
- yh | String | (約會指數) | 約會指數。 | ||
- zs | String | (中暑指數) | 中暑指數。 | ||
- xq | String | (心情指數) | 心情指數。 | ||
- day | String | 20150627 | 當前天。 | ||
- weekday | Number | 6 | 星期幾。 | ||
- day_weather_pic | String | (白天天氣圖標) | 白天天氣圖標。 | ||
- night_weather_pic | String | (晚上天氣圖標) | 晚上天氣圖標。 | ||
- day_weather_code | String | 01 | 白天的天氣編碼。 | ||
- night_weather_code | String | 02 | 晚上的天氣編碼。 | ||
- air_press | String | (大氣壓) | 大氣壓。 | ||
- jiangshui | String | (降水概率) | 降水概率。 | ||
- ziwaixian | String | 很強 | 紫外線。 | ||
f2 | String | (今天+1天后的天氣預報) | 今天+1天后的天氣預報 |
四、調用示例
以下是一個使用 curl
命令調用該接口的示例:
#查看appkey: https://www.showapi.com/console#/myApp
curl 'https://route.showapi.com/9-5?appKey=your_appKey' \-H 'Content-Type: application/x-www-form-urlencoded' \-d 'needIndex=0' \-d 'lat=40.242266' \-d 'needHourData=0' \-d 'need3HourForcast=0' \-d 'lng=116.2278' \-d 'needAlarm=0' \-d 'needMoreDay=0' \-d 'from=5'
請將 your_appKey
替換為你在萬維易源平臺申請的 appKey
。
五、返回示例
以下是接口返回的JSON示例:
{"showapi_res_error": "","showapi_res_code": 0,"showapi_res_id": "5fd9a6c68d57bae137f349d2","showapi_res_body": {"ret_code": 0,"time": "20201216120000","cityInfo": {"c6": "yunnan","c5": "麗江","c4": "lijiang","c3": "麗江","c9": "中國","c8": "china","c7": "云南","c17": "+8","c16": "AZ9888","c1": "","c2": "lijiang","c0": "530700","longitude": 100.222,"c11": "0888","latitude": 26.903,"c10": "2","c12": "674100","c15": "2394"},"now": {"aqiDetail": {"co": "0.8","num": "138","area": "麗江","so2": "6","o3": "76","no2": "12","quality": "優質","aqi": "50","pm10": "50","pm2_5": "17","o3_8h": "76","primary_pollutant": ""},"weather_code": "00","temperature_time": "14:00","wind_direction": "西南風","wind_power": "3級","sd": "15%","aqi": "50","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","rain": "0.0","temperature": "15"},"alarmList": [{"signalLevel": "藍色","issueContent": "麗江市氣象臺12月14日11時30分發布大風藍色預警:預計未來12小時,我市大部地區平均風力4~5級,局地陣風可達7級以上,容易造成樹枝刮斷,宣傳牌吹落、輕質屋頂掀起、塑料大棚破損、水面小型船只傾覆和引發各類火災等危害,請加強防范。(預警信息來源:國家預警信息發布中心)","issueTime": "2020-12-14 11:34:25","province": "云南省","signalType": "大風","city": "麗江市"},{"signalLevel": "藍色","issueContent": "云南省氣象臺2020年12月14日11時發布大風藍色預警:預計未來12小時,迪慶、麗江、大理、楚雄、昆明、玉溪北部、紅河北部、曲靖西部平均風力可達5到6級,陣風7到8級,請注意防范。(預警信息來源:國家預警信息發布中心)","province": "云南省","issueTime": "2020-12-14 11:04:57","signalType": "大風","city": ""}],"showapi_fee_code": 0,"f1": {"night_weather_code": "00","day_weather": "晴","night_weather": "晴","index": {"yh": {"title": "較適宜","desc": "雖然有點風,不用擔心天氣來調皮搗亂而影響了興致。"},"ls": {"title": "適宜","desc": "天氣不錯,適宜晾曬。趕緊把久未見陽光的衣物搬出來吸收一下太陽的味道吧!"},"clothes": {"title": "較冷","desc": "建議著厚外套加毛衣等服裝。年老體弱者宜著大衣、呢外套加羊毛衫。"},"dy": {"title": "較適宜","desc": "較適合垂釣,但風力稍大,會對垂釣產生一定的影響。"},"sports": {"title": "較適宜","desc": "溫較低,推薦您進行室內運動。"},"travel": {"title": "適宜","desc": "天氣較好,溫度適宜,是個好天氣哦。這樣的天氣適宜旅游,您可以盡情地享受大自然的風光。"},"beauty": {"title": "防曬","desc": "溫濕適宜,最好使用SPF20以上防曬霜打底,建議使用中性保濕型化妝品。"},"xq": {"title": "好","desc": "天氣較好,空氣溫潤,和風飄飄,美好的天氣會帶來一天接踵而來的好心情。"},"hc": {"title": "較適宜","desc": "氣溫低注意及時添衣,小心著涼。"},"zs": {"title": "無中暑風險","desc": "天氣舒適,令人神清氣爽的一天,不用擔心中暑的困擾。"},"cold": {"title": "少發","desc": "各項氣象條件適宜,無明顯降溫過程,發生感冒機率較低。"},"gj": {"title": "適宜","desc": "天氣較好,在這種天氣里去逛街,既可暢快地放松身心,又會有很多意外收獲,真是無比愜意。"},"comfort": {"title": "較好","desc": "偏涼或涼,部分人感覺不舒適"},"uv": {"title": "很強","desc": "紫外線輻射極強,建議涂擦SPF20以上、PA++的防曬護膚品,盡量避免暴露于日光下。"},"cl": {"title": "適宜","desc": "天氣不錯,空氣清新。"},"glass": {"title": "必要","desc": "白天天氣晴朗,太陽輻射較強,建議佩戴透射比1級且標注UV380-UV400的遮陽鏡"},"aqi": {"title": "良好","desc": "可以正常在戶外活動,易敏感人群應減少外出"},"ac": {"title": "較少開啟","desc": "您將感到很舒適,一般不需要開啟空調。"},"wash_car": {"title": "較適宜","desc": "較適宜洗車,未來一天無雨,風力較小,擦洗一新的汽車至少能保持一天。"},"mf": {"title": "一般","desc": "空氣干燥,出門前要在頭發上涂上含防曬和滋潤成分的護發品,或備好遮陽帽、遮陽傘,以減輕太陽對頭發的直接照射。"},"ag": {"title": "極不易發","desc": "天氣條件極不易誘發過敏。"},"pj": {"title": "較不適宜","desc": "您將會感到有些涼意,建議飲用常溫啤酒,并少量飲用為好。"},"nl": {"title": "較適宜","desc": "天氣較好,雖然有點風,比較適宜夜生活。"},"pk": {"title": "適宜","desc": "天氣不錯,這種天氣去放風箏既可以舒展筋骨,又可放松身心,超然自逸于廣袤的天地之間。"}},"jiangshui": "0%","air_press": "753.9hPa","night_wind_power": "0-3級 <5.4m/s","day_wind_power": "0-3級 <5.4m/s","day_weather_code": "00","3hourForcast": [{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "14","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","hour": "8時-11時","temperature_min": "6","temperature": "6"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "16","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","hour": "11時-14時","temperature_min": "6","temperature": "14"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "16","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","hour": "14時-17時","temperature_min": "14","temperature": "16"},{"precip": "0.0","wind_direction": "西南風","wind_power": "<3級","temperature_max": "16","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","hour": "17時-20時","temperature_min": "11","temperature": "15"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "15","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/night/00.png","hour": "20時-23時","temperature_min": "8","temperature": "11"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "11","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/night/00.png","hour": "23時-2時","temperature_min": "3","temperature": "8"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "8","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/night/00.png","hour": "2時-5時","temperature_min": "3","temperature": "3"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "5","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/night/00.png","hour": "5時-8時","temperature_min": "3","temperature": "3"}],"sun_begin_end": "08:00|18:28","ziwaixian": "很強","day_weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","weekday": 3,"night_air_temperature": "2","day_wind_direction": "無持續風向","day_air_temperature": "17","night_wind_direction": "無持續風向","night_weather_pic": "http://app1.showapi.com/weather/icon/night/00.png","day": "20201216"},"f3": {"night_weather_code": "00","day_weather": "小雨","night_weather": "晴","index": {"yh": {"title": "較不適宜","desc": "室外有風,而且有降水,會給室外約會帶來一些不便,如果外出約會,請一定做好準備。"},"ls": {"title": "不宜","desc": "有降水,不適宜晾曬。若需要晾曬,請在室內準備出充足的空間。"},"clothes": {"title": "較冷","desc": "建議著厚外套加毛衣等服裝。年老體弱者宜著大衣、呢外套加羊毛衫。"},"dy": {"title": "不宜","desc": "天氣不好,有風,不適合垂釣。"},"sports": {"title": "較不宜","desc": "有降水,推薦您在室內進行休閑運動。"},"travel": {"title": "適宜","desc": "溫度適宜,又有較弱降水和微風作伴,會給您的旅行帶來意想不到的景象,適宜旅游,可不要錯過機會呦!"},"beauty": {"title": "保濕","desc": "皮膚易缺水,用潤唇膏后再抹口紅,用保濕型霜類化妝品。"},"xq": {"title": "較差","desc": "有降水,雨水可能會使心緒無端地掛上輕愁,與其因下雨而無精打采,不如放松心情,好好欣賞一下雨景。你會發現雨中的世界是那般潔凈溫和、清新蔥郁。"},"hc": {"title": "不適宜","desc": "天氣不好,建議選擇別的娛樂方式。"},"zs": {"title": "無中暑風險","desc": "天氣不熱,在炎炎夏日中十分難得,可以告別暑氣漫漫啦~"},"cold": {"title": "少發","desc": "各項氣象條件適宜,無明顯降溫過程,發生感冒機率較低。"},"gj": {"title": "較不宜","desc": "有降水,較不適宜逛街,若堅持出門,請帶上雨具避免淋雨。"},"comfort": {"title": "較好","desc": "偏涼或涼,部分人感覺不舒適"},"uv": {"title": "最弱","desc": "屬弱紫外線輻射天氣,無需特別防護。若長期在戶外,建議涂擦SPF在8-12之間的防曬護膚品。"},"cl": {"title": "不宜","desc": "有較強降水,風力稍大,請避免戶外晨練,建議在室內做適當鍛煉,保持身體健康。"},"glass": {"title": "不需要","desc": "白天有降水天氣,視線較差,不需要佩戴太陽鏡"},"aqi": {"title": "良好","desc": "可以正常在戶外活動,易敏感人群應減少外出"},"ac": {"title": "較少開啟","desc": "您將感到很舒適,一般不需要開啟空調。"},"wash_car": {"title": "不宜","desc": "不宜洗車,未來24小時內有雨,如果在此期間洗車,雨水和路上的泥水可能會再次弄臟您的愛車。"},"mf": {"title": "適宜","desc": "洗發后最好用毛巾把頭發吸干,若用吹風機,吹風前記得用適合干性發質的護發素,吹風時保持10cm距離,風的溫度不要太高。"},"ag": {"title": "極不易發","desc": "天氣條件極不易誘發過敏,有降水,出行注意攜帶雨具。"},"pj": {"title": "較不適宜","desc": "您將會感到有些涼意,建議飲用常溫啤酒,并少量飲用為好。"},"nl": {"title": "較不適宜","desc": "有風,且有降水,會給您的出行帶來很大的不便,建議就近或最好在室內進行夜生活。"},"pk": {"title": "不宜","desc": "天氣不好,不適宜放風箏。"}},"jiangshui": "88%","air_press": "752.7hPa","night_wind_power": "0-3級 <5.4m/s","day_wind_power": "0-3級 <5.4m/s","day_weather_code": "07","3hourForcast": [{"precip": "0.1","wind_direction": "西風","wind_power": "<3級","temperature_max": "10","weather": "小雨","weather_pic": "http://app1.showapi.com/weather/icon/day/07.png","hour": "8時-11時","temperature_min": "2","temperature": "5"},{"precip": "0.1","wind_direction": "西風","wind_power": "<3級","temperature_max": "13","weather": "小雨","weather_pic": "http://app1.showapi.com/weather/icon/day/07.png","hour": "11時-14時","temperature_min": "5","temperature": "10"},{"precip": "0.1","wind_direction": "西風","wind_power": "<3級","temperature_max": "13","weather": "小雨","weather_pic": "http://app1.showapi.com/weather/icon/day/07.png","hour": "14時-17時","temperature_min": "10","temperature": "13"},{"precip": "0.1","wind_direction": "西南風","wind_power": "<3級","temperature_max": "13","weather": "小雨","weather_pic": "http://app1.showapi.com/weather/icon/day/07.png","hour": "17時-20時","temperature_min": "6","temperature": "13"},{"precip": "0.1","wind_direction": "西風","wind_power": "<3級","temperature_max": "13","weather": "多云","weather_pic": "http://app1.showapi.com/weather/icon/night/01.png","hour": "20時-23時","temperature_min": "3","temperature": "6"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "6","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/night/00.png","hour": "23時-2時","temperature_min": "1","temperature": "3"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "3","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/night/00.png","hour": "2時-5時","temperature_min": "0","temperature": "1"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "1","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/night/00.png","hour": "5時-8時","temperature_min": "0","temperature": "0"}],"sun_begin_end": "08:01|18:29","ziwaixian": "最弱","day_weather_pic": "http://app1.showapi.com/weather/icon/day/07.png","weekday": 5,"night_air_temperature": "0","day_wind_direction": "無持續風向","day_air_temperature": "14","night_wind_direction": "無持續風向","night_weather_pic": "http://app1.showapi.com/weather/icon/night/00.png","day": "20201218"},"f2": {"night_weather_code": "06","day_weather": "晴","night_weather": "雨夾雪","index": {"yh": {"title": "較適宜","desc": "雖然有點風,不用擔心天氣來調皮搗亂而影響了興致。"},"ls": {"title": "適宜","desc": "天氣不錯,適宜晾曬。趕緊把久未見陽光的衣物搬出來吸收一下太陽的味道吧!"},"clothes": {"title": "較冷","desc": "建議著厚外套加毛衣等服裝。年老體弱者宜著大衣、呢外套加羊毛衫。"},"dy": {"title": "較適宜","desc": "較適合垂釣,但風力稍大,會對垂釣產生一定的影響。"},"sports": {"title": "較適宜","desc": "溫較低,推薦您進行室內運動。"},"travel": {"title": "適宜","desc": "天氣較好,溫度適宜,是個好天氣哦。這樣的天氣適宜旅游,您可以盡情地享受大自然的風光。"},"beauty": {"title": "防曬","desc": "溫濕適宜,最好使用SPF20以上防曬霜打底,建議使用中性保濕型化妝品。"},"xq": {"title": "好","desc": "天氣較好,空氣溫潤,和風飄飄,美好的天氣會帶來一天接踵而來的好心情。"},"hc": {"title": "較適宜","desc": "氣溫低注意及時添衣,小心著涼。"},"zs": {"title": "無中暑風險","desc": "天氣舒適,對易中暑人群來說非常友善。"},"cold": {"title": "少發","desc": "各項氣象條件適宜,無明顯降溫過程,發生感冒機率較低。"},"gj": {"title": "適宜","desc": "天氣較好,在這種天氣里去逛街,既可暢快地放松身心,又會有很多意外收獲,真是無比愜意。"},"comfort": {"title": "較好","desc": "普遍感覺舒適"},"uv": {"title": "很強","desc": "紫外線輻射極強,建議涂擦SPF20以上、PA++的防曬護膚品,盡量避免暴露于日光下。"},"cl": {"title": "適宜","desc": "天氣不錯,空氣清新。"},"glass": {"title": "必要","desc": "白天天氣晴朗,太陽輻射較強,建議佩戴透射比1級且標注UV380-UV400的遮陽鏡"},"aqi": {"title": "良好","desc": "可以正常在戶外活動,易敏感人群應減少外出"},"ac": {"title": "較少開啟","desc": "您將感到很舒適,一般不需要開啟空調。"},"wash_car": {"title": "不宜","desc": "不宜洗車,未來24小時內有雪,如果在此期間洗車,雪水和路上的泥水可能會再次弄臟您的愛車。"},"mf": {"title": "一般","desc": "空氣干燥,出門前要在頭發上涂上含防曬和滋潤成分的護發品,或備好遮陽帽、遮陽傘,以減輕太陽對頭發的直接照射。"},"ag": {"title": "極不易發","desc": "天氣條件極不易誘發過敏。"},"pj": {"title": "較不適宜","desc": "您將會感到有些涼意,建議飲用常溫啤酒,并少量飲用為好。"},"nl": {"title": "較適宜","desc": "天氣較好,雖然有點風,比較適宜夜生活。"},"pk": {"title": "適宜","desc": "天氣不錯,這種天氣去放風箏既可以舒展筋骨,又可放松身心,超然自逸于廣袤的天地之間。"}},"jiangshui": "0%","air_press": "752.8hPa","night_wind_power": "0-3級 <5.4m/s","day_wind_power": "0-3級 <5.4m/s","day_weather_code": "00","3hourForcast": [{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "12","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","hour": "8時-11時","temperature_min": "3","temperature": "5"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "14","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","hour": "11時-14時","temperature_min": "5","temperature": "12"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "14","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","hour": "14時-17時","temperature_min": "12","temperature": "14"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "14","weather": "晴","weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","hour": "17時-20時","temperature_min": "7","temperature": "13"},{"precip": "0.0","wind_direction": "西風","wind_power": "<3級","temperature_max": "13","weather": "小雨","weather_pic": "http://app1.showapi.com/weather/icon/night/07.png","hour": "20時-23時","temperature_min": "2","temperature": "7"},{"precip": "0.1","wind_direction": "西風","wind_power": "<3級","temperature_max": "7","weather": "雨夾雪","weather_pic": "http://app1.showapi.com/weather/icon/night/06.png","hour": "23時-2時","temperature_min": "2","temperature": "2"},{"precip": "0.1","wind_direction": "西風","wind_power": "<3級","temperature_max": "2","weather": "雨夾雪","weather_pic": "http://app1.showapi.com/weather/icon/night/06.png","hour": "2時-5時","temperature_min": "2","temperature": "2"},{"precip": "0.1","wind_direction": "西風","wind_power": "<3級","temperature_max": "5","weather": "雨夾雪","weather_pic": "http://app1.showapi.com/weather/icon/night/06.png","hour": "5時-8時","temperature_min": "2","temperature": "2"}],"sun_begin_end": "08:00|18:28","ziwaixian": "很強","day_weather_pic": "http://app1.showapi.com/weather/icon/day/00.png","weekday": 4,"night_air_temperature": "2","day_air_temperature": "15","day_wind_direction": "無持續風向","day": "20201217","night_weather_pic": "http://app1.showapi.com/weather/icon/night/06.png","night_wind_direction": "無持續風向"}}
}
六、獲取appKey
要獲取 appKey
,請訪問萬維易源的控制臺頁面: 查看 appKey
七、總結
萬維易源的“全國天氣預報查詢”API為漫畫創作者提供了一個高效、便捷的工具,可以通過簡單的接口調用查詢全國范圍內的天氣信息。無論是個人創作者還是商業團隊,都能從中受益。希望本文能幫助你更好地了解和使用該API。如果你有任何問題或需要進一步的幫助,請隨時訪問萬維易源的官方文檔或聯系技術支持。