接口线路类型一[集群IP接口-免费]
[接口地址1] :当前负载【】 接口通讯【正常

复制

测速 

[接口地址2] :当前负载【】 接口通讯【正常

复制

测速 

[接口地址3] :当前负载【】 接口通讯【正常

复制

测速 

说明:直接访问https://www.apihz.cn/getapi.php获取当前最优接口地址,IP接口省去域名解析步骤,速度最快。集群IP接口并非永久有效,且容易遭受攻击,建议定期获取当前最优IP接口地址做容错处理,或直接使用域名接口或彩钻接口。
接口线路类型二[域名接口-免费]
[接口地址] :[自动分发到集群接口均衡负载,但可能因网络运营商DNS缓存如果某个集群接口发生故障会造成个别地区有1天左右的故障期]

复制

测速 

接口线路类型三[超高稳定-最低24¥/月]
[彩钻接口] :[专属接口+集群接口+备用接口,自动负载均衡,自动故障切换,全球CDN加速]

复制

测速 

请求示例
[GET]请求示例:(以下为公共KEY,共享每分钟调用频次,请登录后使用自己的KEY独享频次)

复制全部

复制参数 

[POST]请求示例(请根据开发语言自行POST)

请求参数说明
注意:请求编码为UTF8,否则带中文请求可能失败。一般参数不能带+号,会被自动替换为空格。
名称 参数 必填 说明
用户IDid用户中心的数字ID,例:id=10000000
用户KEYkey用户中心通讯秘钥,例:key=15he5h15ty854j5sr152hs2
IP地址ip要查询的IP地址,如果为空则默认接口请求IP。例:ip=49.234.56.78
返回参数说明
名称 参数 说明
状态码code200成功,400错误
消息内容msg信息提示。
省级名称province返回查询的省级名称。
市级名称getcity返回查询的市级名称。
地区名称county返回查询的区县级地区名称。
查询IPip返回查询的IP地址。
数据集data天气信息数据集。
空气质量等级data.aqi_level空气质量等级,暂无用。
空气质量描述data.aqi_name空气质量描述,暂无用。
空气质量链接data.aqi_url空气质量详情链接,暂无用。
白天天气data.day_weather白天天气。
白天天气代码data.day_weather_code白天天气代码。
白天天气data.day_weather_short白天天气。
白天天气链接data.day_weather_url白天天气链接,暂无用。
白天风向描述data.day_wind_direction白天风向描述。
白天风向代码data.day_wind_direction_code白天风向代码。
白天风力等级data.day_wind_power白天风力等级。
白天风力等级代码data.day_wind_power_code白天风力等级代码,暂无用。
白天最高气温data.max_degree白天最高气温。
白天最低气温data.min_degree白天最低气温。
夜间天气data.night_weather夜间天气。
夜间天气代码data.night_weather_code夜间天气代码。
夜间天气data.night_weather_short夜间天气。
夜间天气链接data.night_weather_url夜间天气链接,暂无用。
夜间风向data.night_wind_direction夜间风向。
夜间风向代码data.night_wind_direction_code夜间风向代码。
夜间风力等级data.night_wind_power夜间风力等级。
夜间风力等级代码data.night_wind_power_code夜间风力等级代码。
天气预报时间data.time天气预报时间。
返回数据示例
示例:{"code":400,"msg":"通讯秘钥错误。"}
示例:
{
	"code": 200,
	"province": "上海",
	"getcity": "上海",
	"county": "上海",
	"ip": "49.234.56.78",
	"data": [{
		"aqi_level": 0,
		"aqi_name": "",
		"aqi_url": "",
		"day_weather": "多云",
		"day_weather_code": "01",
		"day_weather_short": "多云",
		"day_weather_url": "",
		"day_wind_direction": "西风",
		"day_wind_direction_code": "6",
		"day_wind_power": "1-3",
		"day_wind_power_code": "0",
		"max_degree": "20",
		"min_degree": "15",
		"night_weather": "阴",
		"night_weather_code": "02",
		"night_weather_short": "阴",
		"night_weather_url": "",
		"night_wind_direction": "微风",
		"night_wind_direction_code": "0",
		"night_wind_power": "1-3",
		"night_wind_power_code": "0",
		"time": "2024-10-29"
	}, {
		"aqi_level": 0,
		"aqi_name": "",
		"aqi_url": "",
		"day_weather": "多云",
		"day_weather_code": "01",
		"day_weather_short": "多云",
		"day_weather_url": "",
		"day_wind_direction": "微风",
		"day_wind_direction_code": "0",
		"day_wind_power": "1-3",
		"day_wind_power_code": "0",
		"max_degree": "22",
		"min_degree": "17",
		"night_weather": "阴",
		"night_weather_code": "02",
		"night_weather_short": "阴",
		"night_weather_url": "",
		"night_wind_direction": "微风",
		"night_wind_direction_code": "0",
		"night_wind_power": "1-3",
		"night_wind_power_code": "0",
		"time": "2024-10-30"
	}, {
		"aqi_level": 0,
		"aqi_name": "",
		"aqi_url": "",
		"day_weather": "中雨",
		"day_weather_code": "08",
		"day_weather_short": "中雨",
		"day_weather_url": "",
		"day_wind_direction": "微风",
		"day_wind_direction_code": "0",
		"day_wind_power": "1-3",
		"day_wind_power_code": "0",
		"max_degree": "22",
		"min_degree": "18",
		"night_weather": "大雨",
		"night_weather_code": "09",
		"night_weather_short": "大雨",
		"night_weather_url": "",
		"night_wind_direction": "微风",
		"night_wind_direction_code": "0",
		"night_wind_power": "1-3",
		"night_wind_power_code": "0",
		"time": "2024-10-31"
	}, {
		"aqi_level": 0,
		"aqi_name": "",
		"aqi_url": "",
		"day_weather": "大暴雨",
		"day_weather_code": "11",
		"day_weather_short": "暴雨",
		"day_weather_url": "",
		"day_wind_direction": "微风",
		"day_wind_direction_code": "0",
		"day_wind_power": "1-3",
		"day_wind_power_code": "0",
		"max_degree": "20",
		"min_degree": "17",
		"night_weather": "小雨",
		"night_weather_code": "07",
		"night_weather_short": "小雨",
		"night_weather_url": "",
		"night_wind_direction": "微风",
		"night_wind_direction_code": "0",
		"night_wind_power": "1-3",
		"night_wind_power_code": "0",
		"time": "2024-11-01"
	}, {
		"aqi_level": 0,
		"aqi_name": "",
		"aqi_url": "",
		"day_weather": "晴",
		"day_weather_code": "00",
		"day_weather_short": "晴",
		"day_weather_url": "",
		"day_wind_direction": "微风",
		"day_wind_direction_code": "0",
		"day_wind_power": "1-3",
		"day_wind_power_code": "0",
		"max_degree": "20",
		"min_degree": "16",
		"night_weather": "晴",
		"night_weather_code": "00",
		"night_weather_short": "晴",
		"night_weather_url": "",
		"night_wind_direction": "微风",
		"night_wind_direction_code": "0",
		"night_wind_power": "1-3",
		"night_wind_power_code": "0",
		"time": "2024-11-02"
	}, {
		"aqi_level": 0,
		"aqi_name": "",
		"aqi_url": "",
		"day_weather": "多云",
		"day_weather_code": "01",
		"day_weather_short": "多云",
		"day_weather_url": "",
		"day_wind_direction": "微风",
		"day_wind_direction_code": "0",
		"day_wind_power": "1-3",
		"day_wind_power_code": "0",
		"max_degree": "22",
		"min_degree": "15",
		"night_weather": "晴",
		"night_weather_code": "00",
		"night_weather_short": "晴",
		"night_weather_url": "",
		"night_wind_direction": "微风",
		"night_wind_direction_code": "0",
		"night_wind_power": "1-3",
		"night_wind_power_code": "0",
		"time": "2024-11-03"
	}, {
		"aqi_level": 0,
		"aqi_name": "",
		"aqi_url": "",
		"day_weather": "晴",
		"day_weather_code": "00",
		"day_weather_short": "晴",
		"day_weather_url": "",
		"day_wind_direction": "微风",
		"day_wind_direction_code": "0",
		"day_wind_power": "1-3",
		"day_wind_power_code": "0",
		"max_degree": "19",
		"min_degree": "13",
		"night_weather": "晴",
		"night_weather_code": "00",
		"night_weather_short": "晴",
		"night_weather_url": "",
		"night_wind_direction": "微风",
		"night_wind_direction_code": "0",
		"night_wind_power": "1-3",
		"night_wind_power_code": "0",
		"time": "2024-11-04"
	}, {
		"aqi_level": 0,
		"aqi_name": "",
		"aqi_url": "",
		"day_weather": "晴",
		"day_weather_code": "00",
		"day_weather_short": "晴",
		"day_weather_url": "",
		"day_wind_direction": "微风",
		"day_wind_direction_code": "0",
		"day_wind_power": "1-3",
		"day_wind_power_code": "0",
		"max_degree": "17",
		"min_degree": "12",
		"night_weather": "晴",
		"night_weather_code": "00",
		"night_weather_short": "晴",
		"night_weather_url": "",
		"night_wind_direction": "微风",
		"night_wind_direction_code": "0",
		"night_wind_power": "1-3",
		"night_wind_power_code": "0",
		"time": "2024-11-05"
	}]
}
更新记录
2024-10-30 11:54:31 - 新增接口。

 天气预报-腾讯天气-7天-IP查询版-2024-10-30 12:05:03

根据IP查询7天天气预报,腾讯天气版。

调用限制
单价/次 免费[无上限]
瞬时并发[单IP] 20
单日[所有用户之和] 999999999
1分钟并发[所有用户之和] 999999999
1小时并发[所有用户之和] 999999999
频次限制[注册用户] 10次/分钟|每日无上限
频次限制[钻石会员] 最高+500次/分钟|每日无上限
调用方法
请求方式 GET/POST
返回格式 JSON
编码格式 UTF-8
调用信息
浏览量 186
今日调用 800
昨日调用 934
总调用 20302
今日排名 19
总排名 144
自检信息

自检日志

自检启用状态 已启用
自检节点 上海
自检线路 彩钻接口线路
自检时间 2024-12-04 21:22:45
自检耗时 156 毫秒
自检状态 正常
历史自检成功数 14813 次
历史自检失败数 2 次
历史自检成功率 99.99 %
今日自检成功数 369 次
今日自检失败数 0 次
今日自检成功率 100.00 %