GET/api/v4/review-phrases

レビュー内のフレーズを一覧表示

ある拠点のレビューで顧客が最もよく使うフレーズを、それぞれのレビュー統計とともに返します。

API キーが必要です。ヘッダーの形式とキーのローテーションについては認証を参照してください。

パラメーター

クエリ

名前型必須説明デフォルト
locationIdsstring任意JSON array of location IDs to aggregate over, e.g. `[1800289,1800290]`. Query values are JSON-parsed, so a bare single ID also works. Omit to cover every location the key can read.—
siteUrlsstring任意JSON array of review sources to include, e.g. `["maps.google.com"]`.—
startDatestring任意Only count reviews on or after this date (`YYYY-MM-DD`).—
endDatestring任意Only count reviews on or before this date (`YYYY-MM-DD`).—
searchStringstring任意Only return phrases containing this substring.—
phraseCountinteger任意Maximum number of phrases to return.—
categoriesstring任意JSON array of interaction categories to include (see the interaction attributes reference).—
ratingFiltersstring任意JSON array of star ratings to include, e.g. `[1,2]` to mine only unhappy reviews.—
responseStatusstring任意JSON array of `RESPONDED` / `PENDING` to restrict by whether the review has an owner reply.—
sortOrderstring任意One of `NEWEST_FIRST`, `OLDEST_FIRST`, `LAST_RESPONDED`, `LOWEST_RATING`, `HIGHEST_RATING`.—
categorystring任意Deprecated single-value form of `categories`. Kept for v4 compatibility; prefer `categories`.—
ratingFilterinteger任意Deprecated single-value form of `ratingFilters`. Kept for v4 compatibility; prefer `ratingFilters`.—

レスポンス

200Phrases with their per-phrase review stats. Response key `newReviewPhrases`, a top-level array.
Response
{  "data": {    "newReviewPhrases": [      {        "reviewPhrase": "friendly staff",        "phraseStats": {          "stats": [            { "name": "total-reviews", "value": 46, "delta": 12.5, "abs": 5 },            { "name": "overall-rating", "value": 4.7, "delta": 1.1, "abs": 0.05 }          ]        }      },      {        "reviewPhrase": "long wait",        "phraseStats": {          "stats": [            { "name": "total-reviews", "value": 11, "delta": 37.5, "abs": 3 },            { "name": "overall-rating", "value": 2.9, "delta": -8.4, "abs": -0.27 }          ]        }      }    ]  }}
401Unauthenticated, missing or invalid API key.
403The key is valid but not permitted to read one of the requested locations (`SY90003`).

ある拠点のレビュー本文に繰り返し登場するフレーズを、それぞれのフレーズを含むレビューのみを対象としたレビュー統計とともに返します。顧客が何に繰り返し言及しているか、その言及が好意的か否定的かを把握できます。

data.newReviewPhrasesはトップレベルの配列であり、ページネーション形式のレスポンスではありません。配列の長さに上限を設定するには、phraseCountを使用します。

各エントリには次の項目が含まれます。

  • reviewPhrase: フレーズそのものです。
  • phraseStats.stats: インタラクション分析を取得と同じ{ name, value, delta }構造で、そのフレーズを含むレビューのみを対象に計算されます。さらに、割合ではなく実数での変化量を格納するabsフィールドが含まれます。

すべてのフィルターは省略可能で、組み合わせて使用できるため、このルートはレビューのテキスト検索にも使えます。ratingFilters=[1,2]とstartDateを組み合わせると、直近1か月の苦情を、繰り返し登場する頻度の高い順に取得できます。

ユースケース:「よくある苦情」パネル

ある拠点の苦情パネルを作成するには、ratingFilters=[1,2]、90日前に設定したstartDate、phraseCount=10を指定してこのルートを呼び出します。結果として、低評価のレビューに最もよく登場する10個のフレーズが返されます。各フレーズのoverall-ratingに対応するphraseStatsを確認すると、そのフレーズが本当に突出しているのか、単によく使われる語句なのかがわかり、deltaからは状況が悪化しているかどうかがわかります。

クエリの値はJSONとして解析されるため、配列はJSON形式でクエリ文字列に指定します(例:?ratingFilters=[1,2]&siteUrls=["maps.google.com"])。

上記のレスポンスは一例です。

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