接口地址:https://api.uouin.com/app/whois
返回格式:Json
请求方式:Http(s) Get/Post请求
请求示例:https://api.uouin.com/app/whois?username=用户名&key=密钥&url=https://www.qq.com
接口说明:域名Whois检测可实时查询域名Whois信息,并返回域名whois信息和原始whois信息,支持超多种顶级域名后缀查询Whois
请求参数说明:
参数名称 | 必填 | 类型 | 说明 |
---|---|---|---|
username | 是 | string | 用户名 |
key | 是 | string | 密钥 |
nodeid | 否 | string | 默认default为Whois官方查询 default为官方Whois缓冲查询,定期更新,支持常见域名后缀查询 whoisok为官方Whois实时Nic服务器查询,支持多种类型后缀查询。 |
url | 是 | string | 需要检测的URL地址 |
返回参数说明:
参数名称 | 类型 | 说明 |
---|---|---|
code | number | 1001为获取成功 1002为域名未注册 -212为查询失败 |
msg | string | 系统返回提示信息! |
statu | string | 异常为false,正常为true! |
count | number | 点数包,如按量计费则返回! |
reason | string | 拦截原因,如有则返回! |
describe | string | 拦截描述,如有则返回! |
url | string | 检测的地址! |
响应文本:
{
"msg": "获取成功",
"data": {
"Domain": "qq.com",
"Name Server": ["NS1.QQ.COM", "NS2.QQ.COM", "NS3.QQ.COM", "NS4.QQ.COM"],
"Registrar": "MarkMonitor Inc.",
"Creation Date": "1995-05-04",
"Expiration Date": "2030-07-27",
"Registrant Name": "域名所有者设置隐私保护",
"Registrant E-mail": "域名所有者设置隐私保护",
"Domain Status": [{
"en": "clientDeleteProhibited",
"cn": "注册商设置禁止删除",
"msg": "保护域名的一种状态,域名不能被删除。"
}, {
"en": "serverDeleteProhibited",
"cn": "注册局设置禁止删除",
"msg": "保护域名的一种状态,域名不能被删除。"
}, {
"en": "clientUpdateProhibited",
"cn": "注册商设置禁止更新",
"msg": "注册商设置域名信息不能被修改,但可设置或修改解析记录。"
}, {
"en": "serverUpdateProhibited",
"cn": "注册局设置禁止更新",
"msg": "注册局设置域名信息不能被修改,但可设置或修改解析记录。"
}, {
"en": "clientTransferProhibited",
"cn": "注册商设置禁止转移",
"msg": "注册商设置保护域名的一种状态,域名不能转移注册商。"
}, {
"en": "serverTransferProhibited",
"cn": "注册局设置禁止转移",
"msg": "注册局设置保护域名的一种状态,域名不能转移注册商。"
}],
"Domaininfo": "Domain Name:QQ.COM\r\nRegistry Domain ID:2895300_DOMAIN_COM-VRSN\r\nRegistrar WHOIS Server:whois.markmonitor.com\r\nRegistrar URL:http:\/\/www.markmonitor.com\r\nUpdated Date:2021-08-23T02:30:04Z\r\nCreation Date:1995-05-04T04:00:00Z\r\nRegistry Expiry Date:2030-07-27T02:09:19Z\r\nRegistrar:MarkMonitor Inc.\r\nRegistrar IANA ID:292\r\nRegistrar Abuse Contact Email:REDACTED FOR PRIVACY\r\nRegistrar Abuse Contact Phone:REDACTED FOR PRIVACY\r\nDomain Status:clientDeleteProhibited https:\/\/icann.org\/epp#clientDeleteProhibited\r\nDomain Status:clientTransferProhibited https:\/\/icann.org\/epp#clientTransferProhibited\r\nDomain Status:clientUpdateProhibited https:\/\/icann.org\/epp#clientUpdateProhibited\r\nDomain Status:serverDeleteProhibited https:\/\/icann.org\/epp#serverDeleteProhibited\r\nDomain Status:serverTransferProhibited https:\/\/icann.org\/epp#serverTransferProhibited\r\nDomain Status:serverUpdateProhibited https:\/\/icann.org\/epp#serverUpdateProhibited\r\nName Server:NS1.QQ.COM\r\nName Server:NS2.QQ.COM\r\nName Server:NS3.QQ.COM\r\nName Server:NS4.QQ.COM\r\nDNSSEC:unsigned\r\nURL of the ICANN Whois Inaccuracy Complaint Form:https:\/\/www.icann.org\/wicf\/\r\n>>> Last update of whois database:2021-12-15T07:54:39Z <<<\r\nFor more information on Whois status codes, please visit https:\/\/icann.org\/epp\r\nNOTICE:The expiration date displayed in this record is the date the\r\nTERMS OF USE:You are not authorized to access or query our Whois\r\nby the following terms of use:You agree that you may use this Data only\r\nto:(1) allow, enable, or otherwise support the transmission of mass\r\n"
},
"statu": "true",
"url": "https:\/\/www.qq.com",
"code": "1001"
}
系统状态码参考:
状态码code | 说明 | |
---|---|---|
-200 | 用户名不能空 | |
-201 | key不能空 | |
-202 | url不能为空 | |
-203 | 点数包余额不足 | |
-204 | 访问API频率超过套餐限制,请升级套餐 | |
-205 | 请求的接口地址有误,请到API文档获取请求地址 | |
-206 | 账户VIP会员没开通或已过期 | |
-207 | 用户名或key不对 | |
-208 | 非白名单IP,请添加白名单IP | |
-209 | 账户状态异常 | |
-210 | 接口异常,查询失败 | |
-211 | 账户未绑定手机号 | |
-212 | 检测超时,请重试 | |
-213 | 网址存在安全风险,如误报可添加白名单域名 | |
-214 | API功能未开通 | |
1001 | 检测域名状态正常 | |
1002 | 检测域名状态异常或封禁 | |
200 | 获取数据成功 | |
1 | 短网址类调用生成成功 |
对接代码演示:
$result = file_get_contents("https://api.uouin.com/app/whois?username=用户名&key=密钥&url=".urlencode($url));
$json = json_decode($result,true);
if($json[code] < 0){
echo $json[msg];// API接口异常,返回异常信息
}
if($code == 1001){
echo "域名正常"; //判断code为1001即为正常
}
if($code == 1002){ //判断code为1002即为拦截
echo "已被封禁";
}
//可通过sleep()或usleep()函数控制调用频率