Trustpilot
Trustpilot Comments API
获取 Trustpilot 评论数据,支持接口列出的分页、排序或筛选参数。
接口说明
Trustpilot Comments API 获取 Trustpilot 评论数据,支持接口列出的分页、排序或筛选参数。
使用 Pangolinfo API Key 调用,返回结构化 JSON 数据。
请求URL
请求头
| 参数名 | 参数值 | 类型 | 说明 |
|---|---|---|---|
| Content-Type | application/json | string | 数据格式 |
| Authorization | Bearer xxx | string | 认证凭证 |
采集最长约75秒,客户端超时建议设为90秒。
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
| target | Yes | string | Trustpilot 商家页链接,也可直接传商家域名(如 roborock.com.au)或官网任意链接(如 https://www.roborock.com/en) |
| options | No | object | 仅处理下列开放参数;未列出的字段忽略,内部参数不可覆盖。 |
options 参数说明
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
| maxPages | No | integer | 本次请求翻几页,默认 1,最大 5,按实际返回条数计费,更多数据用返回的游标续取 默认值: 1 最小值: 1 最大值: 5 |
| cursor | No | string | null | 续取评论: 上次输出的 pagination.comments.cursor |
| sort | No | string | 评论排序, 默认 recency (最新) |
| languages | No | string | 评论语言, 如 en / de; 默认 all (全部语言) |
| stars | No | integer | 只要某个星级的评论 (1-5) 最小值: 1 最大值: 5 |
| date | No | string | 发布时间范围: last30days / last3months / last6months / last12months; 默认不限;可选值:last30days / last3months / last6months / last12months 可用值: [“last30days”, “last3months”, “last6months”, “last12months”] |
| topics | No | string[] | string | 评论主题ID,最多10项,多个取交集;接受字符串数组或英文逗号分隔字符串,去除空白与空项。ID来自trustpilot-post返回的post.topics[].id。 |
仅处理本页列出的请求参数,其他字段忽略。分页游标原样传回,不编码、解码或转换格式。
每次默认1页,最多5页;页数必须为正整数,超过5按5处理。
topics可传最多10个主题ID(数组或英文逗号分隔字符串),去除空白和空项,多个主题取交集;不额外获取商家热门提及。
响应值
| 返回值 | 类型 | 说明 |
|---|---|---|
| code | integer | 状态码,0 表示成功 |
| message | string | 响应信息,成功时为 ok |
| pointCost | number | 本次请求实际消耗的积点 |
| data | object | 返回数据,结构见下表 |
| meta | object | 请求标识及耗时(毫秒) |
| billing | object | 计费条数、单价及规则版本 |
返回参数 data 说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| type | string | Type 可用值: [“comments”] |
| commentsCount | number | null | 当前筛选下的评论数 |
| comments | object[] | 评论, 与 trustpilot-post 同形 |
| pagination | object | 评论分页 |
data.comments[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | 评论 id |
| url | string | 评论链接 |
| title | string | null | 评论标题 |
| content | string | null | 评论正文 |
| rating | number | null | 星级 (1-5) |
| likes | number | null | 有用数 |
| language | string | null | 语言代码 |
| source | string | null | 来源, 如 Organic / BannerRedirect |
| time | object | null | 发布时间 |
| experiencedAt | object | null | 消费日期 |
| updatedAt | object | null | 修改时间; 没改过为 null |
| nickname | string | null | 评论者显示名 |
| avatar | string | null | 评论者头像 |
| profileUrl | string | null | 评论者主页 |
| poster | object | 评论者 |
| verification | object | 评论验证 |
| location | any | 门店 (多门店商家); 没有为 null |
| productReviews | any[] | 商品评价 (上游原样) |
| consumersReviewCountOnSameDomain | number | null | 评论者对该商家写过的评论数 |
| merchantReply | object | null | 商家回复; 没有为 null |
data.comments[].time 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| text | string | null | 上游原始时间文本 |
| value | number | null | 解析后的毫秒时间戳; 解析失败为 null |
data.comments[].experiencedAt 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| text | string | null | 上游原始时间文本 |
| value | number | null | 解析后的毫秒时间戳; 解析失败为 null |
data.comments[].updatedAt 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| text | string | null | 上游原始时间文本 |
| value | number | null | 解析后的毫秒时间戳; 解析失败为 null |
data.comments[].poster 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | null | 评论者 id |
| countryCode | string | null | 评论者国家代码 |
| reviewsCount | number | null | 评论者写过的评论数 |
| verified | boolean | 评论者是否认证 |
data.comments[].verification 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| isVerified | boolean | 是否验证过的评论 |
| level | string | null | 验证级别, 如 invited / not-verified |
| source | string | null | 验证来源 |
data.comments[].merchantReply 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| content | string | null | 回复内容 |
| time | object | null | 回复时间 |
| updatedAt | object | null | 回复修改时间 |
data.pagination 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| comments | object | Comments |
data.pagination.comments 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| cursor | string | null | 下一页游标, 传回 options.cursor 续取; 到底 (或匿名 10 页上限) 为 null |
| hasMore | boolean | 是否还有更多 |
请求示例
返回示例
下例截取实际响应中的首条列表记录,长文本与链接作了缩写;pointCost 为该次完整响应的实际费用。完整字段结构可在在线调试页查看。
积点消耗说明
每条一级评论消耗 0.8 积点,附带回复免费。支持独立回复模式的接口按返回的直接回复条数计费,每条0.8积点,回复附带的下一层免费。
空结果、失败响应不扣费。同一响应中相同 ID 只计一次,独立调用和续页分别计费。详见 社媒评论 API 计费说明。

