GET/api/v4/locations/{locationId}/review-analytics-timeline

获取评价分析时间序列

返回单个地点的每日评价数量和平均评分时间序列。

需要 API 密钥。请求头格式和密钥轮换请参阅身份验证。

参数

路径

名称类型必填描述
locationIdstring必填Location ID, a raw numeric database ID (e.g. `1800289`) or its Base64-encoded Relay ID (e.g. `TG9jYXRpb246MTgwMDI4OQ==`).

查询

名称类型必填描述默认值
startDatestring可选First day of the series (`YYYY-MM-DD`). Omitting it lets the service pick its default window, so pass it whenever the chart's range matters.—
endDatestring可选Last day of the series (`YYYY-MM-DD`).—
sitestring可选Restrict the series to a single review source, by site URL (e.g. `maps.google.com`). Omit for all sources combined.—

响应

200One entry per day in the requested range. Response key `interactionsChartData`.
Response
{  "data": {    "interactionsChartData": {      "data": [        { "date": "2026-08-01", "interactionCount": 4, "averageRating": 4.5 },        { "date": "2026-08-02", "interactionCount": 0, "averageRating": null },        { "date": "2026-08-03", "interactionCount": 7, "averageRating": 4.285714285714286 }      ]    }  }}
401Unauthenticated, missing or invalid API key.
403The key is valid but not permitted to read this location (`SY90003`).

返回趋势图所依据的逐日评价序列:每天收到多少条评价,以及这些评价的平均星级评分。它与 获取互动分析(总体 KPI)和 按站点获取评价分析(按来源细分)相对应,提供时间序列视图。

每个条目包含 3 个字段:

  • date:日历日期,格式为 YYYY-MM-DD。
  • interactionCount:当天收到的评价数量。
  • averageRating:当天评价的平均星级评分,当天没有评价时为 null。这是每日平均值,而非累计平均值,因此即使是评分很高的商家,如果某天评价较少且只收到 1 条 1 星评价,当天也会显示为 1.0。

使用场景:30 天迷你趋势图

要在地点的平均星级评分下方绘制 30 天趋势图,请调用此路由,并通过 startDate 和 endDate 指定该时间范围,将 interactionCount 绘制为柱状图,将 averageRating 绘制为折线。结合概览路由获取核心指标;概览中的 delta 字段已经是与上一等长时段的比较结果,因此您无需自行获取两个时间范围的数据。

传入 site 可按来源拆分时间序列,例如展示评分下降来自某个平台,而非所有平台普遍下降。该值为 列出地点的评价来源 所返回的 siteSettings[].name 中显示的站点 URL。

上述响应仅为示例。

Request
curl -X GET 'https://listingsapi.com/api/v4/locations/<locationId>/review-analytics-timeline' \  -H "Authorization: API $LISTINGSAPI_KEY"