搜索结果

×

搜索结果将在这里显示。

🤣 IP查询

IP 查询 接口
本接口用于查询 IP 地址归属地信息,支持自动获取访问者 IP 或查询指定 IP,支持 JSON 返回格式。

接口地址

主用接口:https://api.ku.cm/ip/?ip=

备用接口:https://api.xk.ee/ip/?ip=

请求方式

请求方式 返回格式
GET TEXT / JSON

请求参数

参数 类型 是否必填 说明
ip string 需要查询的 IP 地址(不填则自动获取访问者 IP)
type string json 返回格式

请求示例

https://api.ku.cm/ip/
https://api.ku.cm/ip/?ip=你的IP地址
https://api.ku.cm/ip/?ip=你的IP地址&type=json

JSON 返回示例

{ "code": 200, "msg": "success", "data": { "ip": "183.192.70.211", "continent": "亚洲", "country": "中国", "province": "上海市", "city": "上海市", "district": "浦东新区", "isp": "中国移动", "location": "上海市 上海市 浦东新区" }, "time": "2026-03-12 18:52:24", "runtime": "0.850401s" }

返回字段说明

字段 类型 说明
code int 状态码
msg string 状态说明
ip string 查询的 IP 地址
country string 国家
province string 省份 / 地区
city string 城市
location string 地区信息
time string 服务器时间
runtime string 接口响应时间

状态码说明

状态码 说明
200 请求成功
400 参数错误
404 数据不存在
405 请求方式错误
422 参数格式错误
500 服务器错误
502 上游接口错误

调用示例

HTML 调用

https://api.ku.cm/ip/?ip=20.48.75.226

JSON 调用

https://api.ku.cm/ip/?ip=20.48.75.226&type=json

效果演示

IP 查询:
IP:20.48.75.226 国家:日本 地区:东京都 东京