深色模式
在线试用
请输入IP地址 或 留空
{>...0}
接口文档
调用示例
sh
### 标准调用
POST https://open.apihub.net/api/ip-location
apihub-token: {{ apihub_token }}
{
"ip": "220.200.43.33"
}
### 兼容 GET 方法、queryParams 参数、匿名调用
GET https://open.apihub.net/api/ip-location?ip=220.200.43.33
参数说明
参数 | 位置 | 类型 | 必传 | 说明 |
---|---|---|---|---|
ip | JsonBody | Str | 否 | 默认为当前请求的TCP源IP |
返回值说明
address 中,省、市、区 字段都可能为空字符串。
{>...3
"success": true,
"trace": "1c36c5d251d111f087762aa5f499a6d1",
"result": {>...3
"ip": "220.200.43.33",
"location": {>...2
"lat": 26.15021,
"lon": 119.13139
},
"address": {>...4
"nation": "中国",
"province": "福建省",
"city": "福州市",
"district": "闽侯县"
}
}
}