域名相关 - API文档

域名查询

/Domain/Check

API分类 域名相关 请求方法 GET

API简介

查询一个域名是否可以注册。

请求参数

名称 必须 说明
ApiKey API请求时必须提供的密钥,请和管理员联系索取
Password 登录朝暮数据用户管理的密码
Domain 相关域名,如abc.com

注:参数名称不区分大小写。

请求示例

BASE_URL/Domain/Check?ApiKey=testApi&Password=testPassword&Domain=zhaomu123.com

输出结果

{
    domain: "zhaomu123.com"
    available: true
}

代码示例

using RestSharp; //使用第三方组件RestSharp

var client = new RestClient();
client.BaseUrl = new Uri("http://BASE_URL");

var request = new RestRequest("/Domain/Check",Method.GET);
request.AddParameter("ApiKey", "testApi");
request.AddParameter("Password", "testPassword");
request.AddParameter("Domain", "zhaomu123.com");

var response = client.Execute(request);
string result = response.Content;
$url = 'http://BASE_URL/Domain/Check';
$param = array(
  'ApiKey' => 'testApi',
  'Password' => 'testPassword',
  'Domain' => 'zhaomu123.com'    
);
$data = http_build_query($param);

$options = array(
            'http' => array(
                'method' => 'GET',
                'header' => 'Content-Type: application/x-www-form-urlencoded',
                'content' => $data
        ));
$context = stream_context_create($options);
$result = file_get_contents($url, FILE_TEXT, $context);
?>
'API请求的URL地址
const url = "http://BASE_URL/Domain/Check?ApiKey=testApi&Password=testPassword&Domain=zhaomu123.com"

'执行HTTP请求
Set http = Server.CreateObject("MSXML2.ServerXMLHTTP")
http.Open "GET", url, False
http.Send

'获取并分析结果
result = http.responseText