Skip to content

business_data/google/reviews/task_get

GET /v3/business_data/google/reviews/tasks_ready

接口说明

GET /v3/business_data/google/reviews/task_get/$id

根据任务 ID 获取 Google 本地商户评论结果。返回数据与创建任务时指定的商户名称、搜索引擎、位置和语言。本平台会尽可能准确地模拟指定位置和搜索环境,因此返回结果应与任务创建时对应条件下的搜索结果一致。

返回结果不考虑用户偏好、搜索历史及个性化因素。可访问响应中的 check_url,并使用无痕模式核验结果性。

任务结果自任务创建之日起 30 天可重复获取。获取结果本身不额外计费,费用在创建任务时产生。扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求参数

路径参数:

参数类型说明
idstring任务唯一标识,使用 UUID 格式。任务创建成功后获得,可在 30 天用于获取任务结果。

请求示例

cURL

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

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

Python

python
import requests

task_id = "05211333-2692-0298-0000-047fc45592ce"

response = requests.get(
    f"https://api.seermartech.cn/v3/business_data/google/reviews/task_get/{task_id}",
    headers={
        "Authorization": "Bearer smt_live_YOUR_KEY",
        "Content-Type": "application/json",
    },
)

response.raise_for_status()
data = response.json()
print(data)

TypeScript

typescript
import axios from "axios";

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

