跳到正文

IP最新Whois信息查询

接口说明

该接口是一个通过IP查询最新Whois注册信息的服务,仅支持IPv4的查询。用法是在接口路由后面拼接上一个IPv4格式的IP地址,然后发出HTTP请求,最终会返回该IP的最新Whois注册信息,返回信息包括地址范围、开始IP地址、结束IP地址、网络名称、组织名称、国家、描述等。以39.106.22.138这个IPv4格式地址为例,拼接后的完整接口路由为/ips/std/v2/whois_detail/39.106.22.138。一次只能查询一个,仅支持IPv4。

推荐应用场景

用于通过IP查询最新的Whois注册信息,仅支持IPv4

请求地址

https://api.f.360.cn/ips/std/v2/whois_detail/:ip

请求方法

POST

请求参数

参数名类型位置必选示例值说明
ipstringbody是1.21.4.2查询的IP

响应参数

一级字段二级字段类型示例值描述
codeint200响应状态码
msgstring结果说明
inetnumstring地址范围
start_ipstring开始IP地址
end_ipstring结束IP地址
net_namestring网络名称
org_namestring组织名称
descArray<string>描述
countrystring国家
net_typestring网络类型
parent_netstring父网络
object_class_namestring类型名称
last_modifiedstring最后更新时间
rdap_conformanceArray<string>一致性
serverstringWhois服务器
statusstring状态
linksArray<object>链接
hrefstring链接
relstringself/alternate/related自己/替换/相关
sourcestring数据来源
noticeobject通知信息
sourceobject
{
  "desc": "xxx"
}
源
terms_and_conditionsobject
{
  "desc": "xxx",
  "rel": "xxx"
}
条款和条件
whois_inaccuracy_reportingobject
{
  "desc": "xxx",
  "rel": "xxx"
}
Whois错误报告
copyright_noticeobject
{
  "desc": "xxx"
}
版权声明
filteredobject
{
  "desc": "xxx",
  "rel": "xxx"
}
过滤
entityArray<object>实体信息
eventsArray<object>
{
  "action": "xxx",
  "date": "xxx"
}
事件
addressstring地址
emailstring邮箱
handlestring实体标识符
linksArray<string>
{
  "href": "xxx",
  "rel": "xxx"
}
链接
namestring实体名称
remark_infoArray<object>
{
  "remarks": "xxx"
}
评论
rolesArray<string>noc/technical/administrative/abusenoc/技术/管理员/滥用
telstring电话
typestringgroup/individual组织/个人
versionstring版本号
first_seentimestamp<int>首次发现时间,秒级
last_seentimestamp<int>最近发现时间,秒级

请求示例

支持cUrl、Python、Java、PHP、Go语言的请求,示例如下

#!/usr/bin/env bash
set -euo pipefail

APPID=""  # apikey
SECRET=""  # salt
URL="https://api.f.360.cn/ips/std/v2/whois_detail/36.99.173.14"
BODY='{}'

NONCE=$(printf '%08d' $((RANDOM % 100000000)))
TIMESTAMP=$(date +%s)
BODY_MD5=$(printf '%s' "$BODY" | openssl dgst -md5 -hex | awk '{print $NF}')
SIGNATURE=$(printf '%s' "${BODY_MD5}${APPID}${NONCE}${TIMESTAMP}${SECRET}" | openssl dgst -md5 -hex | awk '{print $NF}')
SIGNATURE=${SIGNATURE:16}

curl --location --request POST "$URL" \
  --header "Content-Type: application/json" \
  --header "X-360-Key: ${APPID}" \
  --header "X-360-Nonce: ${NONCE}" \
  --header "X-360-Timestamp: ${TIMESTAMP}" \
  --header "X-360-Signature: ${SIGNATURE}" \
  --data "${BODY}"

响应示例

业务正常响应

