🌐 IP查询 API 文档

接口地址

GET /api/query

GET /api/query?ip={target_ip}

请求参数

若不传递参数,则默认返回请求客户端的IP信息。

查询IP响应示例

{
  "ip": "1.1.1.1",
  "asn": "AS13335",
  "as_name": "Cloudflare, Inc.",
  "network_type": "Content",
  "actual_country": "Australia",
  "actual_country_code": "AU",
  "reg_country": "Australia",
  "reg_country_code": "AU",
  "subdivisions": "Queensland",
  "city": "Brisbane",
  "time_zone": "",
  "ip_type": "Native",
  "meta": {
    "query_cost": "0.51ms",
    "city_provider": "ip2location"
  }
}

响应字段说明

请求速率限制

为保障服务质量,单个客户端 IP 地址的请求速率限制为 每秒最多 10 个请求rate=10r/s)。
超过速率的请求将被延迟或拒绝,请合理控制请求频率。

状态码


🧩 Powered by Gin & Go