国内IP天气
根据IP地址显示位置天气

接口地址: https://api.gmuu.cn/api/ip_weather

返回格式: JSON

请求方式: GET

请求示例: https://api.gmuu.cn/api/ip_weather?apiKey=apikey

请求参数说明:

名称 必填 类型 说明
apiKey string 密钥

返回参数说明:

名称 类型 说明
ip string 返回当前IP地址
province string
city string
weather string 天气
temp string 当前温度
humidity string 湿度
winddirection string 风向
windpower string 风力
reporttime string 更新时间

错误参数说明:

名称 类型 说明
201 string 未获取到IP信息
202 string 未获取到天气信息

返回示例:

{
    "code": 200,
    "msg": "success",
    "time": "2022-04-28 11:18:18",
    "data": {
        "ip_info": [
            {
                "ip": "1.191.2.6",
                "province": "黑龙江",
                "city": "齐齐哈尔",
            }
        ],
        "weather_info": [
            {
                "weather": "晴",
                "temp": 15,
                "humidity": 39,
                "winddirection": "西北风",
                "windpower": "3级",
                "reporttime": "2022-04-28 10:55"
            }
        ]
    }
}

请求参数设置:

参数名称 参数值



				

错误码格式说明:

名称 类型 说明
201 string 未获取到IP信息
202 string 未获取到天气信息

代码示例: