文章内容
接口简介:

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



请求地址:

https://cn.apihz.cn/api/tianqi/tengxunip.php



请求方式:

POST或GET。



请求参数:

【名称】【参数】【必填】【说明】

【用户ID】【id】【是】【用户中心的数字ID,例:id=10000000】

【用户KEY】【key】【是】【用户中心通讯秘钥,例:key=15he5h15ty854j5sr152hs2】

【IP地址】【ip】【否】【要查询的IP地址,如果为空则默认接口请求IP。例:ip=49.234.56.78】



返回参数:

【名称】【参数】【说明】

【状态码】【code】【200成功,400错误】

【消息内容】【msg】【信息提示。】

【省级名称】【province】【返回查询的省级名称。】

【市级名称】【getcity】【返回查询的市级名称。】

【地区名称】【county】【返回查询的区县级地区名称。】

【查询IP】【ip】【返回查询的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】【天气预报时间。】



GET请求示例:

https://cn.apihz.cn/api/tianqi/tengxunip.php?id=88888888&key=88888888&ip=49.234.56.78

注意:示例里的ID与KEY为公共ID与KEY,共享每分钟调用频次限制,接口本身免费,请使用自己的ID与KEY,独享每分钟调用频次。每日调用无上限。



POST请求示例:

请根据开发语言自行POST。



返回数据示例:

示例:{"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"

	}]

}



参考资料(版权):

https://www.apihz.cn/api/tianqitengxunip.html
如有侵权请联系我们删除!
随机美女,小姐姐视频免费API接口教程

 查看详情 

周边地点搜索接口-搜索指定分类代码

 查看详情 

文本存储-只读版免费API接口教程

 查看详情 

Minecraft(我的世界)服务器信息查询免费API接口教程

 查看详情 

敏感词,违禁词检测免费API接口教程

 查看详情 

天气预报1-7天-中国气象局-经纬度查询版免费API接口教程

 查看详情 

天气预报1-7天-中国气象局-地址查询版-可查询地区列表

 查看详情 

公交规划-线路站点查询免费API接口教程

 查看详情 

公交规划-公交线路规划免费API接口教程

 查看详情 

常用快递物流公司简称代码

 查看详情 

百度搜索下拉联想词查询免费API接口教程

 查看详情 

百度搜索相关搜索内容查询免费API接口教程

 查看详情 

百度搜索免费API接口教程

 查看详情 

导航规划免费API接口教程

 查看详情 

网易新闻内容提取免费API接口教程

 查看详情 

腾讯新闻内容提取免费API接口教程

 查看详情 

随机昵称姓名网名游戏名[百亿级]免费API接口教程

 查看详情 

百家姓免费API接口教程

 查看详情 

化学元素信息(元素周期表)查询免费API接口教程

 查看详情 

近义词反义词查询免费API接口教程

 查看详情