- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- GenerateKeywordHistoricalMetricsResult
- Try it!
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/v18/customers/{customerId}:generateKeywordHistoricalMetrics
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
customer |
The ID of the customer with the recommendation. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "keywords": [ string ], "includeAdultKeywords": boolean, "geoTargetConstants": [ string ], "keywordPlanNetwork": enum ( |
Fields | |
---|---|
keywords[] |
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. |
include |
If true, adult keywords will be included in response. The default value is false. |
geo |
The resource names of the location to target. Maximum is 10. An empty list MAY be used to specify all targeting geos. |
keyword |
Targeting network. If not set, Google Search And Partners Network will be used. |
aggregate |
The aggregate fields to include in response. |
historical |
The options for historical metrics data. |
language |
The resource name of the language to target. Each keyword belongs to some set of languages; a keyword is included if language is one of its languages. If not set, all keywords will be included. |
Response body
Response message for KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "results": [ { object ( |
Fields | |
---|---|
results[] |
List of keywords and their historical metrics. |
aggregate |
The aggregate metrics for all keywords. |
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 ( |
Fields | |
---|---|
close |
The list of close variants from the requested keywords whose stats are combined into this GenerateKeywordHistoricalMetricsResult. |
keyword |
The historical metrics for text and its close variants |
text |
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. |