Google Ads API で使用されるリソース名は階層構造になっており、Google 広告内のエンティティの構成を反映しています。ほぼすべてのリソースは Customer リソースのサブリソースです。これは、ほぼすべての API 呼び出しが特定の Google 広告アカウントを対象とする必要があるという事実を反映しています。たとえば、キャンペーン、広告グループ、広告、キーワードはすべてルート顧客リソースのサブリソースです。
Google Ads エンティティ(顧客、キャンペーンなど)は、API 全体でリソース名で参照されます。ただし、リソース名自体に、階層内の各オブジェクトを識別する一意の数値のリソース ID が含まれている場合があることに注意してください。このような場合は、リソース名を解析してこれらのリソース ID を抽出し、新しいリソース ID を組み立てると便利です。
個々の ID を解析すると、広告グループ広告の顧客(customers/1234567890)または広告グループ(customers/1234567890/adGroupAds/54321098765)を参照する新しいリソース名を取得できます。
共有オブジェクトの識別子
API のほとんどのオブジェクトは、特定の 1 つの Google 広告クライアントに関連付けられています。ただし、複数のアカウント間で共有できるオブジェクト タイプもあります。実際には、通常は管理者が作成し、多くのクライアント アカウントと共有する除外キーワード リストやアカウント横断コンバージョン アクションなどがこれに該当します。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-28 UTC。"],[[["Google Ads API resource names are hierarchical, reflecting the Google Ads account structure, with most resources being sub-resources of the `Customer` resource."],["Resource names contain unique numerical IDs that identify each object within the hierarchy and can be parsed to derive new resource names."],["Resource names are represented by the `resourceName` field in JSON request/response bodies."],["Shared objects, like negative keyword lists, have resource names relative to the account used to access them, differing between manager and client accounts."]]],["The Google Ads API employs a hierarchical structure for resource names, with most resources being sub-resources of the `Customer`. Resource names are relative, using a format like `customers/1234567890/campaigns/8765432109`. Entities are identified by unique numerical resource IDs, extractable from resource names. Shared objects like conversion actions have different resource names depending on the accessing account, reflecting a relative association. API requests and responses use the `resourceName` field.\n"]]