Method: customers.generateKeywordHistoricalMetrics

傳回關鍵字歷來指標清單。

擲回錯誤清單:AuthenticationError AuthorizationError CollectionSizeError HeaderError InternalError QuotaError RequestError

HTTP 要求

POST https://googleads.googleapis.com/v18/customers/{customerId}:generateKeywordHistoricalMetrics

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
customerId

string

有推薦內容的客戶 ID。

要求主體

要求主體的資料會採用以下結構:

JSON 表示法
{
  "keywords": [
    string
  ],
  "includeAdultKeywords": boolean,
  "geoTargetConstants": [
    string
  ],
  "keywordPlanNetwork": enum (KeywordPlanNetwork),
  "aggregateMetrics": {
    object (KeywordPlanAggregateMetrics)
  },
  "historicalMetricsOptions": {
    object (HistoricalMetricsOptions)
  },
  "language": string
}
欄位
keywords[]

string

取得歷來指標的關鍵字清單。由於近似重複資料會傳回,因此並非所有輸入內容都會傳回。舉例來說,如果要求「car」和「cars」的統計資料,系統只會傳回「car」。最多可使用 10,000 個關鍵字。

includeAdultKeywords

boolean

如果為 true,回應中就會包含成人關鍵字。預設值為否。

geoTargetConstants[]

string

要指定的位置資源名稱。上限為 10。您可以使用空白清單指定所有指定地理區域。

keywordPlanNetwork

enum (KeywordPlanNetwork)

指定聯播網。如未設定,系統會使用 Google 搜尋和合作夥伴聯播網。

aggregateMetrics

object (KeywordPlanAggregateMetrics)

回應中要納入的匯總欄位。

historicalMetricsOptions

object (HistoricalMetricsOptions)

歷來指標資料的選項。

language

string

要指定的語言資源名稱。每個關鍵字都屬於某些語言組合;如果語言是關鍵字的其中一種語言,就會納入關鍵字。如未設定,系統會納入所有關鍵字。

回應主體

KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics 的回應訊息。

如果成功,回應主體會含有以下結構的資料:

JSON 表示法
{
  "results": [
    {
      object (GenerateKeywordHistoricalMetricsResult)
    }
  ],
  "aggregateMetricResults": {
    object (KeywordPlanAggregateMetricResults)
  }
}
欄位
results[]

object (GenerateKeywordHistoricalMetricsResult)

關鍵字和歷來指標的清單。

aggregateMetricResults

object (KeywordPlanAggregateMetricResults)

所有關鍵字的匯總指標。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/adwords

詳情請參閱 OAuth 2.0 Overview

GenerateKeywordHistoricalMetricsResult

生成關鍵字歷來指標的結果。

JSON 表示法
{
  "closeVariants": [
    string
  ],
  "keywordMetrics": {
    object (KeywordPlanHistoricalMetrics)
  },
  "text": string
}
欄位
closeVariants[]

string

要求的關鍵字近似變體清單,其統計資料會合併至這個 GenerateKeywordHistoricalMetricsResult。

keywordMetrics

object (KeywordPlanHistoricalMetrics)

文字和相近變體的歷來指標

text

string

與一或多個關鍵字相關聯的查詢文字。請注意,我們會先移除關鍵字清單中的重複項目 (即近似變體),再將關鍵字以文字格式傳回。舉例來說,如果原始要求含有「car」和「cars」這兩個關鍵字,則傳回的搜尋查詢只會包含「cars」。已去除重複項目的查詢清單會列入 closeVariants 欄位。