{
    "status": "ok",
    "code": 200,
    "data": [
        {
            "status": "active",
            "org_name": "",
            "notice": {
                "filtered": {
                    "rel": "",
                    "desc": "This output has been filtered."
                },
                "whois_inaccuracy_reporting": {
                    "rel": "inaccuracy-report",
                    "desc": "If you see inaccuracies in the results, please visit: https://www.ripe.net/contact-form?topic=ripe_dbm&show_form=true"
                },
                "terms_and_conditions": {
                    "rel": "terms-of-service",
                    "desc": "This is the RIPE Database query service. The objects are in RDAP format. http://www.ripe.net/db/support/db-terms-conditions.pdf"
                },
                "source": {
                    "desc": "Objects returned came from source RIPE"
                }
            },
            "last_seen": 1742189557,
            "net_name": "ORCL-AMER-OCI-22",
            "links": [
                {
                    "href": "https://rdap.db.ripe.net/ips/rirSearch1/up/2.2.0.0%20-%202.2.255.255",
                    "rel": "up"
                },
                {
                    "href": "https://rdap.db.ripe.net/ips/rirSearch1/up/2.2.0.0%20-%202.2.255.255?status=active",
                    "rel": "up-active"
                },
                {
                    "href": "https://rdap.db.ripe.net/ips/rirSearch1/down/2.2.0.0%20-%202.2.255.255",
                    "rel": "down"
                },
                {
                    "href": "https://rdap.db.ripe.net/ips/rirSearch1/top/2.2.0.0%20-%202.2.255.255",
                    "rel": "top"
                },
                {
                    "href": "https://rdap.db.ripe.net/ips/rirSearch1/top/2.2.0.0%20-%202.2.255.255?status=active",
                    "rel": "top-active"
                },
                {
                    "href": "https://rdap.db.ripe.net/ips/rirSearch1/bottom/2.2.0.0%20-%202.2.255.255",
                    "rel": "bottom"
                },
                {
                    "href": "https://rdap.db.ripe.net/ip/2.2.0.0",
                    "rel": "self"
                },
                {
                    "href": "http://www.ripe.net/data-tools/support/documentation/terms",
                    "rel": "copyright"
                }
            ],
            "rdap_conformance": [
                "geofeed1",
                "rirSearch1",
                "ips",
                "cidr0",
                "rdap_level_0",
                "nro_rdap_profile_0",
                "redacted"
            ],
            "country": "US",
            "parent_net": "2.0.0.0 - 2.2.255.255",
            "object_class_name": "ip network",
            "entity": [
                {
                    "handle": "ORCL-MNT",
                    "roles": [
                        "registrant"
                    ],
                    "links": [
                        {
                            "href": "https://rdap.db.ripe.net/entity/ORCL-MNT",
                            "rel": "self"
                        },
                        {
                            "href": "http://www.ripe.net/data-tools/support/documentation/terms",
                            "rel": "copyright"
                        }
                    ],
                    "version": "4.0",
                    "type": "individual",
                    "events": [],
                    "name": "ORCL-MNT"
                },
                {
                    "handle": "ORCL1-RIPE",
                    "roles": [
                        "administrative",
                        "technical"
                    ],
                    "links": [
                        {
                            "href": "https://rdap.db.ripe.net/entity/ORCL1-RIPE",
                            "rel": "self"
                        },
                        {
                            "href": "http://www.ripe.net/data-tools/support/documentation/terms",
                            "rel": "copyright"
                        }
                    ],
                    "events": [],
                    "version": "4.0",
                    "address": "500 Oracle Parkway, M/S 501ip3\nRedwood Shores\nCA, 94065",
                    "type": "group",
                    "email": "domain-contact_ww_grp@oracle.com",
                    "name": "Domain Administrator"
                },
                {
                    "handle": "ORG-OAI2-RIPE",
                    "roles": [
                        "registrant"
                    ],
                    "links": [
                        {
                            "href": "https://rdap.db.ripe.net/entity/ORG-OAI2-RIPE",
                            "rel": "self"
                        },
                        {
                            "href": "http://www.ripe.net/data-tools/support/documentation/terms",
                            "rel": "copyright"
                        }
                    ],
                    "version": "4.0",
                    "address": "2300 Oracle Way Austin, TX 78741 USA",
                    "type": "org",
                    "events": [],
                    "name": "Oracle America Inc."
                },
                {
                    "handle": "AR17199-RIPE",
                    "roles": [
                        "abuse"
                    ],
                    "links": [],
                    "events": [],
                    "version": "4.0",
                    "address": "Oracle Svenska AB\nKronborgsgrand 17\n164 46 Kista\nSE",
                    "type": "group",
                    "email": "abuse@oracleemaildelivery.com",
                    "name": "Abuse-C Role"
                }
            ],
            "source": "RIPE",
            "end_ip": "2.2.255.255",
            "net_type": "SUB-ALLOCATED PA",
            "inetnum": "2.2.0.0 - 2.2.255.255",
            "last_modified": "2024-10-04T14:24:27Z",
            "start_ip": "2.2.0.0",
            "first_seen": 1740991800,
            "server": "whois.ripe.net",
            "ip_version": "v4",
            "desc": []
        }
    ]
}

业务异常响应

{
    "code": 422,
    "status": "bad",
    "err": "xxx"
}
{
  "code": "GC00101",
  "msg": "param missing"
}