axios
  .get(
    `https://api.seermartech.cn/v3/business_data/google/reviews/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);
  });

响应结构

接口返回 JSON 数据,顶层 tasks 数组。错误码和状态消息可参考错误码文档。

顶层字段

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

tasks 字段

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

result 字段

商户评论汇总字段

字段类型说明
keywordstring创建任务时提交的。返回时会对编码进行解码,+ 会被解码为空格。
typestring搜索引擎结果类型。
se_domainstring搜索引擎域名。
location_codeinteger位置代码。
language_codestring语言代码。
check_urlstring对应搜索结果的直接 URL,可用于核验返回结果。
datetimestring获取结果的日期和时间,使用 UTC 格式:yyyy-mm-dd hh:mm:ss +00:00
titlestring评论模块标题,通常为商户名称。
sub_titlestring评论模块副标题,例如商户地址等补信息。
ratingobject商户总体评分信息。
feature_idstring搜索结果中评论模块的唯一标识。
place_idstringGoogle 分给商户位置的唯一标识。
cidstringGoogle 定义的商户唯一客户 ID。
reviews_countinteger商户评论总数。
items_countinteger当前结果中返回的评论数量。增加创建任务时的 depth 参数可获取更多评论。
itemsarray评论明细数组。

result.rating 字段

字段类型说明
rating_typestring评分类型,可为 Max5PercentsCustomMax
valuefloat基于评论计算的平均评分。
votes_countinteger评分票数。
rating_maxinteger当前评分类型的最大值。

items 评论字段

字段类型说明
typestring评论类型,固定可能为 google_reviews_search
rank_groupinteger在相同 type 结果组中的排名。不同类型结果不会计该排名。
rank_absoluteinteger评论在评论列表中的绝对排名。
positionstring评论在搜索结果中的位置,目前可能为 right
xpathstring评论在页面中的 XPath。
review_textstring评论文本,可能为自动翻译后的。
original_review_textstring评论原文,不应用自动翻译时的原始。
original_languagestring评论原文语言。
time_agostring相对发布时间,例如 a month ago
timestampstring评论发布时间,使用 UTC 格式:yyyy-mm-dd hh:mm:ss +00:00
ratingobject评论提交给出的评分。
reviews_countinteger评论提交发布的评论总数。
photos_countinteger评论提交发布的总数。
local_guideboolean是否 Local Guide 身份。
profile_namestring评论个人资料名称。
profile_urlstring评论个人资料 URL。
review_urlstring评论 URL。
profile_image_urlstring评论头像 URL。
owner_answerstring商户对评论的回复,可能为自动翻译后的。
original_owner_answerstring商户回复原文,不应用自动翻译时的原始。
owner_time_agostring商户回复的相对发布时间。
owner_timestampstring商户回复时间,使用 UTC 格式:yyyy-mm-dd hh:mm:ss +00:00
review_idstringGoogle 评论唯一标识。
imagesarray评论提交的图片。
review_highlightsarray评论重点摘要,被突出显示的评价维度及判断。

items.rating 字段

字段类型说明
rating_typestring评分类型,目前为 Max5
valuefloat评论评分值。
votes_countinteger该评分获得的反馈或票数。
rating_maxinteger评分最大值,Max5 类型的最大值为 5

items.images 字段

字段类型说明
typestring图片类型,通常为 images_element
altstring图片的替代文本。
urlstringGoogle 返回的图片 URL。
image_urlstring评论中展示的图片 URL。

items.review_highlights 字段

字段类型说明
featurestring被评价的商户特征或维度。
assessmentstring对该特征的评价。

响应示例

json
{
  "version": "0.1.20240514",
  "status_code": 20000,
  "status_message": "Ok.",
  "time": "0.0790 sec.",
  "cost": 0,
  "tasks_count": 1,
  "tasks_error": 0,
  "tasks": [
    {
      "id": "04011058-0696-0199-0000-2196151a15cb",
      "status_code": 20000,
      "status_message": "Ok.",
      "time": "0.0530 sec.",
      "cost": 0,
      "result_count": 1,
      "path": [
        "v3",
        "business_data",
        "google",
        "reviews",
        "task_get",
        "04011058-0696-0199-0000-2196151a15cb"
      ],
      "data": {
        "se_type": "reviews",
        "se": "google",
        "api": "business_data",
        "function": "reviews",
        "location_name": "London,England,United Kingdom",
        "language_name": "English",
        "keyword": "hedonism wines",
        "depth": 10,
        "sort_by": "highest_rating",
        "device": "desktop",
        "os": "windows"
      },
      "result": [
        {
          "keyword": "hedonism wines",
          "type": "google_reviews_search",
          "se_domain": "google.com",
          "location_code": 1006886,
          "language_code": "en",
          "check_url": "https://www.google.com/search?q=hedonism+wines",
          "datetime": "2024-05-15 14:09:32 +00:00",
          "title": "Hedonism Wine",
          "sub_title": "London, United Kingdom",
          "rating": {
            "rating_type": "Max5",
            "value": 4.7,
            "votes_count": null,
            "rating_max": 5
          },
          "feature_id": "reviews_feature_id",
          "place_id": "ChIJexamplePlaceId",
          "cid": "0x4e1505095325804d",
          "reviews_count": 116,
          "items_count": 1,
          "items": [
            {
              "type": "google_reviews_search",
              "rank_group": 1,
              "rank_absolute": 1,
              "position": "right",
              "xpath": "/div/div/div/div/div/div",
              "review_text": "You will love the attention to detail and so many selections.",
              "original_review_text": null,
              "original_language": "en",
              "time_ago": "a month ago",
              "timestamp": "2024-05-05 14:09:32 +00:00",
              "rating": {
                "rating_type": "Max5",
                "value": 5,
                "votes_count": null,
                "rating_max": 5
              },
              "reviews_count": 116,
              "photos_count": 369,
              "local_guide": true,
              "profile_name": "Cam Pinkney",
              "profile_url": "https://www.google.com/maps/contrib/example",
              "review_url": "https://www.google.com/maps/reviews/data=example",
              "profile_image_url": "https://lh3.googleusercontent.com/example",
              "owner_answer": null,
              "original_owner_answer": null,
              "owner_time_ago": null,
              "owner_timestamp": null,
              "review_id": "ChZDSUhNMG9nS0VJQ0FnSUMxbHFyMFlnEAE",
              "images": null,
              "review_highlights": null
            }
          ]
        }
      ]
    }
  ]
}

任务获取流程

通常通过以下接口获取已完成任务列表,再使用任务 ID 调用本接口:

text
GET /v3/business_data/google/reviews/tasks_ready
GET /v3/business_data/google/reviews/task_get/$id

建议在程序中同时检查以下状态:

  • 顶层 status_code 是否为 20000
  • 任务级 status_code 是否表示成功;
  • tasks_error 是否大于 0
  • result 是否为空;
  • status_message 是否错误原因。

沙盒环境

可使用沙盒接口查看该端点支持的字段结构。沙盒返回的数据为虚拟数据,不会产生费用:

text
https://sandbox.seermartech.cn/v3/business_data/google/reviews/task_get/00000000-0000-0000-0000-000000000000

实用场景

  • 监控商户评论数量与平均评分,识别本地 SEO 表现变化并及时发现声誉风险。
  • 提取竞品评论文本和评分明细,分析竞品在服务、价格、产品等维度上的用户反馈。
  • 统计评论、Local Guide 身份及评论活跃度,评估商户本地搜索结果的丰富度。
  • 分析商户回复覆盖率与响应时效,优化品牌方的评论运营和客户服务流程。
  • 采集评论重点摘要与原文语言,开展多语言感分析和跨地区口碑对比。

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