Trustpilot
Trustpilot Search API
按关键词搜索 Trustpilot 内容,返回搜索结果及对应信息。
接口说明
Trustpilot Search API 按关键词搜索 Trustpilot 内容,返回搜索结果及对应信息。
使用 Pangolinfo API Key 调用,返回结构化 JSON 数据。
请求URL
请求头
| 参数名 | 参数值 | 类型 | 说明 |
|---|---|---|---|
| Content-Type | application/json | string | 数据格式 |
| Authorization | Bearer xxx | string | 认证凭证 |
采集最长约75秒,客户端超时建议设为90秒。
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
| target | Yes | string | 搜索关键词 |
| options | No | object | 仅处理下列开放参数;未列出的字段忽略,内部参数不可覆盖。 |
options 参数说明
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
| maxPages | No | integer | 本次请求翻几页,默认 1,最大 5,按实际返回条数计费,更多数据用返回的游标续取 默认值: 1 最小值: 1 最大值: 5 |
| cursor | No | string | null | 续页: 上次输出的 pagination.cursor |
| semantic | No | boolean | 语义搜索 (experiment=semantic_search_enabled), 召回更宽; 默认 false (关键词) |
仅处理本页列出的请求参数,其他字段忽略。分页游标原样传回,不编码、解码或转换格式。
每次默认1页,最多5页;页数必须为正整数,超过5按5处理。
响应值
| 返回值 | 类型 | 说明 |
|---|---|---|
| code | integer | 状态码,0 表示成功 |
| message | string | 响应信息,成功时为 ok |
| pointCost | number | 本次请求实际消耗的积点 |
| data | object | 返回数据,结构见下表 |
| meta | object | 请求标识及耗时(毫秒) |
| billing | object | 计费条数、单价及规则版本 |
返回参数 data 说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| businesses | object[] | 搜索结果 |
| count | number | 本次返回条数 |
| query | string | 搜索词 |
| searchMode | string | null | keyword / semantic |
| totalResults | number | null | 结果总数 |
| pagination | object | Pagination |
data.businesses[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | null | 商家 id |
| name | string | null | 商家名 |
| identifyingName | string | null | 商家域名 |
| url | string | null | Trustpilot 商家页, 可传给 trustpilot-post |
| trustScore | number | null | TrustScore |
| stars | number | null | 星级 |
| reviewsCount | number | null | 评论数 |
| location | any | 地址 (上游原样) |
| contact | any | website / email / phone (上游原样) |
| categories | object[] | 类目 |
| isRecommendedInCategories | boolean | 是否类目推荐 |
| rank | number | 结果排名 (从 1 开始) |
data.businesses[].categories[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | null | 类目 id |
| name | string | null | 类目名 |
| isPrimary | boolean | 是否主类目 |
| isPredicted | boolean | 是否推测类目 |
data.pagination 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| cursor | string | null | 下一页游标, 传回 options.cursor 续取 |
| hasMore | boolean | 是否还有更多 |
请求示例
返回示例
下例截取实际响应中的首条列表记录,长文本与链接作了缩写;pointCost 为该次完整响应的实际费用。完整字段结构可在在线调试页查看。
积点消耗说明
每条主体结果消耗 0.8 积点。
空结果、失败响应不扣费。同一响应中相同 ID 只计一次,独立调用和续页分别计费。详见 社媒评论 API 计费说明。

