接口地址:https://api.xiaochetongxue.cn/api/ip.info.php
返回格式:json
请求方式:get
请求示例:https://api.xiaochetongxue.cn/api/ip.info.php
请求备注:暂无备注内容
请求参数说明:
| 名称 | 必填 | 类型 | 说明 |
|---|---|---|---|
| ip | 否 | string | 要查询的ip |
返回参数说明:
| 名称 | 类型 | 说明 |
|---|---|---|
| code | string | 返回的状态码 |
| msg | string | 返回的错误信息 |
| ip | string | 返回查询的Ip地址 |
| data | string | 返回查询的Ip数据信息 |
| client | string | 返回用户的客户端信息 |
请求返回示例:
{
"code": 200,
"msg": "success",
"ip": "113.221.29.46",
"data": {
"country": "中国",
"province": "湖南省",
"city": "常德市",
"district": "安乡县",
"isp": "电信",
"location": "111.691347,29.040225",
"detailed": "中国湖南省常德市安乡县"
},
"client": {
"system": "Windows 10 x64",
"ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0",
"browser": "Microsoft Edge"
}
}
错误码参照:
| 错误码 | 说明 |
|---|---|
| 201 | 参数不能为空 |
| 202 | 获取异常 |
| 203 | 格式不正确 |
实例演示代码:
暂无演示代码,正在拼命添加中...
暂无演示代码,正在拼命添加中...
暂无演示代码,正在拼命添加中...
暂无演示代码,正在拼命添加中...