您可以使用 gRPC 或 REST 呼叫 Google Ads API。這兩個介面都會公開與其他 Google Cloud API 共用的資源導向設計。
建議您盡可能使用 Google 官方的用戶端程式庫。這些程式碼會以各種支援語言提供符合類型、安全無虞的安全程式碼,並處理許多與 API 之間的低階詳細資料 (例如逾時設定、結果集 pagination 和驗證)。我們的用戶端程式庫還包含一系列程式碼範例和公用程式,可協助處理一般工作,例如建構資源名稱和處理欄位遮罩。
本指南提供 REST 專屬的詳細資訊,並說明必須直接呼叫的 REST 介面,而不使用 Google 支援的用戶端程式庫。如果您要編寫自己的自訂程式碼以直接使用 REST,或使用第三方 HTTP 用戶端程式庫,本指南可能很有幫助。
[[["容易理解","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-09-10 (世界標準時間)。"],[],["The Google Ads API utilizes gRPC or REST interfaces, sharing a resource-oriented design. Using Google's client libraries is highly recommended for type-safe code, handling communication details like timeouts, pagination, and authentication. The official client libraries use gRPC, except for the Perl library, which uses REST. This guide details using REST directly without client libraries, useful for custom code or third-party HTTP clients. It focuses on information outside of what the official client libraries cover.\n"],null,[]]