文章内容
接口简介:

根据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
如有侵权请联系我们删除!
icp备案查询免费API接口教程

 查看详情 

查手机号归属地免费API接口教程

 查看详情 

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

 查看详情 

查全球IP归属地-接口盒子官方版。免费API接口教程

 查看详情 

货币汇率换算【每日更新】免费API接口教程

 查看详情 

指定城市生成随机经纬度坐标免费API接口教程

 查看详情 

随缘ICP实时备案查询免费API接口教程

 查看详情 

企业工商信息查询免费API接口教程

 查看详情 

打码验证OCR-双图旋转免费API接口教程

 查看详情 

打码验证OCR-单图旋转免费API接口教程

 查看详情 

打码验证OCR-相似度对比免费API接口教程

 查看详情 

打码验证OCR-阴影滑块检测免费API接口教程

 查看详情 

打码验证OCR-缺口滑块检测免费API接口教程

 查看详情 

打码验证OCR-按序检测文字坐标免费API接口教程

 查看详情 

打码验证OCR-文字位置检测免费API接口教程

 查看详情 

打码验证OCR-按序检测图标坐标免费API接口教程

 查看详情 

打码验证OCR-图标位置检测免费API接口教程

 查看详情 

打码验证OCR-单行文字识别免费API接口教程

 查看详情 

轻量OCR图片识别-接口盒子【官方优享版】免费API接口教程

 查看详情 

轻量OCR识别语言包名称

 查看详情