IP Detection

批量 IP 检测

一次请求评估整个地址列表,或在结果产生时逐条接收。

检测列表

POST/v1/bulk/check
API 密钥

参数

  • ipsstring[]

    地址,可附带端口。与 input 二选一。

  • inputstring

    粘贴的文本;服务器会从中找出地址。

响应字段

  • submittedinteger

    收到的条目数。

  • uniqueinteger

    检测的不重复地址数。

  • duplicatesinteger

    重复提交的地址。

  • invalidstring[]

    不是有效地址的输入。

  • summaryobject

    各等级与判定结果的数量。Starter 及以上方案提供,Free 方案为空。

  • planRequiredstring

    包含被锁定字段的方案。Starter 及以上方案不返回此字段。

  • results[].ipstring

    被检测的 IP 地址。

  • results[].portinteger

    输入中带有端口时的端口号。

  • results[].scoreinteger | null

    纯净度分数,0 到 100。Starter 及以上方案提供,Free 方案为 null。

  • results[].gradestring | null

    S+、S、A、B 或 C。Starter 及以上方案提供,Free 方案为 null。

  • results[].verdictstring | null

    clean、suspect 或 dirty。Starter 及以上方案提供,Free 方案为 null。

  • results[].classificationstring

    residential_clean、mobile、hosting、datacenter、vpn、residential_proxy、tor、relay 或 unknown。

  • results[].confidencenumber

    置信度,范围 0 到 1。

  • results[].anonymizedboolean

    网络隐藏了背后的用户时为 true。托管网络也算在内,已知基础设施除外。

  • results[].vpnProviderstring | null

    vpn 地址所属的 VPN 服务(NordVPN、Mullvad 等),已知时返回。Starter 及以上方案提供,Free 方案为 null。

  • results[].isTorExitboolean

    Tor 出口节点为 true。

  • results[].inVpnRangeboolean

    IP 位于已知 VPN IP 段时为 true。

  • results[].inDatacenterRangeboolean

    IP 位于已知数据中心 IP 段时为 true。

  • results[].deductionsarray | null

    从分数中扣除的分值,各附原因。Starter 及以上方案提供,Free 方案为 null。

  • results[].lockedstring[]

    本行在当前方案下以 null 返回的字段。Starter 及以上方案不返回此字段。

curl -X POST https://ipscanner.io/v1/bulk/check \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ips":["185.220.101.1","24.48.0.1:8080"]}'
响应
{
  "submitted": 2,
  "unique": 2,
  "duplicates": 0,
  "invalid": [],
  "summary": {
    "clean": 1,
    "dirty": 1
  },
  "results": [
    {
      "input": "185.220.101.1",
      "ip": "185.220.101.1",
      "score": 0,
      "grade": "C",
      "verdict": "dirty",
      "classification": "tor",
      "confidence": 0.95,
      "anonymized": true,
      "vpnProvider": null,
      "isTorExit": true,
      "inVpnRange": false,
      "inDatacenterRange": false,
      "asn": "AS60729",
      "asnName": "Stiftung Erneuerbare Freiheit",
      "country": "DE",
      "deductions": [
        {
          "factor": "network_origin",
          "points": 98,
          "detail": "tor at high confidence"
        }
      ]
    },
    {
      "input": "24.48.0.1:8080",
      "ip": "24.48.0.1",
      "port": 8080,
      "score": 88,
      "grade": "S",
      "verdict": "clean",
      "classification": "residential_clean",
      "confidence": 0.3,
      "anonymized": false,
      "vpnProvider": null,
      "isTorExit": false,
      "inVpnRange": false,
      "inDatacenterRange": false,
      "asn": "AS5769",
      "asnName": "VIDEOTRON",
      "country": "CA",
      "deductions": [
        {
          "factor": "no_corroboration",
          "points": 8,
          "detail": "no observation on record for this IP"
        }
      ]
    }
  ]
}

流式检测列表

POST/v1/ip/bulk
API 密钥NDJSON

参数

  • ipsstring[]

    地址,可附带端口。与 input 二选一。

  • inputstring

    粘贴的文本;服务器会从中找出地址。

响应字段

  • typestring

    meta、result、error 或 done。

  • indexinteger

    地址在去重列表中的位置,从 0 开始。

  • ipstring

    被检测的 IP 地址。

  • verdictstring | null

    clean、suspect 或 dirty。Starter 及以上方案提供,Free 方案为 null。

  • classificationstring

    residential_clean、mobile、hosting、datacenter、vpn、residential_proxy、tor、relay 或 unknown。

  • scoreinteger | null

    纯净度分数,0 到 100。Starter 及以上方案提供,Free 方案为 null。

  • gradestring | null

    S+、S、A、B 或 C。Starter 及以上方案提供,Free 方案为 null。

  • vpnProviderstring | null

    vpn 地址所属的 VPN 服务,未知时省略。Starter 及以上方案提供,Free 方案为 null。

  • lockedstring[]

    结果行:在当前方案下以 null 返回的字段。Starter 及以上方案不返回此字段。

  • planRequiredstring

    meta 行:包含被锁定字段的方案。Starter 及以上方案不返回此字段。

  • reasonstring

    error 时:invalid_ip 或 reserved。done 时:complete 或 quota_exceeded。

  • processedinteger

    done 时:已检测的地址数。

  • failedinteger

    done 时:无法检测的地址数。

  • totalinteger

    meta 和 done 时:请求中不重复的地址数。

curl -X POST -N https://ipscanner.io/v1/ip/bulk \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ips":["185.220.101.1","24.48.0.1","10.0.0.1"]}'
响应,每行一个 JSON 对象
{"type":"meta","total":3,"metered":3}
{"type":"result","ip":"185.220.101.1","verdict":"dirty","classification":"tor","confidence":0.95,"anonymized":true,"score":0,"grade":"C","isTorExit":true,"asn":"AS60729","country":"DE"}
{"type":"result","index":1,"ip":"24.48.0.1","verdict":"clean","classification":"residential_clean","confidence":0.3,"score":88,"grade":"S","asn":"AS5769","country":"CA"}
{"type":"error","index":2,"input":"10.0.0.1","reason":"reserved","message":"private address"}
{"type":"done","reason":"complete","total":3,"processed":2,"failed":1}