[[["容易理解","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-08-29 (世界標準時間)。"],[[["\u003cp\u003eThe Search Ads 360 Reporting API can be accessed using client libraries (preferred) or REST.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries utilize protocol buffers and HTTP/2, while REST uses JSON and HTTP 1.1.\u003c/p\u003e\n"],["\u003cp\u003eResource names identify API objects and act as URLs in REST.\u003c/p\u003e\n"],["\u003cp\u003eComposite IDs are used for objects without globally unique IDs, combining parent and object IDs.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires an OAuth2 access token, and the \u003ccode\u003elogin-customer-id\u003c/code\u003e header is recommended for manager accounts accessing sub-manager or client accounts.\u003c/p\u003e\n"]]],["The Search Ads 360 Reporting API can be accessed via client libraries (preferred) using protocol buffers and HTTP/2, or via REST with JSON and HTTP 1.1. Objects are identified by resource names, with composite IDs used for non-globally unique objects. Requests require an OAuth2 access token in the Authorization header, and a `login-customer-id` header when using a manager account. Each response includes a unique `request-id` header.\n"],null,["# Search Ads 360 Reporting API call structure\n\nCalls to the Search Ads 360 Reporting API are typically made through your\n[client library](/search-ads/reporting/client-libraries/client-libraries). See\n[Client libraries explained](https://cloud.google.com/apis/docs/client-libraries-explained) for more\ninformation. However, knowledge about the structure of the underlying request\ndetails can be useful when testing and debugging.\n\nSearch Ads 360 Reporting API is a [gRPC API](//grpc.io/docs/guides/) with REST\nbindings. This means that you can make calls to the API in two alternative ways:\n\nPreferred method\n: Use a [client library](/search-ads/reporting/client-libraries/client-libraries):\n\n - Create the body of the request as a [protocol buffer](/protocol-buffers).\n - Send the request to the server using [HTTP/2](//http2.github.io/).\n - Deserialize the response to a protocol buffer.\n - Interpret the results.\n\nOptional alternative method\n: Use [REST](/search-ads/reporting/api/reference/rest):\n\n - Create the body of request as a [JSON](//www.json.org/) object.\n - Send the request to the server using HTTP 1.1.\n - Deserialize the response as a JSON object.\n - Interpret the results.\n\nSee [Google Cloud APIs](https://cloud.google.com/apis/docs/overview) for more\ninformation.\n\nThe following sections apply to both gRPC and REST protocols.\n\nResource names\n--------------\n\nMost objects in the API are identified by their resource name strings. These\nstrings also serve as URLs when using the REST interface.\n\nSee [Reference \\\u003e REST](/search-ads/reporting/api/reference/rest) for more\ninformation about supported resources and their path representation.\nThe same format is used for other services.\n\nComposite IDs\n-------------\n\nIf the ID of an object is not [globally unique](/search-ads/reporting/concepts/api-structure#object_ids), a composite ID for\nthat object is constructed by prepending its parent ID and a tilde (\\~).\n\nFor example, because an ad group ad ID is not globally unique, the parent object\n(ad group) ID is prepended to it resulting in a unique composite ID.\n\nExample: `AdGroupId` of **`123`** + `~` + `AdGroupAdId` of **`45678`**\n= composite ad group ad ID of **`123~45678`**.\n\nRequest headers\n---------------\n\nThe HTTP headers (or [gRPC metadata](//grpc.io/docs/what-is-grpc/core-concepts/#metadata)) in the following sections\nshould be included in the body of the request.\n\n### Authorization\n\nYou need to include an OAuth2 access token in the form: \n\n```actionscript-3\nAuthorization: Bearer [OAUTH_2.0_ACCESS_TOKEN]\n```\n\nThe token should identify either a manager account acting on behalf of a\nclient or an advertiser directly managing their own sub-manager or client\naccount. See [About Search Ads 360 manager accounts](https://support.google.com/sa360/answer/9158072) and [Authentication](//cloud.google.com/docs/authentication) to learn more.\n\n### Login customer ID header\n\nThe [`login-customer-id`](/search-ads/reporting/concepts/login-customer-id) header is required when using a manager account to\naccess a sub-manager or client account. It is not required when accessing a\nsub-manager or client account directly. Although not strictly necessary, we\nrecommend always specifying the [`login-customer-id`](/search-ads/reporting/concepts/login-customer-id) for authenticated users who\nhave access to more than one account. This avoids ambiguity and prevents\nunintentionally setting the context to the incorrect account.\n\nThe request should include the customer ID of the authorized user, without\nhyphens (`-`), for example: \n\n```scdoc\nhttps://searchads360.googleapis.com/VERSION_NUMBER/customers/CUSTOMER_ID/campaignBudgets\n```\n\nSetting the `login-customer-id` is equivalent to choosing an account in the\nSearch Ads 360 UI after signing in or clicking on your profile image at the top\nright.\n\nResponse headers\n----------------\n\nThe following headers (or\n[gRPC trailing-metadata](//grpc.io/docs/what-is-grpc/core-concepts/#metadata))\nare returned with the response body. We recommend that you log these values for\ndebugging purposes.\n\n### Request ID\n\nThe `request-id` header is a string that uniquely identifies the request."]]