网络

查询域名的WHOIS注册信息

0次调用
2 积分/次

想知道一个域名是什么时候注册的、注册商是谁、什么时候到期?WHOIS信息可以告诉你这一切。

GET
uapis.cn
/api/v1/network/whois
查询参数
2
domain
string
required

你需要查询WHOIS信息的域名。

format
string

返回格式。留空或为 'text' 时返回原始WHOIS文本,设为 'json' 时返回结构化JSON。

功能概述

这是一个在线的WHOIS查询工具。你可以通过如下两种方式获取WHOIS信息:

  • 默认行为(不带参数):GET /api/v1/network/whois?domain=google.com
    • 返回一个JSON对象,whois 字段为原始、未处理的WHOIS文本字符串。
  • JSON格式化GET /api/v1/network/whois?domain=google.com&format=json
    • 返回一个JSON对象,whois 字段为解析后的JSON对象,包含WHOIS信息中的键值对。

这样你既可以获得最全的原始信息,也可以方便地处理结构化数据。

查询参数

domain
string必填

你需要查询WHOIS信息的域名。

format
string可选

返回格式。留空或为 'text' 时返回原始WHOIS文本,设为 'json' 时返回结构化JSON。

响应

200 / 请求成功

查询成功!根据 format 参数返回原始WHOIS文本或结构化JSON。

格式 1

文本格式响应

format=text 或未指定时,whois 字段包含原始的WHOIS查询文本。这保留了最完整的信息,适合需要自行解析或展示原始数据的场景。

JSON
{
  // WHOIS 原始文本,返回未经处理的原始 WHOIS 查询结果文本。
  "whois": "Domain Name: GOOGLE.COM\nRegistry Domain ID: 2138514_DOMAIN_COM-VRSN\nRegistrar WHOIS Server: whois.markmonitor.com\n..."
}
格式 2

JSON格式响应

format=json 时,whois 字段返回结构化的JSON对象。

小贴士

注意:返回的具体字段可能因域名注册局和隐私保护设置而异。某些敏感信息可能会被部分隐藏或标记为 REDACTED FOR PRIVACY

JSON
{
  // 结构化 WHOIS 信息,返回经过解析的 JSON 对象,通常包含域名信息、注册商信息、注册人信息以及注册日期、更新时间、到期时间等字段。
  // 有些字段会因域名注册局和隐私保护设置而有所不同噢。
  "whois": {
    "domain": {
      "id": "2138514_DOMAIN_COM-VRSN",
      "domain": "google.com",
      "punycode": "google.com",
      "name": "google",
      "extension": "com",
      "whois_server": "whois.markmonitor.com",
      "status": [
        "clientDeleteProhibited",
        "clientTransferProhibited",
        "clientUpdateProhibited",
        "serverDeleteProhibited",
        "serverTransferProhibited",
        "serverUpdateProhibited"
      ],
      "name_servers": [
        "ns1.google.com",
        "ns2.google.com",
        "ns3.google.com",
        "ns4.google.com"
      ],
      "created_date": "1997-09-15T04:00:00Z",
      "created_date_in_time": "1997-09-15T04:00:00Z",
      "updated_date": "2019-09-09T15:39:04Z",
      "updated_date_in_time": "2019-09-09T15:39:04Z",
      "expiration_date": "2028-09-14T04:00:00Z",
      "expiration_date_in_time": "2028-09-14T04:00:00Z"
    },
    "registrar": {
      "id": "292",
      "name": "MarkMonitor Inc.",
      "phone": "+1.2086851750",
      "email": "abusecomplaints@markmonitor.com",
      "referral_url": "http://www.markmonitor.com"
    },
    "registrant": {
      "organization": "Google LLC",
      "country": "US",
      "email": "select request email form at https://domains.markmonitor.com/whois/google.com"
    },
    "technical": {
      "email": "select request email form at https://domains.markmonitor.com/whois/google.com"
    }
  }
}

400 / 错误的请求

请求参数无效。请检查 domain 参数是否提供且格式正确。

JSON
{
  "code": "INVALID_ARGUMENT",
  "details": {},
  "message": "Missing or invalid 'domain' parameter."
}

404 / 未找到

查询失败或域名不存在。

JSON
{
  "code": "NOT_FOUND",
  "details": {},
  "message": "WHOIS information not found for the domain."
}
查询域名的WHOIS注册信息免费API接口 - 稳定可靠 | UAPI开发者平台 | UAPI