Skip to content

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 及端点的状态信息。

顶层字段

字段类型说明
versionstring当前 API 版本
status_codeinteger通用状态码。完整状态码列表请参考 /v3/appendix/errors
status_messagestring通用状态说明。完整说明请参考 /v3/appendix/errors
timestring本次请求总执行时间,单位为秒
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务数量
tasks_errorintegertasks 数组中返回错误的任务数量
tasksarray任务结果数组

> 建议客户端对状态码及异常进行统一处理,根据 HTTP 状态码判断请求是否成功。

tasks 数组字段

字段类型说明
idstring任务唯一标识,采用 UUID 格式
status_codeinteger任务状态码,通常位于 1000060000 范围。完整状态码列表请参考 /v3/appendix/errors
status_messagestring任务状态说明
timestring任务执行时间,单位为秒
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
result_countintegerresult 数组中的数量
patharray请求 URL 路径
dataarrayGET 请求 URL 中传的参数
resultarray任务结果数组

result 数组字段

字段类型说明
apistringAPI 名称
statusstringAPI 当前状态
endpointsarray该 API 下各端点的状态信息

api 可能返回以下值:

  • serp
  • keywords_data
  • appendix
  • dataforseo_labs
  • domain_analytics
  • merchant
  • on_page
  • business_data
  • backlinks
  • app_data
  • content_analysis
  • content_generation

API 状态值

status 可能返回以下值:

状态值说明
major_outage重大障
partial_outage部分障
long_response_time响应时间过长
long_execution_time执行时间过长
webhook_delayWebhook 延迟
send_delay发送延迟
ok正常

endpoints 数组字段

字段类型说明
endpointstring端点名称
statusstring端点当前状态

endpoint 可能返回以下值:

  • task_get
  • task_post
  • live
  • postback/pingback

端点的 status 字段使用与 API 状态相同的状态值:

  • major_outage
  • partial_outage
  • long_response_time
  • long_execution_time
  • webhook_delay
  • send_delay
  • ok

请求示例

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 数据服务的稳定性评估和供应商管理提供依据。

统一入口:官网 · LLM API · 控制台