WHO.CX API文档
Whois关键信息提取API
接口地址 https://who.cx/api/whois_extract
累计调用 5035
请求方式 POST
返回格式 String
输入参数
名称 类型 描述
domain string (必选) 域名
whois string (必选) 域名的whois原始信息,自行获取后传入
lang string (可选) 语言代码 ISO 639-1,例: "zh"、"en"
time_zone string (可选) 时区,例: "8"、"-3:30"
输出参数
返回处理后的whois字符串
示例代码 Python
    import requests

    url = 'https://who.cx/api/whois_extract'
    data = {'domain': 'dalao.net', 'whois': 'Domain Name: DALAO.NET\nRegistry Domain ID: 624445770_DOMAIN_NET-VRSN\nRegistrar WHOIS Server: whois.porkbun.com...'}
    res = requests.post(url, data).text
    print(res)
示例代码 PHP
    $url = 'https://who.cx/api/whois_extract';
    $data = array('domain' => 'dalao.net', 'whois' => 'Domain Name: DALAO.NET\nRegistry Domain ID: 624445770_DOMAIN_NET-VRSN\nRegistrar WHOIS Server: whois.porkbun.com...');
    $options = array(
        'http' => array(
            'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
            'method'  => 'POST',
            'content' => http_build_query($data),
        ),
    );
    $context  = stream_context_create($options);
    $result = file_get_contents($url, false, $context);
    echo $result;
示例代码 JavaScript
    const url = 'https://who.cx/api/whois_extract';
    fetch(url, {
        method: 'POST',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        },
        body: 'domain=dalao.net&whois=Domain Name: DALAO.NET\nRegistry Domain ID: 624445770_DOMAIN_NET-VRSN\nRegistrar WHOIS Server: whois.porkbun.com...',
    })
        .then(response => response.text())
        .then(res => console.log(res))
域名价格查询API (不支持溢价)
接口地址 https://who.cx/api/price
累计调用 82205
请求方式 GET
返回格式 JSON
输入参数
名称 类型 描述
domain string (必选) 域名
currency string (可选) 货币代码 ISO 4217,例:"USD"
输出参数
名称 类型 描述
code int 状态码,200:查询成功; 400: 查询失败
domain string 查询的域名
new string 注册价格
renew string 续费价格
currency string 货币代码
currency_symbol string 货币符号
示例代码 Python
    import requests

    url = 'https://who.cx/api/price?domain=dalao.net'
    res = requests.get(url).json()
    print(res)
示例代码 PHP
    $url = 'https://who.cx/api/price?domain=dalao.net';
    $response = file_get_contents($url);
    $result = json_decode($response, true);
    echo $result;
示例代码 JavaScript
    const url = 'https://who.cx/api/price?domain=dalao.net';
    fetch(url)
        .then(response => response.json())
        .then(data => console.log(data))