HD

IP 查询

自动查询当前 IP。

接口说明

公开、只读、无需鉴权,限流 20 次/分钟。

请求

GET  https://www.liuhuadong.com/api/ip2address?ip=8.8.8.8
POST https://www.liuhuadong.com/api/ip2address        body: ip=8.8.8.8

成功返回

{
  "code": 0,
  "message": "ok",
  "data": {
    "ip": "114.114.114.114",
    "version": 4,
    "found": true,
    "internal": false,
    "country": "中国",
    "province": "江苏省",
    "city": "南京市",
    "isp": "",
    "country_code": "CN",
    "address": "中国 江苏省 南京市",
    "label": "南京市"
  },
  "library": { "source": "ip2region", "version": "v3.18.0", "updated_at": "2026-10-24" }
}

参数错误(HTTP 422)

{"code": 1, "message": "IP 地址格式不正确:abc", "data": null}

curl 示例

curl "https://www.liuhuadong.com/api/ip2address?ip=223.5.5.5"

ip2region 数据版本 v3.18.0 · 更新于 2026-10-24