Method: accounts.adUnits.list
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
指定された AdMob アカウントの広告ユニットを表示します。
HTTP リクエスト
GET https://admob.googleapis.com/v1beta/{parent=accounts/*}/adUnits
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
parent |
string
必須。広告ユニットを一覧表示するアカウントのリソース名。例: accounts/pub-9876543210987654
|
クエリ パラメータ
パラメータ |
pageSize |
integer
返される広告ユニットの最大数。指定しないか 0 を指定した場合、最大で 10,000 個の広告ユニットが返されます。最大値は 20,000 です。20,000 を超える値は 20,000 に強制変換されます。
|
pageToken |
string
最後の ListAdUnitsResponse によって返された値。は、これが前の adUnits.list 呼び出しの継続であることと、システムがデータの次のページを返す必要があることを示します。
|
リクエスト本文
リクエストの本文は空にする必要があります。
レスポンスの本文
広告ユニットの一覧表示リクエストに対するレスポンスです。
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
JSON 表現 |
{
"adUnits": [
{
object (AdUnit )
}
],
"nextPageToken": string
} |
フィールド |
adUnits[] |
object (AdUnit )
リクエストされたアカウントで生成された広告ユニットです。
|
nextPageToken |
string
空でない場合は、リクエストの広告ユニットがさらにある可能性があることを示します。この値は新しい ListAdUnitsRequest に渡す必要があります。
|
認可スコープ
次の OAuth スコープのいずれかが必要です。
https://www.googleapis.com/auth/admob.monetization
https://www.googleapis.com/auth/admob.readonly
詳しくは、OAuth 2.0 の概要をご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-21 UTC。
[null,null,["最終更新日 2025-08-21 UTC。"],[[["\u003cp\u003eThis page explains how to list ad units associated with a specific AdMob account using the \u003ccode\u003eadUnits.list\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe method requires the \u003ccode\u003eparent\u003c/code\u003e path parameter to specify the AdMob account and accepts optional \u003ccode\u003epageSize\u003c/code\u003e and \u003ccode\u003epageToken\u003c/code\u003e query parameters for pagination.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful responses provide a list of \u003ccode\u003eAdUnits\u003c/code\u003e and a \u003ccode\u003enextPageToken\u003c/code\u003e for retrieving additional pages if available.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is required using either \u003ccode\u003ehttps://www.googleapis.com/auth/admob.monetization\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/admob.readonly\u003c/code\u003e OAuth scopes.\u003c/p\u003e\n"]]],["This document details how to list ad units associated with a specific AdMob account. The process involves sending a `GET` request to `https://admob.googleapis.com/v1beta/{parent=accounts/*}/adUnits`, where `parent` is the account's resource name. Optional query parameters, `pageSize` (up to 20,000) and `pageToken` (for pagination), can be included. The request body must be empty. The response includes an array of `adUnits` and a `nextPageToken` for further results. Authorization requires specific OAuth scopes.\n"],null,["# Method: accounts.adUnits.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListAdUnitsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nList the ad units under the specified AdMob account.\n\n### HTTP request\n\n`GET https://admob.googleapis.com/v1beta/{parent=accounts/*}/adUnits`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. Resource name of the account to list ad units for. Example: accounts/pub-9876543210987654 |\n\n### Query parameters\n\n| Parameters ||\n|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The maximum number of ad units to return. If unspecified or 0, at most 10,000 ad units will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000. |\n| `pageToken` | `string` The value returned by the last `ListAdUnitsResponse`; indicates that this is a continuation of a prior `adUnits.list` call, and that the system should return the next page of data. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse for the ad units list request.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"adUnits\": [ { object (/admob/api/reference/rest/v1beta/accounts.adUnits#AdUnit) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| `adUnits[]` | `object (`[AdUnit](/admob/api/reference/rest/v1beta/accounts.adUnits#AdUnit)`)` The resulting ad units for the requested account. |\n| `nextPageToken` | `string` If not empty, indicates that there may be more ad units for the request; this value should be passed in a new `ListAdUnitsRequest`. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/admob.monetization`\n- `\n https://www.googleapis.com/auth/admob.readonly`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]