接口线路类型一[集群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
纬度lat纬度。例:lat=40.05702706489032
经度lon经度。例:lon=116.30787799999993
返回参数说明
名称 参数 说明
状态码code200成功,400错误
消息内容msg信息提示。
数据组数量cnt每3小时为一组数据,5天一般共计40组数据。
消息内容msg信息提示。
国家country国家代码 ISO。
日出sunrise日出时间戳。
日落sunset日落时间戳。
城市name城市名称。
数据组data天气预报数据集合,每天8组数据,每3小时为1组。
天气data.weather天气。
气温data.temp气温,华氏度。
气压data.pressure气压。
湿度data.humidity湿度百分比。
能见度data.visibility能见度,单位米。
风速data.speed风速,单位米。
风向data.deg风向度。
空气质量data.clouds空气质量,浑浊度,百分比。
返回数据示例
示例:{"code":400,"msg":"通讯秘钥错误。"}
示例:
{
	"code": 200,
	"cnt": 40,
	"name": "Haidian",
	"country": "CN",
	"sunrise": 1726523854,
	"sunset": 1726568470,
	"data": [{
		"dt": 1726552800,
		"time": "2024-09-17 06:00:00",
		"temp": 300.91,
		"pressure": 1006,
		"humidity": 44,
		"weather": "晴",
		"clouds": 2,
		"speed": 2.67,
		"deg": 111,
		"visibility": 10000
	}, {
		"dt": 1726563600,
		"time": "2024-09-17 09:00:00",
		"temp": 300.8,
		"pressure": 1005,
		"humidity": 49,
		"weather": "多云",
		"clouds": 63,
		"speed": 3.25,
		"deg": 110,
		"visibility": 10000
	}, {
		"dt": 1726574400,
		"time": "2024-09-17 12:00:00",
		"temp": 299.28,
		"pressure": 1007,
		"humidity": 61,
		"weather": "多云",
		"clouds": 82,
		"speed": 1.36,
		"deg": 90,
		"visibility": 10000
	}, {
		"dt": 1726585200,
		"time": "2024-09-17 15:00:00",
		"temp": 298.13,
		"pressure": 1007,
		"humidity": 68,
		"weather": "多云",
		"clouds": 57,
		"speed": 1.6,
		"deg": 123,
		"visibility": 10000
	}, {
		"dt": 1726596000,
		"time": "2024-09-17 18:00:00",
		"temp": 296.68,
		"pressure": 1007,
		"humidity": 65,
		"weather": "多云",
		"clouds": 78,
		"speed": 1.89,
		"deg": 134,
		"visibility": 10000
	}, {
		"dt": 1726606800,
		"time": "2024-09-17 21:00:00",
		"temp": 295.99,
		"pressure": 1008,
		"humidity": 59,
		"weather": "阴,多云",
		"clouds": 90,
		"speed": 1.05,
		"deg": 109,
		"visibility": 10000
	}, {
		"dt": 1726617600,
		"time": "2024-09-18 00:00:00",
		"temp": 296.85,
		"pressure": 1008,
		"humidity": 53,
		"weather": "阴,多云",
		"clouds": 94,
		"speed": 0.57,
		"deg": 131,
		"visibility": 10000
	}, {
		"dt": 1726628400,
		"time": "2024-09-18 03:00:00",
		"temp": 300.57,
		"pressure": 1008,
		"humidity": 36,
		"weather": "多云",
		"clouds": 56,
		"speed": 1.47,
		"deg": 132,
		"visibility": 10000
	}, {
		"dt": 1726639200,
		"time": "2024-09-18 06:00:00",
		"temp": 303.11,
		"pressure": 1006,
		"humidity": 35,
		"weather": "多云",
		"clouds": 35,
		"speed": 2.72,
		"deg": 148,
		"visibility": 10000
	}, {
		"dt": 1726650000,
		"time": "2024-09-18 09:00:00",
		"temp": 301.77,
		"pressure": 1005,
		"humidity": 47,
		"weather": "晴,少云",
		"clouds": 17,
		"speed": 3.35,
		"deg": 142,
		"visibility": 10000
	}, {
		"dt": 1726660800,
		"time": "2024-09-18 12:00:00",
		"temp": 299.83,
		"pressure": 1008,
		"humidity": 52,
		"weather": "多云",
		"clouds": 51,
		"speed": 2.04,
		"deg": 169,
		"visibility": 10000
	}, {
		"dt": 1726671600,
		"time": "2024-09-18 15:00:00",
		"temp": 298.71,
		"pressure": 1008,
		"humidity": 54,
		"weather": "阴,多云",
		"clouds": 99,
		"speed": 1.86,
		"deg": 148,
		"visibility": 10000
	}, {
		"dt": 1726682400,
		"time": "2024-09-18 18:00:00",
		"temp": 297.77,
		"pressure": 1008,
		"humidity": 59,
		"weather": "阴,多云",
		"clouds": 100,
		"speed": 2,
		"deg": 149,
		"visibility": 10000
	}, {
		"dt": 1726693200,
		"time": "2024-09-18 21:00:00",
		"temp": 296.87,
		"pressure": 1007,
		"humidity": 56,
		"weather": "阴,多云",
		"clouds": 100,
		"speed": 1.49,
		"deg": 120,
		"visibility": 10000
	}, {
		"dt": 1726704000,
		"time": "2024-09-19 00:00:00",
		"temp": 297.41,
		"pressure": 1007,
		"humidity": 49,
		"weather": "阴,多云",
		"clouds": 98,
		"speed": 1.36,
		"deg": 145,
		"visibility": 10000
	}, {
		"dt": 1726714800,
		"time": "2024-09-19 03:00:00",
		"temp": 298.78,
		"pressure": 1006,
		"humidity": 44,
		"weather": "阴,多云",
		"clouds": 87,
		"speed": 2.98,
		"deg": 154,
		"visibility": 10000
	}, {
		"dt": 1726725600,
		"time": "2024-09-19 06:00:00",
		"temp": 298.78,
		"pressure": 1004,
		"humidity": 49,
		"weather": "阴,多云",
		"clouds": 87,
		"speed": 1.82,
		"deg": 139,
		"visibility": 10000
	}, {
		"dt": 1726736400,
		"time": "2024-09-19 09:00:00",
		"temp": 299.42,
		"pressure": 1002,
		"humidity": 53,
		"weather": "多云",
		"clouds": 67,
		"speed": 1.79,
		"deg": 146,
		"visibility": 10000
	}, {
		"dt": 1726747200,
		"time": "2024-09-19 12:00:00",
		"temp": 297.63,
		"pressure": 1002,
		"humidity": 64,
		"weather": "多云",
		"clouds": 64,
		"speed": 1.33,
		"deg": 131,
		"visibility": 10000
	}, {
		"dt": 1726758000,
		"time": "2024-09-19 15:00:00",
		"temp": 295.82,
		"pressure": 1004,
		"humidity": 72,
		"weather": "小雨",
		"clouds": 56,
		"speed": 2.34,
		"deg": 351,
		"visibility": 10000
	}, {
		"dt": 1726768800,
		"time": "2024-09-19 18:00:00",
		"temp": 293.06,
		"pressure": 1005,
		"humidity": 80,
		"weather": "小雨",
		"clouds": 78,
		"speed": 3.87,
		"deg": 326,
		"visibility": 10000
	}, {
		"dt": 1726779600,
		"time": "2024-09-19 21:00:00",
		"temp": 291.2,
		"pressure": 1007,
		"humidity": 70,
		"weather": "小雨",
		"clouds": 100,
		"speed": 4.8,
		"deg": 343,
		"visibility": 10000
	}, {
		"dt": 1726790400,
		"time": "2024-09-20 00:00:00",
		"temp": 291.25,
		"pressure": 1010,
		"humidity": 43,
		"weather": "阴,多云",
		"clouds": 100,
		"speed": 5.12,
		"deg": 349,
		"visibility": 10000
	}, {
		"dt": 1726801200,
		"time": "2024-09-20 03:00:00",
		"temp": 292.49,
		"pressure": 1012,
		"humidity": 38,
		"weather": "阴,多云",
		"clouds": 100,
		"speed": 4.67,
		"deg": 337,
		"visibility": 10000
	}, {
		"dt": 1726812000,
		"time": "2024-09-20 06:00:00",
		"temp": 297.66,
		"pressure": 1011,
		"humidity": 24,
		"weather": "阴,多云",
		"clouds": 99,
		"speed": 4.74,
		"deg": 345,
		"visibility": 10000
	}, {
		"dt": 1726822800,
		"time": "2024-09-20 09:00:00",
		"temp": 297.3,
		"pressure": 1012,
		"humidity": 24,
		"weather": "阴,多云",
		"clouds": 100,
		"speed": 3.78,
		"deg": 43,
		"visibility": 10000
	}, {
		"dt": 1726833600,
		"time": "2024-09-20 12:00:00",
		"temp": 295.28,
		"pressure": 1014,
		"humidity": 26,
		"weather": "阴,多云",
		"clouds": 100,
		"speed": 2.32,
		"deg": 25,
		"visibility": 10000
	}, {
		"dt": 1726844400,
		"time": "2024-09-20 15:00:00",
		"temp": 292.56,
		"pressure": 1015,
		"humidity": 39,
		"weather": "阴,多云",
		"clouds": 90,
		"speed": 1.8,
		"deg": 219,
		"visibility": 10000
	}, {
		"dt": 1726855200,
		"time": "2024-09-20 18:00:00",
		"temp": 291.31,
		"pressure": 1014,
		"humidity": 44,
		"weather": "多云",
		"clouds": 76,
		"speed": 1,
		"deg": 335,
		"visibility": 10000
	}, {
		"dt": 1726866000,
		"time": "2024-09-20 21:00:00",
		"temp": 289.87,
		"pressure": 1014,
		"humidity": 45,
		"weather": "晴",
		"clouds": 0,
		"speed": 1.62,
		"deg": 351,
		"visibility": 10000
	}, {
		"dt": 1726876800,
		"time": "2024-09-21 00:00:00",
		"temp": 291.12,
		"pressure": 1014,
		"humidity": 38,
		"weather": "晴",
		"clouds": 0,
		"speed": 1.75,
		"deg": 353,
		"visibility": 10000
	}, {
		"dt": 1726887600,
		"time": "2024-09-21 03:00:00",
		"temp": 296.14,
		"pressure": 1013,
		"humidity": 27,
		"weather": "晴",
		"clouds": 0,
		"speed": 1.35,
		"deg": 30,
		"visibility": 10000
	}, {
		"dt": 1726898400,
		"time": "2024-09-21 06:00:00",
		"temp": 299.23,
		"pressure": 1010,
		"humidity": 24,
		"weather": "晴",
		"clouds": 0,
		"speed": 1.07,
		"deg": 70,
		"visibility": 10000
	}, {
		"dt": 1726909200,
		"time": "2024-09-21 09:00:00",
		"temp": 298.68,
		"pressure": 1009,
		"humidity": 23,
		"weather": "晴",
		"clouds": 0,
		"speed": 1.89,
		"deg": 127,
		"visibility": 10000
	}, {
		"dt": 1726920000,
		"time": "2024-09-21 12:00:00",
		"temp": 295.3,
		"pressure": 1010,
		"humidity": 39,
		"weather": "晴",
		"clouds": 0,
		"speed": 1.76,
		"deg": 177,
		"visibility": 10000
	}, {
		"dt": 1726930800,
		"time": "2024-09-21 15:00:00",
		"temp": 293.53,
		"pressure": 1011,
		"humidity": 45,
		"weather": "晴",
		"clouds": 0,
		"speed": 1.64,
		"deg": 351,
		"visibility": 10000
	}, {
		"dt": 1726941600,
		"time": "2024-09-21 18:00:00",
		"temp": 291.42,
		"pressure": 1011,
		"humidity": 46,
		"weather": "晴",
		"clouds": 0,
		"speed": 1.83,
		"deg": 356,
		"visibility": 10000
	}, {
		"dt": 1726952400,
		"time": "2024-09-21 21:00:00",
		"temp": 290.19,
		"pressure": 1010,
		"humidity": 48,
		"weather": "晴",
		"clouds": 0,
		"speed": 1.94,
		"deg": 346,
		"visibility": 10000
	}, {
		"dt": 1726963200,
		"time": "2024-09-22 00:00:00",
		"temp": 291.67,
		"pressure": 1012,
		"humidity": 36,
		"weather": "晴",
		"clouds": 0,
		"speed": 2.56,
		"deg": 350,
		"visibility": 10000
	}, {
		"dt": 1726974000,
		"time": "2024-09-22 03:00:00",
		"temp": 297.87,
		"pressure": 1011,
		"humidity": 20,
		"weather": "晴",
		"clouds": 0,
		"speed": 2.25,
		"deg": 358,
		"visibility": 10000
	}]
}
更新记录
2024-09-17 12:04:52 - 新增接口。

 天气预报-全球天气预报5天-经纬度版-2024-09-17 13:53:47

获取全球任意地区未来5天天气预报,必须传经纬度参数。可先调用【位置坐标】分类下相关接口获取地区经纬度坐标。

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

自检日志

自检启用状态 已启用
自检节点 上海
自检线路 彩钻接口线路
自检时间 2024-12-03 10:41:57
自检耗时 136 毫秒
自检状态 正常
历史自检成功数 34726 次
历史自检失败数 32 次
历史自检成功率 99.91 %
今日自检成功数 187 次
今日自检失败数 0 次
今日自检成功率 100.00 %