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)和 依網站取得評論分析(依來源細分)的時間軸版本。

每筆項目包含三個欄位:

  • 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"