Caution: You are viewing documentation for the API's REST interface. Most of our official client libraries use gRPC. See the REST Introduction for details.

Method: customers.generateKeywordHistoricalMetrics

Stay organized with collections Save and categorize content based on your preferences.

Returns a list of keyword historical metrics.

List of thrown errors: AuthenticationError AuthorizationError CollectionSizeError HeaderError InternalError QuotaError RequestError

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
customerId

string

The ID of the customer with the recommendation.

Request body

The request body contains data with the following structure:

JSON representation
{
  "keywords": [
    string
  ],
  "historicalMetricsOptions": {
    object (HistoricalMetricsOptions)
  }
}
Fields
keywords[]

string

A list of keywords to get historical metrics. Not all inputs will be returned as a result of near-exact deduplication. For example, if stats for "car" and "cars" are requested, only "car" will be returned. A maximum of 10,000 keywords can be used.

historicalMetricsOptions

object (HistoricalMetricsOptions)

The options for historical metrics data.

Response body

If successful, the response body contains data with the following structure:

Response message for KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics.

JSON representation
{
  "results": [
    {
      object (GenerateKeywordHistoricalMetricsResult)
    }
  ]
}
Fields
results[]

object (GenerateKeywordHistoricalMetricsResult)

List of keywords and their historical metrics.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

GenerateKeywordHistoricalMetricsResult

The result of generating keyword historical metrics.

JSON representation
{
  "closeVariants": [
    string
  ],
  "keywordMetrics": {
    object (KeywordPlanHistoricalMetrics)
  },
  "text": string
}
Fields
closeVariants[]

string

The list of close variants from the requested keywords whose stats are combined into this GenerateKeywordHistoricalMetricsResult.

keywordMetrics

object (KeywordPlanHistoricalMetrics)

The historical metrics for text and its close variants

text

string

The text of the query associated with one or more keywords. Note that we de-dupe your keywords list, eliminating close variants before returning the keywords as text. For example, if your request originally contained the keywords "car" and "cars", the returned search query will only contain "cars". The list of de-duped queries will be included in closeVariants field.