検索広告 360 Reporting API の構造
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Search Ads 360 Reporting API の主なコンポーネントは、リソースとサービスです。リソースは検索広告 360 エンティティを表します。検索広告 360 エンティティを取得するには、サービスを使用します。
オブジェクト階層
検索広告 360 アカウントは、オブジェクトの階層構造です。

アカウントの最上位リソースはお客様です。
各アカウントには、1 つ以上の有効なキャンペーンが含まれます。
各 Campaign
には、広告を論理的なコレクションにまとめる 1 つ以上の広告グループが含まれます。
各 AdGroup
には 1 つ以上の広告グループの広告が含まれます。
1 つ以上の AdGroupCriterion
または CampaignCriterion
を広告グループまたはキャンペーンに適用できます。条件は、広告のトリガー方法を定義します。
- 条件の種類には、キーワード、年齢層、地域など、さまざまなものがあります。キャンペーン レベルで定義された条件は、キャンペーン内の他のすべてのリソースに影響します。キャンペーン全体の予算と期間を指定することもできます。
リソース
リソースは、検索広告 360 アカウント内のエンティティを表します。リソースの例として、Customer
、Campaign
、AdGroup
があります。
オブジェクト ID
検索広告 360 のすべてのオブジェクトは、独自の ID で識別されます。一部の ID は、すべての検索広告 360 アカウントでグローバルに一意ですが、他の ID は限定されたスコープ内でのみ一意です。
オブジェクト ID の一意性のスコープ |
予算 ID |
グローバル |
キャンペーン ID |
グローバル |
広告グループ ID |
グローバル |
広告 ID |
広告グループ各 AdGroupId / AdId ペアはグローバルに一意です。 |
AdGroupCriterion ID |
広告グループ各 AdGroupId / CriterionId ペアはグローバルに一意です。 |
CampaignCriterion ID |
キャンペーン各 CampaignId / CriterionId ペアはグローバルに一意です。 |
広告表示オプション |
キャンペーン各 CampaignId / AdExtensionId ペアはグローバルに一意です。 |
フィード ID |
グローバル |
Feed Item ID |
グローバル |
Feed Attribute ID |
フィード |
Feed Mapping ID |
グローバル |
ラベル ID |
グローバル |
ユーザーリスト ID |
グローバル |
これらの ID ルールは、検索広告 360 オブジェクトのローカル ストレージを設計する際に役立ちます。
オブジェクト タイプ
一部のオブジェクトは、複数のエンティティ タイプに使用できます。この場合、オブジェクトには、その内容を記述する type
フィールドが含まれます。たとえば、AdGroupAd
はテキスト広告、ホテル広告、ローカル広告を参照できます。型の値にアクセスするには、AdGroupAd.ad.type
フィールドを使用します。その値は AdType
列挙型で返されます。
リソース名
各リソースは resource_name
文字列によって一意に識別され、リソースとその親をパスに連結します。
たとえば、キャンペーン リソース名の形式は次のとおりです。
customers/CUSTOMER_ID/campaigns/CAMPAIGN_ID
お客様 ID が 1234567
の検索広告 360 アカウントの ID が 987654
のキャンペーンの resource_name
は次のとおりです。
customers/1234567/campaigns/987654
サービス
サービスを使用すると、検索広告 360 のエンティティとメタデータを取得できます。サービスタイプは次の 3 つです。
- 検索サービス
SearchAds360Service
は、すべてのリソース オブジェクトとパフォーマンス統計情報を取得するための単一の統合サービスです。Search
と SearchStream
の 2 つのメソッドが用意されています。どちらの方法でも、クエリするリソース、取得するリソース属性とパフォーマンス指標、リクエストのフィルタリングに使用する述語、パフォーマンス統計情報をさらに分類するために使用するセグメントを指定するクエリが必要です。詳しくは、検索レポートを作成すると検索広告 360 のクエリ言語をご覧ください。- フィールド サービス
SearchAds360FieldService
は、リソースで使用可能な属性やそのデータ型など、リソースに関するメタデータを取得します。SearchAds360Service
検索メソッドで使用可能なリソース、リソース フィールド、セグメンテーション キー、指標のカタログをリクエストできます。詳細については、リソース メタデータを取得するをご覧ください。- エンティティ固有のサービス
これらのサービスは、単一のリソース インスタンスを取得する GET
リクエスト メソッドを提供します。リソースの構造を調べる場合に便利です。
エンティティ固有のサービスの例:
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-29 UTC。
[null,null,["最終更新日 2025-08-29 UTC。"],[[["\u003cp\u003eThe Search Ads 360 Reporting API uses resources to represent Search Ads 360 entities and services to retrieve them, with the core being the SearchAds360Service for comprehensive data retrieval.\u003c/p\u003e\n"],["\u003cp\u003eSearch Ads 360 accounts are structured hierarchically, starting with the customer resource at the top, followed by campaigns, ad groups, ads, and criteria for targeting.\u003c/p\u003e\n"],["\u003cp\u003eEvery Search Ads 360 object has a unique ID, some globally and others within a specific scope like an ad group or campaign, which is important for data management.\u003c/p\u003e\n"],["\u003cp\u003eResources are identified by resource names, which are strings that combine the resource and its parent resources in a path format, such as customers/CUSTOMER_ID/campaigns/CAMPAIGN_ID.\u003c/p\u003e\n"],["\u003cp\u003eThe Search Ads 360 Reporting API provides services like SearchAds360Service for data retrieval, SearchAds360FieldService for resource metadata, and entity-specific services for detailed information on individual resources like custom columns.\u003c/p\u003e\n"]]],["The Search Ads 360 Reporting API uses resources (entities) and services (retrieval methods). Resources, like `Customer`, `Campaign`, and `AdGroup`, are organized hierarchically. Each object has a unique ID with varying scopes and a `resource_name` for identification. Services include `SearchAds360Service` to retrieve resources and statistics, `SearchAds360FieldService` for metadata, and entity-specific services for individual resource instances. `SearchAds360Service` uses queries with attributes, metrics, predicates, and segments to filter data.\n"],null,["# Search Ads 360 Reporting API structure\n\nThe primary components of the Search Ads 360 Reporting API are *resources* and\n*services*. A resource represents a Search Ads 360 entity and you use a service\nto retrieve Search Ads 360 entities.\n\nObject hierarchy\n----------------\n\nA Search Ads 360 account is a hierarchy of objects.\n\n- The top-level resource of an account is the [customer](/search-ads/reporting/api/reference/fields/v0/customer).\n\n- Each account contains one or more active [campaigns](/search-ads/reporting/api/reference/fields/v0/campaign).\n\n- Each `Campaign` contains one or more [ad groups](/search-ads/reporting/api/reference/fields/v0/ad_group) that group your ads into\n logical collections.\n\n- Each `AdGroup` contains one or more [ad group ads](/search-ads/reporting/api/reference/rpc/ad_group_ad).\n\n- You can attach one or more [`AdGroupCriterion`](/search-ads/reporting/api/reference/fields/v0/ad_group_criterion) or [`CampaignCriterion`](/search-ads/reporting/api/reference/fields/v0/campaign_criterion)\n to an ad group or campaign. Criteria define how ads are triggered.\n\n - There are many [criterion types](), such as, keywords, age ranges, and locations. Criteria defined at the campaign level affect all other resources within the campaign. You can also specify campaign-wide budgets and dates.\n\nResources\n---------\n\nResources represent the entities in your Search Ads 360 account. Example\nresources include [`Customer`](/search-ads/reporting/api/reference/fields/v0/customer), [`Campaign`](/search-ads/reporting/api/reference/fields/v0/campaign) and [`AdGroup`](/search-ads/reporting/api/reference/fields/v0/ad_group).\n\n### Object IDs\n\nEvery object in Search Ads 360 is identified by its own ID. Some IDs are\nglobally unique, that is, across all Search Ads 360 accounts, while others\nare unique only within a confined scope.\n\n| Object ID uniqueness scope ||\n|----------------------|------------------------------------------------------------------------------|\n| Budget ID | Global |\n| Campaign ID | Global |\n| AdGroup ID | Global |\n| Ad ID | Ad Group \u003cbr /\u003e Each `AdGroupId` / `AdId` pair is globally unique. |\n| AdGroupCriterion ID | Ad Group \u003cbr /\u003e Each `AdGroupId` / `CriterionId` pair is globally unique. |\n| CampaignCriterion ID | Campaign \u003cbr /\u003e Each `CampaignId` / `CriterionId` pair is globally unique. |\n| Ad Extensions | Campaign \u003cbr /\u003e Each `CampaignId` / `AdExtensionId` pair is globally unique. |\n| Feed ID | Global |\n| Feed Item ID | Global |\n| Feed Attribute ID | Feed |\n| Feed Mapping ID | Global |\n| Label ID | Global |\n| UserList ID | Global |\n\nThese ID rules can be useful when designing local storage for your Search Ads\n360 objects.\n\n### Object types\n\nSome objects can be used for multiple entity types. If this is the case, the\nobject contains a `type` field that describes its contents. For example,\n[`AdGroupAd`](/search-ads/reporting/api/reference/rpc/ad_group_ad) can refer to a text ad, hotel ad, or local ad.\nYou can access the type value through the [`AdGroupAd.ad.type`](/search-ads/reporting/api/reference/rpc/add_group_ad) field. Its\nvalue is returned in the [`AdType`](/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.enums#adtypeenum) enum.\n\n### Resource names\n\nEach resource is uniquely identified by a `resource_name` string that\nconcatenates the resource and its parents into a path.\n\nCampaign resource names, for example, have the form: \n\n```scdoc\ncustomers/CUSTOMER_ID/campaigns/CAMPAIGN_ID\n```\n\nA campaign with ID `987654` in the Search Ads 360 account with customer ID\n`1234567`, has the `resource_name`: \n\n```text\ncustomers/1234567/campaigns/987654\n```\n\nServices\n--------\n\nServices let you retrieve your Search Ads 360 entities and metadata. There a\nthree service types:\n\nSearch service\n: [`SearchAds360Service`](/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.services#searchads360service) is the single, unified service for retrieving all\n resource objects and performance statistics. It provides two methods: *`Search`*\n and *`SearchStream`* . Both methods require require a query that specifies the\n resource to query, the resource attributes and performance metrics to retrieve,\n the predicates to use for filtering the request, and the segments to use to\n further break down performance statistics. See [Create search reports](/search-ads/reporting/concepts/search-reports) and [Search\n Ads 360 Query Language](/search-ads/reporting/concepts/query-language) for more\n information.\n\nField service\n: [`SearchAds360FieldService`](/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.services#searchads360fieldservice) retrieves metadata\n about resources, such as, the available attributes for a resource and its data\n type. You can request the catalog for resources, resource fields, segmentation\n keys, and metrics available in the `SearchAds360Service` search methods. See\n [Retrieve resource metadata](/search-ads/reporting/concepts/field-service)\n to learn more.\n\nEntity-specific services\n\n: These services provide a `GET` request method that retrieves a single resource\n instance. This is useful for examining the structure of a resource.\n\n Examples of entity-specific services include:\n\n - [CustomColumnService](/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.services#customcolumnservice) that returns the requested custom column in full detail."]]