{
    "openapi": "3.0.0",
    "info": {
        "title": "whois查询 - API文档",
        "version": "1.0.0",
        "description": "根据域名查询对应的Whois信息，因大多数国际域名whois服务器在境外，所以偶尔会较慢或查询不到，5秒内未返回结果将直接返回250错误，请再次重试。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/whois\/index": {
            "get": {
                "summary": "查询域名whois信息",
                "tags": [
                    "whois查询"
                ],
                "description": "查询域名whois详细信息",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "domain",
                        "in": "query",
                        "description": "顶级域名",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "tianapi.cn",
                            "description": "顶级域名"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "email": {
                                            "type": "string",
                                            "example": "DomainAbuse@service.aliyun.com",
                                            "description": "域名联系邮箱"
                                        },
                                        "phone": {
                                            "type": "string",
                                            "example": "+86.95187",
                                            "description": "域名联系电话"
                                        },
                                        "status": {
                                            "type": "string",
                                            "example": "clientUpdateProhibited",
                                            "description": "域名状态"
                                        },
                                        "registrar": {
                                            "type": "string",
                                            "example": "AlibabaCloudComputing(Beijing)Co.,Ltd.",
                                            "description": "注册机构"
                                        },
                                        "dns_server": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            },
                                            "example": "[VIP1.ALIDNS.COM,VIP2.ALIDNS.COM]",
                                            "description": "域名解析服务器"
                                        },
                                        "registrant": {
                                            "type": "string",
                                            "example": "juneker01",
                                            "description": "注册人"
                                        },
                                        "domain_name": {
                                            "type": "string",
                                            "example": "TIANAPI.COM",
                                            "description": "域名"
                                        },
                                        "whois_server": {
                                            "type": "string",
                                            "example": "grs-whois.hichina.com\"",
                                            "description": "whois信息查询服务器"
                                        },
                                        "creation_date": {
                                            "type": "string",
                                            "example": "2016-06-28 T08:48:10Z",
                                            "description": "域名注册时间"
                                        },
                                        "expiration_date": {
                                            "type": "string",
                                            "example": "2021-06-28 T08:48:10Z",
                                            "description": "域名到期时间"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "email": "DomainAbuse@service.aliyun.com",
                                        "phone": "+86.95187",
                                        "status": "clientUpdateProhibited",
                                        "registrar": "AlibabaCloudComputing(Beijing)Co.,Ltd.",
                                        "dns_server": [
                                            "VIP1.ALIDNS.COM",
                                            "VIP2.ALIDNS.COM"
                                        ],
                                        "registrant": "juneker01",
                                        "domain_name": "TIANAPI.COM",
                                        "whois_server": "grs-whois.hichina.com",
                                        "creation_date": "2016-06-28 T08:48:10Z",
                                        "expiration_date": "2021-06-28 T08:48:10Z"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询域名whois信息",
                "tags": [
                    "whois查询"
                ],
                "description": "查询域名whois详细信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "domain": {
                                        "type": "string",
                                        "example": "tianapi.cn",
                                        "description": "顶级域名"
                                    }
                                },
                                "required": [
                                    "key",
                                    "domain"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "email": {
                                            "type": "string",
                                            "example": "DomainAbuse@service.aliyun.com",
                                            "description": "域名联系邮箱"
                                        },
                                        "phone": {
                                            "type": "string",
                                            "example": "+86.95187",
                                            "description": "域名联系电话"
                                        },
                                        "status": {
                                            "type": "string",
                                            "example": "clientUpdateProhibited",
                                            "description": "域名状态"
                                        },
                                        "registrar": {
                                            "type": "string",
                                            "example": "AlibabaCloudComputing(Beijing)Co.,Ltd.",
                                            "description": "注册机构"
                                        },
                                        "dns_server": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            },
                                            "example": "[VIP1.ALIDNS.COM,VIP2.ALIDNS.COM]",
                                            "description": "域名解析服务器"
                                        },
                                        "registrant": {
                                            "type": "string",
                                            "example": "juneker01",
                                            "description": "注册人"
                                        },
                                        "domain_name": {
                                            "type": "string",
                                            "example": "TIANAPI.COM",
                                            "description": "域名"
                                        },
                                        "whois_server": {
                                            "type": "string",
                                            "example": "grs-whois.hichina.com\"",
                                            "description": "whois信息查询服务器"
                                        },
                                        "creation_date": {
                                            "type": "string",
                                            "example": "2016-06-28 T08:48:10Z",
                                            "description": "域名注册时间"
                                        },
                                        "expiration_date": {
                                            "type": "string",
                                            "example": "2021-06-28 T08:48:10Z",
                                            "description": "域名到期时间"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "email": "DomainAbuse@service.aliyun.com",
                                        "phone": "+86.95187",
                                        "status": "clientUpdateProhibited",
                                        "registrar": "AlibabaCloudComputing(Beijing)Co.,Ltd.",
                                        "dns_server": [
                                            "VIP1.ALIDNS.COM",
                                            "VIP2.ALIDNS.COM"
                                        ],
                                        "registrant": "juneker01",
                                        "domain_name": "TIANAPI.COM",
                                        "whois_server": "grs-whois.hichina.com",
                                        "creation_date": "2016-06-28 T08:48:10Z",
                                        "expiration_date": "2021-06-28 T08:48:10Z"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}