在开发与天气相关的应用时,获取准确的天气信息是一个关键需求。万维易源提供的“天气预报查询”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。如果你有任何问题或需要进一步的帮助,请随时访问万维易源的官方文档或联系技术支持。