检测网站链接是否正常,是否为死链。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| url | string | 是 | 需要检测的网站链接 | https://api-v2.317ak.com/ |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "url",
"type": "string",
"required": true,
"description": "需要检测的网站链接",
"example": "https://api-v2.317ak.com/"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "检测链接异常",
"description": "检测网站链接是否正常,是否为死链。",
"version": "1.0.0"
},
"paths": {
"/api/zzgj/jclj/api.php": {
"get": {
"summary": "检测链接异常",
"description": "检测网站链接是否正常,是否为死链。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "url",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "https://api-v2.317ak.com/"
},
"description": "需要检测的网站链接"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "检测链接异常",
"description": "检测网站链接是否正常,是否为死链。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "url",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "https://api-v2.317ak.com/"
},
"description": "需要检测的网站链接"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"状态": "成功",
"检测链接": "https://api.317ak.com/",
"检测结果": "链接正常",
"链接状态码": 200,
"状态码解释": "请求成功,服务器已成功处理了请求。"
}
用于检测网站链接是否正常,判断链接是否存在异常或死链情况。
适用于站长工具场景,帮助开发者快速检查指定链接的可访问状态。
https://api-v2.317ak.com/api/zzgj/jclj/api.php
支持请求方式:
接口调用需要进行密钥鉴权。
首选鉴权方式:Query 参数。
请求时需携带 key 参数作为调用密钥。
| 参数名 | 类型 | 必填 | 说明 | |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| url | string | 是 | 需要检测的网站链接,例如:https://api-v2.317ak.com/ |
{
"状态": "成功",
"检测链接": "https://api.317ak.com/",
"检测结果": "链接正常",
"链接状态码": 200,
"状态码解释": "请求成功,服务器已成功处理了请求。"
}
| 字段 | 类型 | 说明 |
|---|---|---|
| 状态 | string | 请求处理结果,成功时返回“成功”。 |
| 检测链接 | string | 返回本次检测的网站链接。 |
| 检测结果 | string | 返回链接检测结果,例如“链接正常”。 |
| 链接状态码 | integer | 返回检测目标链接的状态码。 |
| 状态码解释 | string | 对链接状态码的文字说明。 |
{
"code": 0,
"msg": "未提供调用密钥",
"errcode": 11001
}
| errcode | 含义 |
|---|---|
| 11001 | 未提供调用密钥 |
| 11002 | 密钥错误 |
| 11003 | 密钥已禁用 |
| 11004 | 积分余额不足 |
| 11005 | 请求过于频繁(QPM 限制) |
| 11006 | 接口维护中 |
| 11007 | 接口已禁用 |
| 11008 | 接口不可用 |
| 11009 | 密钥校验暂不可用 |
| 11010 | 积分系统暂不可用 |
| 11011 | 收费接口须提供有效密钥 |
| 11012 | 鉴权方式错误 |
| 11013 | 接口不存在 |
| 11014 | ***地址无效 |
| 11015 | ***地址不允许 |
| 11016 | ***请求失败 |
| 11017 | 服务暂不可用 |
| 11018 | 请求方式不允许 |
| 11019 | 当前IP不在白名单内 |
| 11020 | 启用出口代理须提供有效密钥 |
| 11021 | 未配置可用出口代理 |
| 11022 | 出口代理不可用 |
| 11023 | 密钥已过期 |
| 11024 | 令牌分配积分不足 |
curl -G "https://api-v2.317ak.com/api/zzgj/jclj/api.php" \
--data-urlencode "key=你的接口密钥" \
--data-urlencode "url=https://api-v2.317ak.com/"
// PHP
## 注意事项
- 调用接口前需妥善保管接口密钥,避免将 `key` 泄露给他人或直接暴露在公开页面、前端代码中。
- 本接口通过 Query 参数 `key` 进行鉴权,请确保请求中携带有效密钥,否则无法正常调用。
- `url` 参数需填写完整的网站链接,建议包含正确的协议(如 `https://`),并确保链接格式有效。
- 检测结果会根据目标链接实际响应情况返回,请勿将不存在、格式错误或无法访问的地址作为检测目标。
- 接口为免费调用服务,请合理控制调用频率,避免短时间内大量重复检测同一批链接。
- 建议使用 HTTPS 方式发起接口请求,以保障请求过程中的数据安全。
- 返回结果中的链接状态码用于判断目标链接响应情况,需结合状态码解释进行处理。# 检测链接异常
curl -G \
"https://api-v2.317ak.com/api/zzgj/jclj/api.php" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "url=https://api-v2.317ak.com/" \
-s \
-X GET