七日天气接口
其他 官方文档
该接口最快3小时更新一次,包含基本天气信息、气象预警、湿度、能见度、气压、日出日落、每日小时预报、6大生活指数等
基本说明:
接口地址:https://yiketianqi.com/api
返回格式:json
请求方式:get/post
请求示例:https://yiketianqi.com/api?unescape=1&version=v1&appid=858414&appsecret=EKCDLT4I
请求参数说明:
名称 类型 必填 说明
appid string 必填 账号ID 扫码关注公众号
appsecret string 必填 账号密钥 扫码关注公众号
city string 选填 城市名称
返回参数说明:
名称 类型 说明
cityid string 城市ID
update_time string 气象台更新时间
city string 城市名称
cityEn string 城市英文名称
country string 国家名称
countryEn string 国家英文名称
data string 每日数据列表
wea string 天气情况
wea_img string 天气情况对应图标
tem string 实时温度
tem1 string 高温
tem2 string 低温
win string 风向
win_speed string 风力等级
humidity string 湿度
sunrise string 日出
sunset string 日出
visibility string 能见度
pressure string 气压hPa
air string 空气质量
air_level string 空气质量等级
air_tips string 空气质量描述
alarm string 气象预警
alarm_type string 预警类型
alarm_level string 预警级别
alarm_level string 预警详细信息
hours string 小时预报
hours string 时间点
wea string 天气
wea_img string 天气图标
tem string 温度
win string 风向
win_speed string 风力等级
index string 生活指数
title string 指数类型
level string 级别
desc string 描述
aqi string 空气质量指数
air string 空气质量
air_level string 空气质量等级
air_tips string 空气质量提示
pm25 string PM2.5
pm25_desc string PM2.5等级描述
pm10 string PM10
pm10_desc string PM10等级描述
o3 string o3
o3_desc string o3等级描述
no2 string no2
no2_desc string no2等级描述
so2 string so2
so2_desc string so2等级描述
kouzhao string 是否需要带口罩
waichu string 外出适宜
kaichuang string 开窗适宜
jinghuaqi string 是否需要打开净化器
JSON返回示例:
{
	"cityid": "101190401",
	"city": "苏州",
	"cityEn": "suzhou",
	"country": "中国",
	"countryEn": "China",
	"update_time": "2022-04-08 20:34:46",
	"data": [{
		"day": "08日(星期五)",
		"date": "2022-04-08",
		"week": "星期五",
		"wea": "晴",
		"wea_img": "qing",
		"wea_day": "晴",
		"wea_day_img": "qing",
		"wea_night": "晴",
		"wea_night_img": "qing",
		"tem": "21℃",
		"tem1": "28℃",
		"tem2": "15℃",
		"humidity": "38%",
		"visibility": "26km",
		"pressure": "1013",
		"win": ["南风", "东南风"],
		"win_speed": "3-4级转4-5级",
		"win_meter": "12km\/h",
		"sunrise": "05:38",
		"sunset": "18:21",
		"air": "57",
		"air_level": "良",
		"air_tips": "空气好,可以外出活动,除极少数对污染物特别敏感的人群以外,对公众没有危害!",
		"alarm": {
			"alarm_type": "",
			"alarm_level": "",
			"alarm_content": ""
		},
		"hours": [{
			"hours": "08时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "19",
			"win": "南风",
			"win_speed": "<3级"
		}, {
			"hours": "09时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "21",
			"win": "南风",
			"win_speed": "<3级"
		}, {
			"hours": "10时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "24",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "11时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "26",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "12时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "27",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "13时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "27",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "14时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "27",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "15时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "27",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "16时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "27",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "17时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "26",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "18时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "24",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "19时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "22",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "20时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "21",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "21时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "20",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "22时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "19",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "23时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "18",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "00时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "18",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "01时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "17",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "02时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "17",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "03时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "16",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "04时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "16",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "05时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "15",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "06时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "16",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "07时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "18",
			"win": "南风",
			"win_speed": "3-4级"
		}],
		"index": [{
			"title": "紫外线指数",
			"level": "很强",
			"desc": "涂擦SPF20以上,PA++护肤品,避强光。"
		}, {
			"title": "减肥指数",
			"level": "一颗星",
			"desc": "夏天悄然到,肉已无处藏。风虽有点大,室内可健身。"
		}, {
			"title": "血糖指数",
			"level": "易波动",
			"desc": "风力较大,血糖易波动,注意监测。"
		}, {
			"title": "穿衣指数",
			"level": "热",
			"desc": "适合穿T恤、短薄外套等夏季服装。"
		}, {
			"title": "洗车指数",
			"level": "较不宜",
			"desc": "风力较大,洗车后会蒙上灰尘。"
		}, {
			"title": "空气污染扩散指数",
			"level": "良",
			"desc": "气象条件有利于空气污染物扩散。"
		}]
	}, {
		"day": "09日(星期六)",
		"date": "2022-04-09",
		"week": "星期六",
		"wea": "晴转多云",
		"wea_img": "yun",
		"wea_day": "晴",
		"wea_day_img": "qing",
		"wea_night": "多云",
		"wea_night_img": "yun",
		"tem": "28℃",
		"tem1": "28℃",
		"tem2": "17℃",
		"humidity": "",
		"visibility": "",
		"pressure": "",
		"win": ["东南风", "东南风"],
		"win_speed": "4-5级",
		"win_meter": "",
		"sunrise": "05:36",
		"sunset": "18:21",
		"air": "46",
		"air_level": "优",
		"air_tips": "",
		"alarm": {
			"alarm_type": "",
			"alarm_level": "",
			"alarm_content": ""
		},
		"hours": [{
			"hours": "08时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "19",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "09时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "22",
			"win": "南风",
			"win_speed": "4-5级"
		}, {
			"hours": "10时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "24",
			"win": "南风",
			"win_speed": "4-5级"
		}, {
			"hours": "11时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "26",
			"win": "南风",
			"win_speed": "4-5级"
		}, {
			"hours": "12时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "27",
			"win": "南风",
			"win_speed": "4-5级"
		}, {
			"hours": "13时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "27",
			"win": "南风",
			"win_speed": "4-5级"
		}, {
			"hours": "14时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "28",
			"win": "南风",
			"win_speed": "4-5级"
		}, {
			"hours": "15时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "28",
			"win": "南风",
			"win_speed": "4-5级"
		}, {
			"hours": "16时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "27",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "17时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "27",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "18时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "25",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "19时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "24",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "20时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "22",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "21时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "20",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "22时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "20",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "23时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "19",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "00时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "19",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "01时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "18",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "02时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "18",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "03时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "18",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "04时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "18",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "05时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "17",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "06时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "18",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "07时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "19",
			"win": "东南风",
			"win_speed": "4-5级"
		}],
		"index": [{
			"title": "紫外线指数",
			"level": "很强",
			"desc": "涂擦SPF20以上,PA++护肤品,避强光。"
		}, {
			"title": "减肥指数",
			"level": "一颗星",
			"desc": "夏天悄然到,肉已无处藏。风虽有点大,室内可健身。"
		}, {
			"title": "血糖指数",
			"level": "易波动",
			"desc": "风力较大,血糖易波动,注意监测。"
		}, {
			"title": "穿衣指数",
			"level": "热",
			"desc": "适合穿T恤、短薄外套等夏季服装。"
		}, {
			"title": "洗车指数",
			"level": "较不宜",
			"desc": "风力较大,洗车后会蒙上灰尘。"
		}, {
			"title": "空气污染扩散指数",
			"level": "良",
			"desc": "气象条件有利于空气污染物扩散。"
		}]
	}, {
		"day": "10日(星期日)",
		"date": "2022-04-10",
		"week": "星期日",
		"wea": "多云",
		"wea_img": "yun",
		"wea_day": "多云",
		"wea_day_img": "yun",
		"wea_night": "多云",
		"wea_night_img": "yun",
		"tem": "25℃",
		"tem1": "25℃",
		"tem2": "17℃",
		"humidity": "",
		"visibility": "",
		"pressure": "",
		"win": ["东南风", "东南风"],
		"win_speed": "4-5级",
		"win_meter": "",
		"sunrise": "05:35",
		"sunset": "18:22",
		"air": "44",
		"air_level": "优",
		"air_tips": "",
		"alarm": {
			"alarm_type": "",
			"alarm_level": "",
			"alarm_content": ""
		},
		"hours": [{
			"hours": "08时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "19",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "09时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "20",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "10时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "22",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "11时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "23",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "12时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "23",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "13时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "24",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "14时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "24",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "15时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "24",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "16时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "23",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "17时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "22",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "18时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "22",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "19时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "21",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "20时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "21",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "21时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "20",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "22时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "20",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "23时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "19",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "00时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "19",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "01时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "18",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "02时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "18",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "03时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "18",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "04时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "18",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "05时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "17",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "06时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "19",
			"win": "东南风",
			"win_speed": "4-5级"
		}, {
			"hours": "07时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "20",
			"win": "南风",
			"win_speed": "4-5级"
		}],
		"index": [{
			"title": "紫外线指数",
			"level": "弱",
			"desc": "辐射较弱,涂擦SPF12-15、PA+护肤品。"
		}, {
			"title": "减肥指数",
			"level": "一颗星",
			"desc": "夏天悄然到,肉已无处藏。风虽有点大,室内可健身。"
		}, {
			"title": "血糖指数",
			"level": "易波动",
			"desc": "风力较大,血糖易波动,注意监测。"
		}, {
			"title": "穿衣指数",
			"level": "舒适",
			"desc": "建议穿长袖衬衫单裤等服装。"
		}, {
			"title": "洗车指数",
			"level": "较不宜",
			"desc": "风力较大,洗车后会蒙上灰尘。"
		}, {
			"title": "空气污染扩散指数",
			"level": "良",
			"desc": "气象条件有利于空气污染物扩散。"
		}]
	}, {
		"day": "11日(星期一)",
		"date": "2022-04-11",
		"week": "星期一",
		"wea": "晴转多云",
		"wea_img": "yun",
		"wea_day": "晴",
		"wea_day_img": "qing",
		"wea_night": "多云",
		"wea_night_img": "yun",
		"tem": "30℃",
		"tem1": "30℃",
		"tem2": "17℃",
		"humidity": "",
		"visibility": "",
		"pressure": "",
		"win": ["东南风", "东南风"],
		"win_speed": "3-4级",
		"win_meter": "",
		"sunrise": "05:34",
		"sunset": "18:23",
		"air": "46",
		"air_level": "优",
		"air_tips": "",
		"alarm": {
			"alarm_type": "",
			"alarm_level": "",
			"alarm_content": ""
		},
		"hours": [{
			"hours": "08时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "21",
			"win": "南风",
			"win_speed": "4-5级"
		}, {
			"hours": "09时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "23",
			"win": "南风",
			"win_speed": "4-5级"
		}, {
			"hours": "10时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "26",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "11时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "28",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "12时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "29",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "13时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "29",
			"win": "西南风",
			"win_speed": "3-4级"
		}, {
			"hours": "14时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "30",
			"win": "西南风",
			"win_speed": "3-4级"
		}, {
			"hours": "15时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "29",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "16时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "29",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "17时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "28",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "18时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "27",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "19时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "25",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "20时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "24",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "23时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "21",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "02时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "20",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "05时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "19",
			"win": "东南风",
			"win_speed": "3-4级"
		}],
		"index": [{
			"title": "紫外线指数",
			"level": "很强",
			"desc": "涂擦SPF20以上,PA++护肤品,避强光。"
		}, {
			"title": "减肥指数",
			"level": "一颗星",
			"desc": "夏天悄然到,肉已无处藏。风虽有点大,室内可健身。"
		}, {
			"title": "血糖指数",
			"level": "易波动",
			"desc": "气温多变,血糖易波动,请注意监测。"
		}, {
			"title": "穿衣指数",
			"level": "热",
			"desc": "适合穿T恤、短薄外套等夏季服装。"
		}, {
			"title": "洗车指数",
			"level": "较不宜",
			"desc": "风力较大,洗车后会蒙上灰尘。"
		}, {
			"title": "空气污染扩散指数",
			"level": "良",
			"desc": "气象条件有利于空气污染物扩散。"
		}]
	}, {
		"day": "12日(星期二)",
		"date": "2022-04-12",
		"week": "星期二",
		"wea": "多云转小雨",
		"wea_img": "yun",
		"wea_day": "多云",
		"wea_day_img": "yun",
		"wea_night": "小雨",
		"wea_night_img": "yu",
		"tem": "31℃",
		"tem1": "31℃",
		"tem2": "15℃",
		"humidity": "",
		"visibility": "",
		"pressure": "",
		"win": ["东南风", "东北风"],
		"win_speed": "3-4级转4-5级",
		"win_meter": "",
		"sunrise": "05:33",
		"sunset": "18:23",
		"air": "28",
		"air_level": "优",
		"air_tips": "",
		"alarm": {
			"alarm_type": "",
			"alarm_level": "",
			"alarm_content": ""
		},
		"hours": [{
			"hours": "08时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "23",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "11时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "27",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "14时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "30",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "17时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "26",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "20时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "22",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "23时",
			"wea": "小雨",
			"wea_img": "yu",
			"tem": "20",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "02时",
			"wea": "中雨",
			"wea_img": "yu",
			"tem": "19",
			"win": "东北风",
			"win_speed": "3-4级"
		}, {
			"hours": "05时",
			"wea": "中雨",
			"wea_img": "yu",
			"tem": "16",
			"win": "南风",
			"win_speed": "3-4级"
		}],
		"index": [{
			"title": "紫外线指数",
			"level": "很强",
			"desc": "涂擦SPF20以上,PA++护肤品,避强光。"
		}, {
			"title": "减肥指数",
			"level": "一颗星",
			"desc": "夏天悄然到,肉已无处藏。风虽有点大,室内可健身。"
		}, {
			"title": "血糖指数",
			"level": "易波动",
			"desc": "风力较大,血糖易波动,注意监测。"
		}, {
			"title": "穿衣指数",
			"level": "炎热",
			"desc": "建议穿短衫、短裤等清凉夏季服装。"
		}, {
			"title": "洗车指数",
			"level": "不宜",
			"desc": "有雨,雨水和泥水会弄脏爱车。"
		}, {
			"title": "空气污染扩散指数",
			"level": "良",
			"desc": "气象条件有利于空气污染物扩散。"
		}]
	}, {
		"day": "13日(星期三)",
		"date": "2022-04-13",
		"week": "星期三",
		"wea": "中雨转多云",
		"wea_img": "yun",
		"wea_day": "中雨",
		"wea_day_img": "yu",
		"wea_night": "多云",
		"wea_night_img": "yun",
		"tem": "18℃",
		"tem1": "18℃",
		"tem2": "11℃",
		"humidity": "",
		"visibility": "",
		"pressure": "",
		"win": ["北风", "北风"],
		"win_speed": "4-5级转3-4级",
		"win_meter": "",
		"sunrise": "05:32",
		"sunset": "18:24",
		"air": "29",
		"air_level": "优",
		"air_tips": "",
		"alarm": {
			"alarm_type": "",
			"alarm_level": "",
			"alarm_content": ""
		},
		"hours": [{
			"hours": "08时",
			"wea": "阴",
			"wea_img": "yin",
			"tem": "16",
			"win": "东北风",
			"win_speed": "3-4级"
		}, {
			"hours": "11时",
			"wea": "中雨",
			"wea_img": "yu",
			"tem": "17",
			"win": "西风",
			"win_speed": "3-4级"
		}, {
			"hours": "14时",
			"wea": "中雨",
			"wea_img": "yu",
			"tem": "18",
			"win": "北风",
			"win_speed": "3-4级"
		}, {
			"hours": "17时",
			"wea": "中雨",
			"wea_img": "yu",
			"tem": "18",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "20时",
			"wea": "中雨",
			"wea_img": "yu",
			"tem": "17",
			"win": "北风",
			"win_speed": "3-4级"
		}, {
			"hours": "23时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "14",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "02时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "12",
			"win": "北风",
			"win_speed": "3-4级"
		}, {
			"hours": "05时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "13",
			"win": "南风",
			"win_speed": "3-4级"
		}],
		"index": [{
			"title": "紫外线指数",
			"level": "最弱",
			"desc": "辐射弱,涂擦SPF8-12防晒护肤品。"
		}, {
			"title": "减肥指数",
			"level": "一颗星",
			"desc": "风雨相伴,坚持室内运动吧。"
		}, {
			"title": "血糖指数",
			"level": "易波动",
			"desc": "气温多变,血糖易波动,注意监测血糖变化。"
		}, {
			"title": "穿衣指数",
			"level": "较冷",
			"desc": "建议着厚外套加毛衣等服装。"
		}, {
			"title": "洗车指数",
			"level": "不宜",
			"desc": "有雨,雨水和泥水会弄脏爱车。"
		}, {
			"title": "空气污染扩散指数",
			"level": "优",
			"desc": "气象条件非常有利于空气污染物扩散。"
		}]
	}, {
		"day": "14日(星期四)",
		"date": "2022-04-14",
		"week": "星期四",
		"wea": "多云",
		"wea_img": "yun",
		"wea_day": "多云",
		"wea_day_img": "yun",
		"wea_night": "多云",
		"wea_night_img": "yun",
		"tem": "22℃",
		"tem1": "22℃",
		"tem2": "14℃",
		"humidity": "",
		"visibility": "",
		"pressure": "",
		"win": ["东北风", "东北风"],
		"win_speed": "3-4级",
		"win_meter": "",
		"sunrise": "05:30",
		"sunset": "18:25",
		"air": "42",
		"air_level": "优",
		"air_tips": "",
		"alarm": {
			"alarm_type": "",
			"alarm_level": "",
			"alarm_content": ""
		},
		"hours": [{
			"hours": "08时",
			"wea": "晴",
			"wea_img": "qing",
			"tem": "14",
			"win": "西北风",
			"win_speed": "3-4级"
		}, {
			"hours": "11时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "19",
			"win": "东风",
			"win_speed": "3-4级"
		}, {
			"hours": "14时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "21",
			"win": "东北风",
			"win_speed": "3-4级"
		}, {
			"hours": "17时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "22",
			"win": "南风",
			"win_speed": "3-4级"
		}, {
			"hours": "20时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "15",
			"win": "东北风",
			"win_speed": "3-4级"
		}, {
			"hours": "23时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "15",
			"win": "东南风",
			"win_speed": "3-4级"
		}, {
			"hours": "02时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "15",
			"win": "东北风",
			"win_speed": "3-4级"
		}, {
			"hours": "05时",
			"wea": "多云",
			"wea_img": "yun",
			"tem": "15",
			"win": "西南风",
			"win_speed": "3-4级"
		}],
		"index": [{
			"title": "紫外线指数",
			"level": "弱",
			"desc": "辐射较弱,涂擦SPF12-15、PA+护肤品。"
		}, {
			"title": "减肥指数",
			"level": "一颗星",
			"desc": "夏天悄然到,肉已无处藏。风虽有点大,室内可健身。"
		}, {
			"title": "血糖指数",
			"level": "较易波动",
			"desc": "血糖较易波动,注意监测。"
		}, {
			"title": "穿衣指数",
			"level": "较舒适",
			"desc": "建议穿薄外套或牛仔裤等服装。"
		}, {
			"title": "洗车指数",
			"level": "不宜",
			"desc": "积水较多,车辆易溅上泥水。"
		}, {
			"title": "空气污染扩散指数",
			"level": "良",
			"desc": "气象条件有利于空气污染物扩散。"
		}]
	}]
}
服务级错误码参照
错误码 说明
100 appid或appsecret错误!
完整教学代码示例
<?php
/**
 * Created by PhpStorm.
 * User: FZS
 * Time: 2022/04/08 11:38
 */
class freeApi
{
    private $apiUrl;

    public function __construct()
    {
        $this->apiUrl = 'https://yiketianqi.com/api?unescape=1&version=v1&appid=858414&appsecret=EKCDLT4I';
    }

    /**
     * 获取结果
     * @return array
     */
    public function getResult()
    {
        return file_get_contents($this->apiUrl);
    }
}
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

const (
	APIURL   = "https://yiketianqi.com/api?unescape=1&version=v1&appid=858414&appsecret=EKCDLT4I"
)

func main() {
	queryUrl := fmt.Sprintf("%s",APIURL)
	resp, err := http.Get(queryUrl)
	if err != nil {
		log.Println(err)
		return
	}

	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)

	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}