Method: customers.recommendations.generate

Generates Recommendations based off the requested recommendationTypes.

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

HTTP request

POST https://googleads.googleapis.com/v17/customers/{customerId}/recommendations:generate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
customerId

string

Required. The ID of the customer generating recommendations.

Request body

The request body contains data with the following structure:

JSON representation
{
  "recommendationTypes": [
    enum (RecommendationType)
  ],
  "advertisingChannelType": enum (AdvertisingChannelType),
  "adGroupInfo": [
    {
      object (AdGroupInfo)
    }
  ],
  "campaignSitelinkCount": integer,
  "conversionTrackingStatus": enum (ConversionTrackingStatus),
  "biddingInfo": {
    object (BiddingInfo)
  },
  "seedInfo": {
    object (SeedInfo)
  }
}
Fields
recommendationTypes[]

enum (RecommendationType)

Required. List of eligible recommendationTypes to generate. If the uploaded criteria isn't sufficient to make a recommendation, or the campaign is already in the recommended state, no recommendation will be returned for that type. Generally, a recommendation is returned if all required fields for that recommendationType are uploaded, but there are cases where this is still not sufficient.

The following recommendationTypes are supported for recommendation generation: KEYWORD, MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN, MAXIMIZE_CONVERSION_VALUE_OPT_IN, SET_TARGET_CPA, SET_TARGET_ROAS, SITELINK_ASSET, TARGET_CPA_OPT_IN, TARGET_ROAS_OPT_IN

advertisingChannelType

enum (AdvertisingChannelType)

Required. Advertising channel type of the campaign. The following advertisingChannelTypes are supported for recommendation generation: PERFORMANCE_MAX and SEARCH

adGroupInfo[]

object (AdGroupInfo)

Optional. Current AdGroup Information. Supports information from a single AdGroup. This field is optional for the following recommendationTypes: KEYWORD

conversionTrackingStatus

enum (ConversionTrackingStatus)

Optional. Current conversion tracking status. This field is necessary for the following recommendationTypes: MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN, MAXIMIZE_CONVERSION_VALUE_OPT_IN, SET_TARGET_CPA, SET_TARGET_ROAS, TARGET_CPA_OPT_IN, TARGET_ROAS_OPT_IN

biddingInfo

object (BiddingInfo)

Optional. Current bidding information of the campaign. This field is necessary for the following recommendationTypes: MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN, MAXIMIZE_CONVERSION_VALUE_OPT_IN, SET_TARGET_CPA, SET_TARGET_ROAS, TARGET_CPA_OPT_IN, TARGET_ROAS_OPT_IN

seedInfo

object (SeedInfo)

Optional. Seed information for Keywords. This field is necessary for the following recommendationTypes: KEYWORD

Response body

Response message for RecommendationService.GenerateRecommendations.

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

JSON representation
{
  "recommendations": [
    {
      object (Recommendation)
    }
  ]
}
Fields
recommendations[]

object (Recommendation)

List of generated recommendations from the passed in set of requested recommendationTypes. If there isn't sufficient data to generate a recommendation for the requested recommendationTypes, the result set won't contain a recommendation for that type.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

BiddingInfo

Current bidding information of the campaign. Provides a wrapper for bidding-related signals that inform recommendations.

JSON representation
{
  "biddingStrategyType": enum (BiddingStrategyType),

  // Union field bidding_strategy_target_info can be only one of the following:
  "targetCpaMicros": string,
  "targetRoas": number
  // End of list of possible types for union field bidding_strategy_target_info.
}
Fields
biddingStrategyType

enum (BiddingStrategyType)

Current bidding strategy. This field is necessary for the following recommendationTypes: MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN, MAXIMIZE_CONVERSION_VALUE_OPT_IN, SET_TARGET_CPA, SET_TARGET_ROAS, TARGET_CPA_OPT_IN, TARGET_ROAS_OPT_IN

Union field bidding_strategy_target_info. Optional details related to the bidding_strategy_type. bidding_strategy_target_info can be only one of the following:
targetCpaMicros

string (int64 format)

Current targetCpa in micros. This can be populated for campaigns with a bidding strategy type of TARGET_CPA or MAXIMIZE_CONVERSIONS.

targetRoas

number

Current targetRoas. This can be populated for campaigns with a bidding strategy type of TARGET_ROAS or MAXIMIZE_CONVERSION_VALUE.

AdGroupInfo

Current AdGroup Information of the campaign.

JSON representation
{
  "keywords": [
    {
      object (KeywordInfo)
    }
  ],
  "adGroupType": enum (AdGroupType)
}
Fields
keywords[]

object (KeywordInfo)

Optional. Current keywords. This field is optional for the following recommendationTypes if adGroupInfo is set: KEYWORD

adGroupType

enum (AdGroupType)

Optional. AdGroup Type of the AdGroup. This field is necessary for the following recommendationTypes if adGroupInfo is set: KEYWORD

SeedInfo

A keyword seed and a specific url to generate keywords from.

JSON representation
{
  "keywordSeeds": [
    string
  ],
  "urlSeed": string
}
Fields
keywordSeeds[]

string

Optional. Keywords or phrases to generate ideas from, for example: cars or "car dealership near me".

urlSeed

string

A specific url to generate ideas from, for example: www.example.com/cars.