该接口可查询指定ip的地级市、运营商等信息,含ipv4、ipv6地址。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| ip | ip | 否 | 需要查询的ip地址,例如:125.114.230.124,为空则查询自身ip地址 | 125.114.230.124 |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "ip",
"type": "ip",
"required": false,
"description": "需要查询的ip地址,例如:125.114.230.124,为空则查询自身ip地址",
"example": "125.114.230.124"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "ip地址",
"description": "该接口可查询指定ip的地级市、运营商等信息,含ipv4、ipv6地址。",
"version": "1.0.0"
},
"paths": {
"/v1/ip.php": {
"get": {
"summary": "ip地址",
"description": "该接口可查询指定ip的地级市、运营商等信息,含ipv4、ipv6地址。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "ip",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "125.114.230.124"
},
"description": "需要查询的ip地址,例如:125.114.230.124,为空则查询自身ip地址"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "ip地址",
"description": "该接口可查询指定ip的地级市、运营商等信息,含ipv4、ipv6地址。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "ip",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "125.114.230.124"
},
"description": "需要查询的ip地址,例如:125.114.230.124,为空则查询自身ip地址"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://xiaoapi.cn",
"description": "当前访问入口(https)"
}
]
}
{
"code": 0,
"message": "ok",
"data": {
"ip": "39.181.31.184",
"version": "IPv4",
"address": "中国浙江省杭州市",
"note": "",
"cost_ms": 0.167,
"detail": {
"country": "中国",
"province": "浙江省",
"city": "杭州市",
"carrier": "移动",
"zone": "CN",
"raw": "中国|浙江省|杭州市|移动|CN"
}
}
}
暂无详细文档
暂无代码示例。管理员可在后台用 AI 生成或手动编写。
// 结果将在此处显示
生效日期:2026年7月22日
欢迎使用 xiaoapi.cn(以下简称"本平台")。在使用本平台提供的 API 服务(以下简称"本服务")前,请务必仔细阅读并充分理解本免责声明。您以任何方式调用、访问或使用本服务,即视为您已阅读、理解并同意接受本声明的全部内容。
本平台作为 API 技术服务的提供方,仅提供技术接口与数据分发服务。本声明的目的在于明确平台与用户之间的责任边界,督促用户合法、合规地使用本服务,防范违法违规行为的发生。
用户在使用本服务时,明确禁止从事以下行为:
在法律法规允许的最大范围内,本平台对以下情形不承担责任:
因用户违反本声明或相关法律法规,导致本平台及其关联方、合作方遭受任何损失(包括但不限于赔偿款、罚款、律师费、诉讼费等),用户同意向本平台及相关方承担全部赔偿责任。
本平台有权根据法律法规变化、业务调整或监管要求,随时修改本声明。修改后的声明将在本页面公布,自公布之日起生效。您继续使用本服务,即视为接受更新后的声明。
如您对本声明有任何疑问,或发现他人存在违规使用本服务的行为,欢迎通过本平台公示的联系方式与我们联系,我们将及时处理。