跳到正文
ipdb.si

API

网站上的每一项查询都可以通过 JSON 获取,不需要密钥。请把请求控制在每秒几次以内,返回结果可以缓存一小时。

  • 以纯文本返回你的 IP
    curl ipdb.si
  • 你的 IP 和完整报告
    curl https://ipdb.si/json
  • 任意 IP 地址
    curl https://ipdb.si/api/ip/1.1.1.1
  • AS 号和它宣告的网段
    curl https://ipdb.si/api/as/13335

加上 ?lang=zh 可以返回中文的国家或地区名称。

报告字段

ip
地址的标准写法。IPv4 映射的 IPv6 地址按 IPv4 返回。
family
4或6。
scope
互联网地址为 public,其他地址为所属的特殊地址段,例如 private 或 loopback。只有 public 地址带有下面的字段。
location
地址使用地的国家或地区、省州、城市和坐标。
asn
宣告该地址的 AS,以及它的网络类型和判断依据。
registration
登记该地址段的地区互联网注册机构、注册地和注册日期。
network
hosting、isp、business、education、government 或 unknown;地址位于云服务商公布的范围内时,附带服务商名称。
privacy
是否为 Tor 出口、是否为 iCloud 专用代理出口,以及服务器名单中包含该地址的 VPN 服务商。
abuse
是否被 Spamhaus DROP 收录、被多少个威胁情报来源报告,以及每个 DNS 黑名单的结果。
origin
注册地与使用地相同为 native,不同为 broadcast。
hostname
反向解析得到的主机名。
score
纯净度分数、等级和每一项扣分。

示例

{
  "ip": "1.1.1.1",
  "family": 4,
  "scope": "public",
  "location": {
    "continent": "OC",
    "country": { "code": "AU", "name": "Australia" },
    "region": "New South Wales",
    "city": "Sydney",
    "latitude": -33.8688,
    "longitude": 151.209
  },
  "asn": {
    "number": 13335,
    "name": "CLOUDFLARENET - Cloudflare, Inc.",
    "country": { "code": "US", "name": "United States" },
    "type": "hosting",
    "typeSource": "list",
    "peeringDb": { "name": "Cloudflare", "type": "Content" }
  },
  "registration": {
    "rir": "apnic",
    "country": { "code": "AU", "name": "Australia" },
    "status": "assigned",
    "date": "20110811"
  },
  "network": { "type": "hosting", "cloud": null },
  "privacy": { "tor": false, "relay": false, "vpn": null },
  "abuse": {
    "drop": false,
    "threatLists": 0,
    "dnsbl": [
      { "zone": "bl.spamcop.net", "name": "SpamCop", "status": "clean" },
      …
    ]
  },
  "origin": "native",
  "hostname": "one.one.one.one",
  "score": {
    "value": 70,
    "grade": "C",
    "deductions": [{ "key": "hosting", "points": 30 }]
  }
}