API 文档

本工具提供两个域名查询 API 接口,支持 Whois 和 RDAP 协议,方便开发者集成使用。

1. Whois 查询 API

GET /api.php

参数说明

参数 类型 必填 描述
domain string 要查询的域名,例如:example.com
server string 自定义 Whois 服务器,例如:whois.example.com
update int 设置为 1 时,使用 IANA 动态查询模式

示例请求

GET /api.php?domain=example.com

响应格式

{
    "domain": "example.com",
    "tld": "com",
    "used_server": "whois.verisign-grs.com",
    "custom_used": false,
    "from_iana": false,
    "raw": "Domain Name: EXAMPLE.COM\r\n   Registry Domain ID: 2336799_DOMAIN_COM-VRSN\r\n   Registrar WHOIS Server: whois.iana.org\r\n   Registrar URL: http:\/\/res-dom.iana.org\r\n   Updated Date: 2026-01-16T18:26:50Z\r\n   Creation Date: 1995-08-14T04:00:00Z\r\n   Registry Expiry Date: 2026-08-13T04:00:00Z\r\n   Registrar: RESERVED-Internet Assigned Numbers Authority\r\n   Registrar IANA ID: 376\r\n   Registrar Abuse Contact Email:\r\n   Registrar Abuse Contact Phone:\r\n   Domain Status: clientDeleteProhibited https:\/\/icann.org\/epp#clientDeleteProhibited\r\n   Domain Status: clientTransferProhibited https:\/\/icann.org\/epp#clientTransferProhibited\r\n   Domain Status: clientUpdateProhibited https:\/\/icann.org\/epp#clientUpdateProhibited\r\n   Name Server: ELLIOTT.NS.CLOUDFLARE.COM\r\n   Name Server: HERA.NS.CLOUDFLARE.COM\r\n   DNSSEC: signedDelegation\r\n   DNSSEC DS Data: 2371 13 2 C988EC423E3880EB8DD8A46FE06CA230EE23F35B578D64E78B29C3E1C83D245A\r\n   URL of the ICANN Whois Inaccuracy Complaint Form: https:\/\/www.icann.org\/wicf\/\r\n>>> Last update of whois database: 2026-02-08T07:01:15Z <<<\r\n\r\nFor more information on Whois status codes, please visit https:\/\/icann.org\/epp\r\n\r\nNOTICE: The expiration date displayed in this record is the date the\r\nregistrar's sponsorship of the domain name registration in the registry is\r\ncurrently set to expire. This date does not necessarily reflect the expiration\r\ndate of the domain name registrant's agreement with the sponsoring\r\nregistrar.  Users may consult the sponsoring registrar's Whois database to\r\nview the registrar's reported date of expiration for this registration.\r\n\r\nTERMS OF USE: You are not authorized to access or query our Whois\r\ndatabase through the use of electronic processes that are high-volume and\r\nautomated except as reasonably necessary to register domain names or\r\nmodify existing registrations; the Data in VeriSign Global Registry\r\nServices' (\"VeriSign\") Whois database is provided by VeriSign for\r\ninformation purposes only, and to assist persons in obtaining information\r\nabout or related to a domain name registration record. VeriSign does not\r\nguarantee its accuracy. By submitting a Whois query, you agree to abide\r\nby the following terms of use: You agree that you may use this Data only\r\nfor lawful purposes and that under no circumstances will you use this Data\r\nto: (1) allow, enable, or otherwise support the transmission of mass\r\nunsolicited, commercial advertising or solicitations via e-mail, telephone,\r\nor facsimile; or (2) enable high volume, automated, electronic processes\r\nthat apply to VeriSign (or its computer systems). The compilation,\r\nrepackaging, dissemination or other use of this Data is expressly\r\nprohibited without the prior written consent of VeriSign. You agree not to\r\nuse electronic processes that are automated and high-volume to access or\r\nquery the Whois database except as reasonably necessary to register\r\ndomain names or modify existing registrations. VeriSign reserves the right\r\nto restrict your access to the Whois database in its sole discretion to ensure\r\noperational stability.  VeriSign may restrict or terminate your access to the\r\nWhois database for failure to abide by these terms of use. VeriSign\r\nreserves the right to modify these terms at any time.\r\n\r\nThe Registry database contains ONLY .COM, .NET, .EDU domains and\r\nRegistrars.",
    "error": null,
    "status": "ok"
}

2. RDAP 查询 API

GET /rdap/api.php

参数说明

参数 类型 必填 描述
domain string 要查询的域名,例如:example.com

示例请求

GET /rdap/api.php?domain=example.com

响应格式

{
    "objectClassName": "domain",
    "handle": "2336799_DOMAIN_COM-VRSN",
    "ldhName": "EXAMPLE.COM",
    "status": [
        "client delete prohibited",
        "client transfer prohibited",
        "client update prohibited"
    ],
    "entities": [
        {
            "objectClassName": "entity",
            "handle": "376",
            "roles": [
                "registrar"
            ],
            "publicIds": [
                {
                    "type": "IANA Registrar ID",
                    "identifier": "376"
                }
            ],
            "vcardArray": [
                "vcard",
                [
                    [
                        "version",
                        [],
                        "text",
                        "4.0"
                    ],
                    [
                        "fn",
                        [],
                        "text",
                        "RESERVED-Internet Assigned Numbers Authority"
                    ]
                ]
            ],
            "entities": [
                {
                    "objectClassName": "entity",
                    "roles": [
                        "abuse"
                    ],
                    "vcardArray": [
                        "vcard",
                        [
                            [
                                "version",
                                [],
                                "text",
                                "4.0"
                            ],
                            [
                                "fn",
                                [],
                                "text",
                                ""
                            ],
                            [
                                "tel",
                                {
                                    "type": "voice"
                                },
                                "uri",
                                ""
                            ],
                            [
                                "email",
                                [],
                                "text",
                                ""
                            ]
                        ]
                    ]
                }
            ]
        }
    ],
    "events": [
        {
            "eventAction": "registration",
            "eventDate": "1995-08-14T04:00:00Z"
        },
        {
            "eventAction": "expiration",
            "eventDate": "2026-08-13T04:00:00Z"
        },
        {
            "eventAction": "last changed",
            "eventDate": "2026-01-16T18:26:50Z"
        },
        {
            "eventAction": "last update of RDAP database",
            "eventDate": "2026-02-08T07:01:44Z"
        }
    ],
    "nameservers": [
        {
            "objectClassName": "nameserver",
            "ldhName": "ELLIOTT.NS.CLOUDFLARE.COM"
        },
        {
            "objectClassName": "nameserver",
            "ldhName": "HERA.NS.CLOUDFLARE.COM"
        }
    ],
    "registrationDate": "1995-08-14T04:00:00Z",
    "expirationDate": "2026-08-13T04:00:00Z",
    "registrationDays": 11136,
    "daysUntilExpiration": 185,
    "registrarName": "RESERVED-Internet Assigned Numbers Authority",
    "registrarIanaId": "376"
}

使用限制

  • 请合理使用 API,避免过度请求
  • 建议添加适当的请求间隔,防止被封禁
  • 本 API 仅用于域名信息查询,不得用于其他用途