查询域名相关信息
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| url | string | 是 | 需要查询的域名 | api.317ak.com |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "url",
"type": "string",
"required": true,
"description": "需要查询的域名",
"example": "api.317ak.com"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "域名whois查询",
"description": "查询域名相关信息",
"version": "1.0.0"
},
"paths": {
"/api/zzgj/whois/api.php": {
"get": {
"summary": "域名whois查询",
"description": "查询域名相关信息",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "url",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "api.317ak.com"
},
"description": "需要查询的域名"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "域名whois查询",
"description": "查询域名相关信息",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "url",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "api.317ak.com"
},
"description": "需要查询的域名"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api-v2.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"code": 1,
"message": "查询成功",
"request_url": "api.317ak.com",
"data": {
"IsTencent": true,
"DnsServer": [
"ns4.dnsv2.com",
"ns3.dnsv2.com"
],
"DNSSEC": "signedDelegation",
"RegistrarRaw": "DNSPod, Inc.",
"RegistrarType": "epp",
"RegistrantName": "请联系当前域名注册商获取",
"ExpirationDate": "2025-10-15 21:07:19",
"DomainStatus": [
"ok"
],
"Raw": [
"
Domain Name: 317ak.com",
"Registry Domain ID: 2821937951_DOMAIN_COM-VRSN",
"Registrar WHOIS Server: whois.dnspod.com",
"Registrar URL: https:\/\/www.dnspod.com",
"Updated Date: 2024-11-23 16:49:35",
"Creation Date: 2023-10-15 13:07:19",
"Registry Expiry Date: 2025-10-15 13:07:19",
"Registrar: DNSPod, Inc.",
"Registrar IANA ID: 1697",
"Registrar Abuse Contact Email: abuse@dnspod.com",
"Registrar Abuse Contact Phone: +86.95716",
"Domain Status: ok https:\/\/www.icann.org\/epp#ok",
"Registry Registrant ID: REDACTED FOR PRIVACY",
"Registrant Name: REDACTED FOR PRIVACY",
"Registrant Street: REDACTED FOR PRIVACY",
"Registrant City: REDACTED FOR PRIVACY",
"Registrant State\/Province:",
"Registrant Postal Code: REDACTED FOR PRIVACY",
"Registrant Country: CN",
"Registrant Phone: REDACTED FOR PRIVACY",
"Registrant Phone Ext: REDACTED FOR PRIVACY",
"Registrant Fax: REDACTED FOR PRIVACY",
"Registrant Fax Ext: REDACTED FOR PRIVACY",
"Registrant Email: REDACTED FOR PRIVACY",
"Registry Admin ID: REDACTED FOR PRIVACY",
"Admin Name: REDACTED FOR PRIVACY",
"Admin Organization: REDACTED FOR PRIVACY",
"Admin Street: REDACTED FOR PRIVACY",
"Admin City: REDACTED FOR PRIVACY",
"Admin State\/Province: REDACTED FOR PRIVACY",
"Admin Postal Code: REDACTED FOR PRIVACY",
"Admin Country: REDACTED FOR PRIVACY",
"Admin Phone: REDACTED FOR PRIVACY",
"Admin Phone Ext: REDACTED FOR PRIVACY",
"Admin Fax: REDACTED FOR PRIVACY",
"Admin Fax Ext: REDACTED FOR PRIVACY",
"Admin Email: REDACTED FOR PRIVACY",
"Registry Tech ID: REDACTED FOR PRIVACY",
"Tech Name: REDACTED FOR PRIVACY",
"Tech Organization: REDACTED FOR PRIVACY",
"Tech Street: REDACTED FOR PRIVACY",
"Tech State\/Province: REDACTED FOR PRIVACY",
"Tech Postal Code: REDACTED FOR PRIVACY",
"Tech Country: REDACTED FOR PRIVACY",
"Tech Phone: REDACTED FOR PRIVACY",
"Tech Phone Ext: REDACTED FOR PRIVACY",
"Tech Fax: REDACTED FOR PRIVACY",
"Tech Fax Ext: REDACTED FOR PRIVACY",
"Tech Email: REDACTED FOR PRIVACY",
"Registry Billing ID: REDACTED FOR PRIVACY",
"Billing Name: REDACTED FOR PRIVACY",
"Billing Organization: REDACTED FOR PRIVACY",
"Billing Street: REDACTED FOR PRIVACY",
"Billing City: REDACTED FOR PRIVACY",
"Billing State\/Province: REDACTED FOR PRIVACY",
"Billing Postal Code: REDACTED FOR PRIVACY",
"Billing Country: REDACTED FOR PRIVACY",
"Billing Phone: REDACTED FOR PRIVACY",
"Billing Email: REDACTED FOR PRIVACY",
"Name Server:ns4.dnsv2.com",
"Name Server:ns3.dnsv2.com",
"DNSSEC: signedDelegation",
"URL of the ICANN WHOIS Data Problem Reporting System: http:\/\/wdprs.internic.net",
">>>Last update of WHOIS database: 2025-06-25T08:00:00Z <<<",
"",
"",
"For more information on Whois status codes, please visit https:\/\/icann.org\/epp",
"",
"",
"The data in this whois database is provided to you for information",
"purposes only, that is, to assist you in obtaining information about or",
"related to a domain name registration record. We make this information",
"available \"as is,\" and do not guarantee its accuracy. By submitting a",
"whois query, you agree that you will use this data only for lawful",
"purposes and that, under no circumstances will you use this data to: (1)",
"enable high volume, automated, electronic processes that stress or load",
"this whois database system providing you this information; or (2) allow,",
"enable, or otherwise support the transmission of mass unsolicited,",
"commercial advertising or solicitations via direct mail, electronic",
"mail, or by telephone. The compilation, repackaging, dissemination or",
"other use of this data is expressly prohibited without prior written",
"consent from us.",
"",
""
],
"RegistrantEmail": [
"请联系当前域名注册商获取"
],
"Registrar": [
"腾讯云 (DNSPod)"
],
"UpdateDate": "2024-11-23 16:49:35",
"Expired": false,
"TencentExpirationDate": "2025-10-15 21:07:19",
"RegistrationDate": "2023-10-15 21:07:19"
}
}
用于查询指定域名的相关 Whois 信息,帮助用户获取域名注册、状态等基础信息。
适用于站长工具场景,可用于域名信息查询与管理。
https://api-v2.317ak.com/api/zzgj/whois/api.php
GET、POST
接口调用需要密钥。
首选鉴权方式:Query
请求参数中添加 key=… 进行鉴权。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥,通过 Query 参数 key 传递。 |
| url | string | 是 | 需要查询的域名,例如:api.317ak.com。 |
{
"code": 1,
"message": "查询成功",
"request_url": "api.317ak.com",
"data": {
"IsTencent": true,
"DnsServer": [
"ns4.dnsv2.com",
"ns3.dnsv2.com"
],
"DNSSEC": "signedDelegation",
"RegistrarRaw": "DNSPod, Inc.",
"RegistrarType": "epp",
"RegistrantName": "请联系当前域名注册商获取",
"ExpirationDate": "2025-10-15 21:07:19",
"DomainStatus": [
"ok"
],
"RegistrantEmail": [
"请联系当前域名注册商获取"
],
"Registrar": [
"腾讯云 (DNSPod)"
],
"UpdateDate": "2024-11-23 16:49:35",
"Expired": false,
"TencentExpirationDate": "2025-10-15 21:07:19",
"RegistrationDate": "2023-10-15 21:07:19"
}
}
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 请求结果标识,成功时返回 1 |
| message | string | 返回信息说明 |
| request_url | string | 查询的域名 |
| data | object | 域名查询结果数据 |
| 字段 | 类型 | 说明 |
|---|---|---|
| IsTencent | boolean | 是否为腾讯相关域名信息 |
| DnsServer | array | 域名 DNS 服务器列表 |
| DNSSEC | string | DNSSEC 状态信息 |
| RegistrarRaw | string | 注册商原始信息 |
| RegistrarType | string | 注册商类型 |
| RegistrantName | string | 域名注册人信息 |
| ExpirationDate | string | 域名到期时间 |
| DomainStatus | array | 域名状态列表 |
| RegistrantEmail | array | 注册邮箱信息 |
| Registrar | array | 注册商信息 |
| UpdateDate | string | 信息更新时间 |
| Expired | boolean | 是否已过期 |
| TencentExpirationDate | string | 腾讯相关到期时间 |
| RegistrationDate | string | 域名注册时间 |
| 字段 | 类型 | 说明 |
|---|---|---|
| Raw | array | 原始查询信息列表,包含域名注册、更新时间、状态、DNS 等详细文本内容 |
{
"code":0,
"msg":"密钥错误",
"errcode":11002
}
| errcode | 含义 | |
|---|---|---|
| 11001 | 未提供调用密钥 | |
| 11002 | 密钥错误 | |
| 11003 | 密钥已禁用 | |
| 11004 | 积分余额不足 | |
| 11005 | 请求过于频繁(QPM 限制) | |
| 11006 | 接口维护中 | |
| 11007 | 接口已禁用 | |
| 11008 | 接口不可用 | |
| 11009 | 密钥校验暂不可用 | |
| 11010 | 积分系统暂不可用 | |
| 11011 | 收费接口须提供有效密钥 | |
| 11012 | 鉴权方式错误 | |
| 11013 | 接口不存在 | |
| 11014 | 外部请求地址无效 | |
| 11015 | 外部请求地址不允许 | |
| 11016 | 外部请求失败 | |
| 11017 | 服务暂不可用 | |
| 11018 | 请求方式不允许 | |
| 11019 | 当前IP不在白名单内 | |
| 11020 | 启用请求转发服务须提供有效密钥 | |
| 11021 | 未配置可用请求转发服务 | |
| 11022 | 请求转发服务不可用 | |
| 11023 | 密钥已过期 | |
| 11024 | 令牌分配积分不足 |
curl -G "https://api-v2.317ak.com/api/zzgj/whois/api.php" \
--data-urlencode "key=你的接口密钥" \
--data-urlencode "url=api.317ak.com"
// PHP
## 注意事项
- 调用接口前请妥善保管接口密钥,避免将密钥直接暴露在前端页面、公开代码仓库或可被他人获取的位置。
- 本接口必须携带密钥进行调用,请使用 Query 参数方式传递鉴权信息,例如 `key=接口调用密钥`。
- 建议通过 HTTPS 请求接口,降低请求参数及返回数据在传输过程中被窃取的风险。
- `url` 参数需填写需要查询的域名,建议传入规范域名格式,例如 `api.317ak.com`,避免包含无关路径、协议或特殊字符导致查询失败。
- 接口支持 GET、POST 请求方式,请根据实际开发场景选择合适的请求方式。
- 请合理控制调用频率,避免短时间内大量重复查询同一域名或批量提交高频请求。
- WHOIS 信息受域名注册信息公开规则影响,部分字段可能为空、隐藏或显示为隐私保护信息,返回结果请以接口实际响应内容为准。
- 查询结果中的域名状态、注册商、DNS、创建时间、到期时间等信息仅反映当前可获取的数据,域名信息变更后可能存在更新延迟。
- 接口为免费调用服务,请按照正常使用场景调用,避免恶意请求或影响其他用户正常使用。curl -G 'https://api-v2.317ak.com/api/zzgj/whois/api.php' \
--data-urlencode 'key=YOUR_API_KEY' \
--data-urlencode 'url=api.317ak.com'