GET/api/v4/locations/{locationId}/google-analytics

拠点の Google アナリティクスを取得する

指定した日付範囲における、拠点の Google Business Profile の日別インタラクション指標を返します。

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

パラメーター

パス

名前型必須説明
locationIdstring必須Location ID, either the Base64 Relay id (e.g. TG9jYXRpb246MTgwMDI4OQ==) or the raw numeric database id (e.g. 1800289). Both forms resolve to the same location.

クエリ

名前型必須説明デフォルト
fromDatestring任意Start of the range (YYYY-MM-DD). Defaults to a recent window when omitted.—
toDatestring任意End of the range (YYYY-MM-DD).—

レスポンス

200Daily Google interaction metrics. Each metric is a time-series array; a metric is `null` when no data exists for the range or the profile is not connected.
Response
{  "data": {    "googleInsights": {      "total": [        { "startTime": "2025-06-01T00:00:00+00:00", "value": 412 },        { "startTime": "2025-06-02T00:00:00+00:00", "value": 388 }      ],      "search": [        { "startTime": "2025-06-01T00:00:00+00:00", "value": 300 }      ],      "maps": [        { "startTime": "2025-06-01T00:00:00+00:00", "value": 112 }      ],      "directionsAction": [        { "startTime": "2025-06-01T00:00:00+00:00", "value": 24 }      ],      "phoneAction": [        { "startTime": "2025-06-01T00:00:00+00:00", "value": 8 }      ],      "websiteAction": [        { "startTime": "2025-06-01T00:00:00+00:00", "value": 41 }      ],      "businessBookings": [        { "startTime": "2025-06-01T00:00:00+00:00", "value": 0 }      ],      "businessFoodOrders": [        { "startTime": "2025-06-01T00:00:00+00:00", "value": 0 }      ],      "businessFoodMenuClicks": [        { "startTime": "2025-06-01T00:00:00+00:00", "value": 0 }      ]    }  }}
401Unauthenticated, missing or invalid API key.

拠点の Google Business Profile の日別インタラクションデータを返します。各指標は時系列データポイントの配列であり、各ポイントには startTime(集計件数が属する日付)と value が含まれます。

利用可能な指標:

  • total:プロフィールの合計表示回数で、search と maps の合計です。以下のアクション指標は含まれないため、上記のサンプルでは 412 = 検索 300 + マップ 112 となります。
  • search:Google Search結果での表示回数(デスクトップとモバイルの合計)
  • maps:Google Mapsの検索結果での表示回数(デスクトップとモバイルの合計)
  • directionsAction:拠点への経路のリクエスト数
  • phoneAction:通話ボタンのクリック数
  • websiteAction:ウェブサイトへのクリック数
  • businessBookings:プロフィールから開始された予約数
  • businessFoodOrders:プロフィールから行われた料理の注文数
  • businessFoodMenuClicks:料理メニューへのリンクのクリック数

パスではどちらの id 形式も使用できます

1800289 と TG9jYXRpb246MTgwMDI4OQ== は、どちらも同じ拠点を指します。Base64 Relay id を優先して使用してください。これはすべての読み取りエンドポイントが返す形式であり、API の他の部分でも受け付ける形式です。数値でもデコード可能な Relay id でもない値を指定すると、本文が {"data":{"googleInsights":null},"errors":[...]} の 200 が返されるため、サーバー障害と誤認しやすくなります。

Shell
curl -s 'https://listingsapi.com/api/v4/locations/TG9jYXRpb246MTgwMDI4OQ==/google-analytics?fromDate=2025-06-01&toDate=2025-06-30' \  -H "Authorization: API $LISTINGSAPI_KEY"

データ更新の影響をレポートする

一般的な用途は、変更前後の表示状況のレポートです。拠点の営業時間やカテゴリの変更を送信した後、変更前後の数週間について google-analytics をポーリングし、search + maps をグラフ化して増加を示します。リクエストした期間の Google データが拠点にない場合、またはその拠点の Google プロフィールが接続されていない場合、個々の指標は空の配列ではなく null として返されるため、集計では null と [] を同じように扱ってください。Facebook および Bing のアナリティクスと組み合わせることで、掲載先を横断した状況を把握できます。

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