Skip to content

business_data/trustpilot/search/task_get:按任务 ID 获取 Trustpilot 搜索结果

本接口使用 GET 方法,通过任务 ID 获取 Trustpilot 企业搜索结果。

GET https://api.seermartech.cn/v3/business_data/trustpilot/search/task_get/$id

接口返回与创建任务时 keyword 参数的企业资料。系统会尽可能准确地复现任务创建时指定参数对应的搜索结果。你可以访问响应中的 check_url,并使用无痕模式核验结果。系统不会考虑用户偏好、搜索历史或个性化因素。

计费说明

  • 在创建任务时计费。
  • 任务创建后的 30 天,可获取该任务的结果。
  • 实扣费以响应头 X-SeerMarTech-Charge-CNY 为准。
  • 本接口本身不重复收取任务获取费用。

请求参数

请求路径参数如下:

参数名类型说明
idstring任务唯一标识,UUID 格式。任务创建后 30 天可随时使用该 ID 获取结果。

本接口为 GET 请求,无需请求体。

测试环境

可以使用以下测试地址查看接口支持的字段。测试环境会返回虚拟数据,不会产生费用:

https://api.seermartech.cn/v3/business_data/trustpilot/search/task_get/00000000-0000-0000-0000-000000000000

响应字段

顶层响应字段

字段名类型说明
versionstring当前 API 版本。
status_codeinteger通用响应状态码。
status_messagestring通用状态说明。
timestring接口执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
tasks_countintegertasks 数组中的任务数量。
tasks_errorintegertasks 数组中返回错误的任务数量。
tasksarray任务结果数组。

tasks 数组字段

字段名类型说明
idstring任务唯一标识,UUID 格式。
status_codeinteger任务状态码,通常位于 10000-60000 范围。
status_messagestring任务状态说明。
timestring任务执行耗时,单位为秒。
costfloat平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。
result_countintegerresult 数组中的数量。
patharray请求 URL 路径。
dataobject创建任务时提交的参数。
resultarray搜索结果数组。

data 字段

data含创建任务时提交的参数,例如:

字段名类型说明
se_typestring搜索结果类型,例如 organic
sestring搜索来源,例如 trustpilot
apistringAPI 类型,例如 business_data
functionstringAPI 功能,例如 search
keywordstring搜索。
devicestring设备类型,例如 desktop
osstring操作系统,例如 windows

result 数组字段

字段名类型说明
keywordstring创建任务时提交的搜索。
se_domainstring创建任务时提交的搜索引擎域名。
check_urlstring对应搜索结果页面的直接 URL,可用于核验结果准确性。
datetimestring获取结果的时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。示例:2019-11-15 12:57:46 +00:00
items_countintegeritems 数组中的结果数量。可在创建任务时增大 depth 参数以获取更多结果。
itemsarray找到的企业搜索结果。可在创建任务时增大 depth 参数以获取更多结果。

items 数组字段

字段名类型说明
typestring结果类型,目前可能为 trustpilot_search_organic
rank_groupinteger在相同 type 结果组中的排名。不同类型结果之间不会合并计算此排名。
rank_absoluteinteger在结果中的绝对排名。
titlestring企业名称。
domainstring企业域名。
urlstring企业页面 URL。
reviews_countinteger企业获得的评论总数。
ratingobject企业评分信息。

rating 对象字段

字段名类型说明
rating_typestring评分类型,目前为 Max5
valuefloat企业评分值。
votes_countinteger评分票数,即企业获得的评价数量。
rating_maxinteger评分类型对应的最大值。Max5 的最大值为 5

请求示例

cURL

bash
id="04011058-0696-0199-0000-2196151a15cb"

curl --location --request GET \
  "https://api.seermartech.cn/v3/business_data/trustpilot/search/task_get/${id}" \
  --header "Authorization: Bearer smt_live_YOUR_KEY" \
  --header "Content-Type: application/json"

TypeScript

typescript
import axios from "axios";

const taskId = "02231934-2604-0066-2000-570459f04879";

axios
  .get(
    `https://api.seermartech.cn/v3/business_data/trustpilot/search/task_get/${taskId}`,
    {
      headers: {
        Authorization: "Bearer smt_live_YOUR_KEY",
        "Content-Type": "application/json",
      },
    }
  )
  .then((response) => {
    // 处理接口返回数据
    console.log(response.data);
  })
  .catch((error) => {
    // 处理请求错误
    console.error(error.response?.data || error.message);
  });

Python

python
import requests

task_id = "04011058-0696-0199-0000-2196151a15cb"
url = (
    "https://api.seermartech.cn/v3/business_data/"
    f"trustpilot/search/task_get/{task_id}"
)

headers = {
    "Authorization": "Bearer smt_live_YOUR_KEY",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers, timeout=30)

if response.ok:
    result = response.json()
    # 处理搜索结果
    print(result)
else:
    print(
        f"请求失败,HTTP 状态码:{response.status_code},"
        f"响应:{response.text}"
    )

响应示例

json
{
  "version": "0.1.20220208",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.0752 sec.",
  "cost": 0,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "04011058-0696-0199-0000-2196151a15cb",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.0610 sec.",
      "cost": 0,
      "result_count": 1,
      "path": [
        "v3",
        "business_data",
        "trustpilot",
        "search",
        "task_get"
      ],
      "data": {
        "se_type": "organic",
        "se": "trustpilot",
        "api": "business_data",
        "function": "search",
        "keyword": "pizza restaurant",
        "device": "desktop",
        "os": "windows"
      },
      "result": [
        {
          "keyword": "pizza restaurant",
          "se_domain": "trustpilot.com",
          "check_url": "https://www.trustpilot.com/search?query=pizza%20restaurant",
          "datetime": "2019-11-15 12:57:46 +00:00",
          "items_count": 1,
          "items": [
            {
              "type": "trustpilot_search_organic",
              "rank_group": 1,
              "rank_absolute": 1,
              "title": "示例餐",
              "domain": "example.com",
              "url": "https://example.com",
              "reviews_count": 1250,
              "rating": {
                "rating_type": "Max5",
                "value": 4.5,
                "votes_count": 1250,
                "rating_max": 5
              }
            }
          ]
        }
      ]
    }
  ]
}

状态与错误处理

建议根据以下字段实现异常处理:

  • 顶层 status_code:判断整个请求是否成功。
  • tasks[].status_code:判断任务是否成功。
  • status_message:获取通用错误说明。
  • tasks_error:判断是否存在返回错误的任务。
  • result 为空或 result_count0:表示当前任务没有可返回的搜索结果,或任务结果尚未正常生成。

当任务状态码表示错误时,应记录任务 ID、状态码和状态说明,并根据业务需要进行重试或人工排查。

实用场景

  • 监控品牌在 Trustpilot 搜索结果中的排名,及时发现企业页面排名下降或搜索减少。
  • 批量采集竞品企业的评分与评论数量,用于构建竞争对手口碑和品牌健康度看板。
  • 按发现潜在合作商家或本地服务企业,结合评分、评论量和域名筛选高质量企业。
  • 定期跟踪企业评分变化,识别用户口碑波动并为声誉管理提供预警依据。
  • 核验搜索结果与页面的一致性,通过 check_url 复查数据准确性,提升 SEO 和市场研究报告的可靠性。

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