cURL
curl "https://api.ruseo.cn/api/ssl_check?domain=demo&port=1&timeout=1"
查询SSL证书详情、有效期、域名匹配、安全等级评估,带1小时缓存
https://api.ruseo.cn/api/ssl_check
接口调用前需要确认的核心配置。
/api/ssl_checkssl_check必填参数必须传入,示例值可直接用于联调。
免费API不强制要求API Key,但如果您希望统计个人调用次数,请在请求时附加参数 key=您的API_KEY。
注册账号后即可获得API Key。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
否 | string | 可选参数:携带此参数可统计您的个人调用次数。请注册账号获取API Key。 | YOUR_API_KEY |
domain |
是 | string | 域名(如:baidu.com 或 https://baidu.com) | |
port |
否 | number | 端口,默认443 | |
timeout |
否 | number | 超时时间(秒),默认10 | |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/ssl_check?domain=demo&port=1&timeout=1
curl "https://api.ruseo.cn/api/ssl_check?domain=demo&port=1&timeout=1"
$url = 'https://api.ruseo.cn/api/ssl_check?domain=demo&port=1&timeout=1';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/ssl_check?domain=demo&port=1&timeout=1')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "ssl_check",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
domain |
string | 查询的域名 | |
port |
number | 查询的端口 | |
subject.common_name |
string | 证书域名 | |
subject.organization |
string | 证书组织 | |
issuer.common_name |
string | 颁发者 | |
validity.valid_from |
string | 生效时间 | |
validity.valid_to |
string | 过期时间 | |
validity.is_expired |
boolean | 是否已过期 | |
validity.days_remaining |
number | 剩余天数 | |
domain_match.is_matched |
boolean | 域名是否匹配 | |
domain_match.alt_names |
array | 备用域名列表 | |
security.grade |
string | 安全等级(A/B/C/D/F) | |
security.warnings |
array | 安全警告 | |
security.recommendations |
array | 安全建议 | |
点击左侧“发送请求”查看结果...