主题
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为准。 - 本接口本身不重复收取任务获取费用。
请求参数
请求路径参数如下:
| 参数名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。任务创建后 30 天可随时使用该 ID 获取结果。 |
本接口为 GET 请求,无需请求体。
测试环境
可以使用以下测试地址查看接口支持的字段。测试环境会返回虚拟数据,不会产生费用:
https://api.seermartech.cn/v3/business_data/trustpilot/search/task_get/00000000-0000-0000-0000-000000000000
响应字段
顶层响应字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本。 |
status_code | integer | 通用响应状态码。 |
status_message | string | 通用状态说明。 |
time | string | 接口执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
tasks_count | integer | tasks 数组中的任务数量。 |
tasks_error | integer | tasks 数组中返回错误的任务数量。 |
tasks | array | 任务结果数组。 |
tasks 数组字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式。 |
status_code | integer | 任务状态码,通常位于 10000-60000 范围。 |
status_message | string | 任务状态说明。 |
time | string | 任务执行耗时,单位为秒。 |
cost | float | 平台原始 USD 成本兼容字段;人民币实扣以 X-SeerMarTech-Charge-CNY 为准。 |
result_count | integer | result 数组中的数量。 |
path | array | 请求 URL 路径。 |
data | object | 创建任务时提交的参数。 |
result | array | 搜索结果数组。 |
data 字段
data含创建任务时提交的参数,例如:
| 字段名 | 类型 | 说明 |
|---|---|---|
se_type | string | 搜索结果类型,例如 organic。 |
se | string | 搜索来源,例如 trustpilot。 |
api | string | API 类型,例如 business_data。 |
function | string | API 功能,例如 search。 |
keyword | string | 搜索。 |
device | string | 设备类型,例如 desktop。 |
os | string | 操作系统,例如 windows。 |
result 数组字段
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 创建任务时提交的搜索。 |
se_domain | string | 创建任务时提交的搜索引擎域名。 |
check_url | string | 对应搜索结果页面的直接 URL,可用于核验结果准确性。 |
datetime | string | 获取结果的时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00。示例:2019-11-15 12:57:46 +00:00。 |
items_count | integer | items 数组中的结果数量。可在创建任务时增大 depth 参数以获取更多结果。 |
items | array | 找到的企业搜索结果。可在创建任务时增大 depth 参数以获取更多结果。 |
items 数组字段
| 字段名 | 类型 | 说明 |
|---|---|---|
type | string | 结果类型,目前可能为 trustpilot_search_organic。 |
rank_group | integer | 在相同 type 结果组中的排名。不同类型结果之间不会合并计算此排名。 |
rank_absolute | integer | 在结果中的绝对排名。 |
title | string | 企业名称。 |
domain | string | 企业域名。 |
url | string | 企业页面 URL。 |
reviews_count | integer | 企业获得的评论总数。 |
rating | object | 企业评分信息。 |
rating 对象字段
| 字段名 | 类型 | 说明 |
|---|---|---|
rating_type | string | 评分类型,目前为 Max5。 |
value | float | 企业评分值。 |
votes_count | integer | 评分票数,即企业获得的评价数量。 |
rating_max | integer | 评分类型对应的最大值。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_count为0:表示当前任务没有可返回的搜索结果,或任务结果尚未正常生成。
当任务状态码表示错误时,应记录任务 ID、状态码和状态说明,并根据业务需要进行重试或人工排查。
实用场景
- 监控品牌在 Trustpilot 搜索结果中的排名,及时发现企业页面排名下降或搜索减少。
- 批量采集竞品企业的评分与评论数量,用于构建竞争对手口碑和品牌健康度看板。
- 按发现潜在合作商家或本地服务企业,结合评分、评论量和域名筛选高质量企业。
- 定期跟踪企业评分变化,识别用户口碑波动并为声誉管理提供预警依据。
- 核验搜索结果与页面的一致性,通过
check_url复查数据准确性,提升 SEO 和市场研究报告的可靠性。