动态访客 IP 卡片与开放 API

实时展示访问者的出口 IP、归属地、ASN、线路类型、Cloudflare Radar 30 天人类流量与估算 MTU,免费免 Key 即可嵌入或调用。

实时预览

DetectRadar 实时出口 IP 卡片

上图实时请求 /api/v1/card.svg 生成,不同访客会看到各自当前的出口信息。

嵌入代码

[![DetectRadar 实时出口 IP 卡片](https://detectradar.com/api/v1/card.svg?lang=zh)](https://detectradar.com/)
新标签打开 SVG

外观主题

卡片样式

卡片语言

IP 显示

附加信息

开放只读 API(免 API Key)

面向 Clash / Mihomo 测速脚本、桌面小组件与终端工具的稳定只读接口,无需注册或申请 Key,切换节点后即可拿到最新出口信息。

接口地址 用途说明
GEThttps://detectradar.com/api/v1/ip 当前出口 JSON(归属地、ASN、线路类型、30 天人类流量与估算 MTU)
GEThttps://4.detectradar.com/api/v1/ip 强制纯 IPv4 出口 JSON(供双栈检测脚本调用)
GEThttps://6.detectradar.com/api/v1/ip 强制纯 IPv6 出口 JSON(排查双栈出口)
GEThttps://detectradar.com/api/v1/card.svg 动态访客 SVG 卡片(支持 theme=dark|light、style=card|compact、mask=0|1)
GEThttps://detectradar.com/?format=md 终端 Markdown / BBCode 论坛卡片(curl -sL 调用,默认自动脱敏)

JSON 响应示例(RFC 5737 示例地址)

{
  "ip": "203.0.113.42",
  "country": "US",
  "country_name": "美国",
  "city": "Los Angeles",
  "asn": "AS64500",
  "org": "Example Cloud Services",
  "isp": "Example Cloud Services",
  "is_hosting": true,
  "usage_type": "hosting",
  "usage_type_raw": "hosting",
  "human_ratio": 29.0,
  "connection": { "peer_mss": 1460, "est_mtu": 1500, "ip_version": 4 },
  "source": "local",
  "tier": "L1+L2"
}

核心字段说明

usage_type isp | hosting | unknown

固定标准化出口枚举(无 datacenter 混用)

usage_type_raw residential | mobile | hosting | …

可选细分国际网络类型(命中有标注时返回)

is_hosting boolean

命中云厂商 IP 段、机房 ASN 或托管特征时为 true

human_ratio number (0–100,可选)

Cloudflare Radar 近 30 天所属 ASN 人类流量占比(非单 IP 评分)

connection.est_mtu integer(可选)

根据当前 TCP 连接观测到的对端 MSS 换算的估算 MTU

  • 仅观测发起请求的当前连接出口,不支持查询任意第三方 IP。
  • 所有响应携带 Cache-Control: no-store,切完节点立即生效;按 IP 限流,请勿高频轮询。
  • usage_type 固定为 isp / hosting / unknown;human_ratio 为所属 ASN 近 30 天统计,非单 IP 评分。