## 查询域名解析 >[danger]### 会员接口,仅限会员使用,购买[API会员](https://market.topthink.com/product/210) ![](https://img.kancloud.cn/70/6c/706c2f005721d9df5e5ef4a64d88f5bc_200x200.png) > 可以查询域名所有的解析信息,DNS记录,例如a记录,cname,hinfo,mx,ns,ptr,soa,txt,aaaa,srv,naptr等。支持顶级域名和二级域名,接口返回有效记录的数据并缓存半小时。 ## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086)) ### 请求地址 ``` GET https://api.topthink.com/website/domain ``` ### 请求参数 | 名称 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | appCode| string| 是|用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | domain| string | 是 | 域名| ### 返回`data`参数 | 名称 | 类型 | 说明 | | --- | --- | --- | | host | string | 主机名 | | class | string | 类型 | | ttl | int | 有效时间 | | type | string | 解析记录类型 | | ip | string | 主机IP地址 | ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->websiteDomain() ->withDomain('www.thinkphp.cn') ->request(); ``` 返回示例: ~~~ { "code":0, "message": "成功", "data": [ { "host": "www.thinkphp.cn", "class": "IN", "ttl": 10, "type": "CNAME", "target": "eec336a57938b588.vip.jiasule.org" } ] } ~~~