主题
API 状态
GET /v3/appendix/status
本接口使用 GET 方法,通过路径 /v3/appendix/status 查询本平台 API 及端点的当前运行状态,并在发生异常时返回详细的问题说明。
> 请求频率限制: 每分钟最多调用 10 次。
> 计费: 调用本接口不收取费用。
请求
http
GET https://api.seermartech.cn/v3/appendix/status本接口无需请求体。
认证
请求头使用 Bearer Token:
http
Authorization: Bearer smt_live_YOUR_KEY
Content-Type: application/json响应说明
接口返回 JSON 数据,顶层 tasks 数组。每个任务中对应 API 及端点的状态信息。
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码。完整状态码列表请参考 /v3/appendix/errors |
status_message | string | 通用状态说明。完整说明请参考 /v3/appendix/errors |
time | string | 本次请求总执行时间,单位为秒 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | tasks 数组中返回错误的任务数量 |
tasks | array | 任务结果数组 |
> 建议客户端对状态码及异常进行统一处理,根据 HTTP 状态码判断请求是否成功。
tasks 数组字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,采用 UUID 格式 |
status_code | integer | 任务状态码,通常位于 10000 至 60000 范围。完整状态码列表请参考 /v3/appendix/errors |
status_message | string | 任务状态说明 |
time | string | 任务执行时间,单位为秒 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量 |
path | array | 请求 URL 路径 |
data | array | GET 请求 URL 中传的参数 |
result | array | 任务结果数组 |
result 数组字段
| 字段 | 类型 | 说明 |
|---|---|---|
api | string | API 名称 |
status | string | API 当前状态 |
endpoints | array | 该 API 下各端点的状态信息 |
api 可能返回以下值:
serpkeywords_dataappendixdataforseo_labsdomain_analyticsmerchanton_pagebusiness_databacklinksapp_datacontent_analysiscontent_generation
API 状态值
status 可能返回以下值:
| 状态值 | 说明 |
|---|---|
major_outage | 重大障 |
partial_outage | 部分障 |
long_response_time | 响应时间过长 |
long_execution_time | 执行时间过长 |
webhook_delay | Webhook 延迟 |
send_delay | 发送延迟 |
ok | 正常 |
endpoints 数组字段
| 字段 | 类型 | 说明 |
|---|---|---|
endpoint | string | 端点名称 |
status | string | 端点当前状态 |
endpoint 可能返回以下值:
task_gettask_postlivepostback/pingback
端点的 status 字段使用与 API 状态相同的状态值:
major_outagepartial_outagelong_response_timelong_execution_timewebhook_delaysend_delayok
请求示例
cURL
bash
curl --location --request GET \
"https://api.seermartech.cn/v3/appendix/status" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json"PHP
php
<?php
$ch = curl_init('https://api.seermartech.cn/v3/appendix/status');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer smt_live_YOUR_KEY',
'Content-Type: application/json',
],
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
curl_close($ch);
$result = json_decode($response, true);
if (($result['status_code'] ?? null) === 20000) {
print_r($result);
} else {
echo '错误码:' . ($result['status_code'] ?? '未知');
echo ',错误信息:' . ($result['status_message'] ?? '未知');
}TypeScript
typescript
import axios from "axios";
axios
.get("https://api.seermartech.cn/v3/appendix/status", {
headers: {
Authorization: "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
})
.then((response) => {
const result = response.data;
if (result.status_code === 20000) {
console.log(result);
} else {
console.error(
`错误码:${result.status_code},错误信息:${result.status_message}`
);
}
})
.catch((error) => {
console.error("请求失败:", error.message);
});Python
python
import requests
url = "https://api.seermartech.cn/v3/appendix/status"
response = requests.get(
url,
headers={
"Authorization": "Bearer smt_live_YOUR_KEY",
"Content-Type": "application/json",
},
)
result = response.json()
if result.get("status_code") == 20000:
print(result)
else:
print(
"错误码:%s,错误信息:%s"
% (result.get("status_code"), result.get("status_message"))
)C#
csharp
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
public static class ApiStatusDemo
{
public static async Task GetStatusAsync()
{
using var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", "smt_live_YOUR_KEY");
var response = await httpClient.GetAsync(
"https://api.seermartech.cn/v3/appendix/status"
);
var result = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
Console.WriteLine(result);
}
else
{
Console.WriteLine(
$"HTTP 错误:{(int)response.StatusCode},响应:{result}"
);
}
}
}响应示例
json
{
"version": "0.1.20220819",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1054 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "4f2a7b8e-3d4c-4e1a-9f0b-123456789abc",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.1054 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v3",
"appendix",
"status"
],
"data": [
{
"api": "appendix",
"function": "status"
}
],
"result": [
{
"api": "keywords_data",
"status": "ok",
"endpoints": []
},
{
"api": "appendix",
"status": "ok",
"endpoints": []
},
{
"api": "dataforseo_labs",
"status": "ok",
"endpoints": []
},
{
"api": "domain_analytics",
"status": "ok",
"endpoints": []
},
{
"api": "merchant",
"status": "ok",
"endpoints": []
},
{
"api": "on_page",
"status": "ok",
"endpoints": []
},
{
"api": "business_data",
"status": "ok",
"endpoints": []
},
{
"api": "backlinks",
"status": "ok",
"endpoints": []
},
{
"api": "app_data",
"status": "ok",
"endpoints": []
},
{
"api": "content_analysis",
"status": "ok",
"endpoints": []
},
{
"api": "content_generation",
"status": "ok",
"endpoints": []
}
]
}
]
}实用场景
- 监控部 SEO 数据 API 的运行状态,及时发现服务障并暂停任务调度。
- 检查 API 端点是否存在响应延迟或执行延迟,定位数据采集链路问题。
- 构建 任务提交前的健康检查机制,在目标服务异常时持续创建任务。
- 触发 服务异常告警,将重大障、部分障和长时间响应同步到运维或项目协作系统。
- 统计 各 API 与端点的历史运行状态,为 SEO 数据服务的稳定性评估和供应商管理提供依据。