Google アナリティクスの MCP サーバーを試します。
GitHub からインストールし、詳細については
お知らせをご覧ください。
Method: accounts.list
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
呼び出し元がアクセスできるすべてのアカウントを返します。
なお、これらのアカウントには現在、Google アナリティクス プロパティが設定されていない場合があります。削除済み(復元可能)(「ゴミ箱に移動」)のアカウントは、デフォルトで除外されます。関連するアカウントが見つからない場合、空のリストを返します。
HTTP リクエスト
GET https://analyticsadmin.googleapis.com/v1beta/accounts
この URL は gRPC Transcoding 構文を使用します。
クエリ パラメータ
パラメータ |
pageSize |
integer
返すリソースの最大数。ページが他にあっても、サービスが返す値はこれよりも少ないことがあります。指定されていない場合、最大で 50 個のリソースが返されます。最大値は 200 です(それ以上の値は最大値に強制変換されます)。
|
pageToken |
string
前回の accounts.list 呼び出しから受け取ったページトークン。後続のページを取得するにはこれを指定します。ページネーションを行う場合、accounts.list に指定する他のすべてのパラメータは、ページトークンを受け取った呼び出しと一致している必要があります。
|
showDeleted |
boolean
削除(復元可能)されたアカウント(「ゴミ箱に移動」されたアカウント)を結果に含めるかどうか。アカウントを検査して、削除されているかどうかを確認できます。
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
accounts.list RPC のリクエスト メッセージ。
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
JSON 表現 |
{
"accounts": [
{
object (Account )
}
],
"nextPageToken": string
} |
フィールド |
accounts[] |
object (Account )
呼び出し元がアクセスできる結果。
|
nextPageToken |
string
次のページを取得するために pageToken として送信できるトークン。このフィールドを省略すると、後続のページはなくなります。
|
認可スコープ
以下のいずれかの OAuth スコープが必要です。
https://www.googleapis.com/auth/analytics.readonly
https://www.googleapis.com/auth/analytics.edit
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eRetrieves all Google Analytics 4 accounts accessible by the authenticated user, including pagination options.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering to include or exclude soft-deleted accounts.\u003c/p\u003e\n"],["\u003cp\u003eReturns an empty list if no matching accounts are found.\u003c/p\u003e\n"],["\u003cp\u003eRequires specific authorization scopes for data access.\u003c/p\u003e\n"],["\u003cp\u003eProvides details on the HTTP request, query parameters, and response structure.\u003c/p\u003e\n"]]],["This document details how to retrieve a list of accessible accounts using the Analytics Admin API. The core action is sending a `GET` request to the specified URL. Optional query parameters, `pageSize` and `pageToken`, enable pagination. The `showDeleted` parameter allows inclusion of soft-deleted accounts. The request body must be empty. A successful response returns a JSON object containing an array of `accounts` and a `nextPageToken` for subsequent pages. Authorization requires specific OAuth scopes.\n"],null,["# Method: accounts.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListAccountsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns all accounts accessible by the caller.\n\nNote that these accounts might not currently have GA properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.\n\n### HTTP request\n\n`GET https://analyticsadmin.googleapis.com/v1beta/accounts`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum) |\n| `pageToken` | `string` A page token, received from a previous `accounts.list` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `accounts.list` must match the call that provided the page token. |\n| `showDeleted` | `boolean` Whether to include soft-deleted (ie: \"trashed\") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nRequest message for accounts.list RPC.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"accounts\": [ { object (/analytics/devguides/config/admin/v1/rest/v1beta/accounts#Account) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `accounts[]` | `object (`[Account](/analytics/devguides/config/admin/v1/rest/v1beta/accounts#Account)`)` Results that were accessible to the caller. |\n| `nextPageToken` | `string` A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/analytics.readonly`\n- `https://www.googleapis.com/auth/analytics.edit`"]]