GET/api/v4/rollup_interactions

取得彙總互動

傳回帳戶中多個地點的互動清單,採用游標分頁,並支援篩選與排序。

需要 API 金鑰。標頭格式與金鑰輪替請參閱驗證。

參數

查詢

名稱類型必填說明預設值
tagstring選填Location tag to scope the rollup to. Defaults to `all`, every location the key can see. Omit it unless you tag locations.all
siteUrlsstring選填JSON-encoded array of publisher hostnames to include.—
startDatestring選填Start of the date-range filter (YYYY-MM-DD).—
endDatestring選填End of the date-range filter (YYYY-MM-DD).—
searchStringstring選填Full-text search across interaction content.—
categorystring選填Single interaction category, e.g. `REVIEW`.—
categoriesstring選填JSON-encoded array of interaction categories.—
ratingFiltersstring選填JSON-encoded array of star ratings to include, e.g. `[3,4]`.—
ratingFilterinteger選填Single star rating to filter by.—
responseStatusstring選填JSON-encoded response-status filter. Values: `RESPONDED`, `PENDING`.—
sortOrderstring選填JSON-encoded sort order. Values: `NEWEST_FIRST`, `OLDEST_FIRST`, `LAST_RESPONDED`.—
firstinteger選填Number of records to return from the beginning. Defaults to 20 when omitted, the endpoint always returns a single page, never the whole history.—
afterstring選填Cursor to page forward from. Pass `pageInfo.endCursor`, or equivalently the `cursor` of the last edge in the previous page.—
lastinteger選填Number of records to return from the end.—
beforestring選填Cursor to page backward from, used with `last`. Pass the `cursor` of the first edge of the page you are moving back from. `pageInfo` carries no `startCursor` field, so the edge cursor is the value to use.—

回應

200Paginated rollup of interactions across the account. `data.rollupInteractions` holds the connection.
Response
{  "data": {    "rollupInteractions": {      "pageInfo": {        "hasNextPage": true,        "hasPreviousPage": false      },      "edges": [        {          "node": {            "id": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",            "source": "maps.google.com",            "content": "Excellent service, highly recommend.",            "authorName": "Priya S.",            "rating": 5,            "date": "2026-06-30T12:04:11+00:00",            "category": "Review",            "type": "Review",            "responded": false,            "responseCount": 0,            "canRespond": true,            "locationId": 1800289          },          "cursor": "SW50ZXJhY3Rpb246OWUyNmQyYTg="        }      ],      "totalCount": 1284    }  }}
401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.

傳回帳戶的跨地點互動檢視。此端點支援與個別地點的 列出互動 端點相同的游標分頁(first、last、after、before)與篩選條件。連線位於 data.rollupInteractions,且每個 node 都帶有 locationId,讓您能將互動歸屬至其所屬店家。

totalCount 是範圍內所有地點中符合您篩選條件的互動總數,而非本頁傳回的數量。省略 first 時會傳回 20 筆記錄,因此單次呼叫絕不會取得完整的帳戶歷史記錄,請使用 after 逐頁取得資料,直到取得 totalCount 筆記錄。

注意事項:彙總一律涵蓋整個帳戶

此端點沒有指定個別地點的參數:使用預設的 tag=all 時,會彙總 API 金鑰可存取的所有地點,而唯一能縮小範圍的方式是使用地點 tag。此端點沒有 locationFilters 或 locationIds 引數,傳送這些引數時會予以忽略,而不會拒絕請求。請使用現有的篩選條件(siteUrls、responseStatus、sortOrder、startDate/endDate、searchString)縮小結果集,或自行依每個節點的 locationId 將結果分組。

使用案例:帳戶範圍的「需要回覆」佇列

若要列出所有地點中仍在等待業主回覆的每則評論,請呼叫 GET /rollup_interactions?responseStatus=["PENDING"]&sortOrder=["NEWEST_FIRST"]&first=50,接著使用 after = pageInfo.endCursor(等同於最後一個 edge 的 cursor)逐頁取得資料,直到 hasNextPage 為 false,或某一頁傳回空的 edges 陣列時停止。這樣就不必逐一遍歷各個地點。由於此端點採用分頁且設有速率限制,收到 429 時請遵循 Retry-After 標頭,並在排程同步時優先採用限定日期範圍的執行方式(startDate/endDate)。

Request
curl -X GET 'https://listingsapi.com/api/v4/rollup_interactions' \  -H "Authorization: API $LISTINGSAPI_KEY"