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/v18/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)
    }
  ],
  "countryCodes": [
    string
  ],
  "languageCodes": [
    string
  ],
  "positiveLocationsIds": [
    string
  ],
  "negativeLocationsIds": [
    string
  ],
  "assetGroupInfo": [
    {
      object (AssetGroupInfo)
    }
  ],
  "campaignSitelinkCount": integer,
  "conversionTrackingStatus": enum (ConversionTrackingStatus),
  "biddingInfo": {
    object (BiddingInfo)
  },
  "seedInfo": {
    object (SeedInfo)
  },
  "budgetInfo": {
    object (BudgetInfo)
  },
  "campaignImageAssetCount": integer,
  "campaignCallAssetCount": integer,
  "targetPartnerSearchNetwork": boolean,
  "targetContentNetwork": boolean
}
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: CAMPAIGN_BUDGET, 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 This field is required for the following recommendationTypes: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH

countryCodes[]

string

Optional. Current campaign country codes. This field is required for the following recommendationTypes: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH

languageCodes[]

string

Optional. Current campaign language codes. This field is required for the following recommendationTypes: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH

positiveLocationsIds[]

string (int64 format)

Optional. Current campaign positive location ids. One of this field OR negative_location_ids is required for the following recommendationTypes: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH

negativeLocationsIds[]

string (int64 format)

Optional. Current campaign negative location ids. One of this field OR positive_location_ids is required for the following recommendationTypes: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH

assetGroupInfo[]

object (AssetGroupInfo)

Optional. Current AssetGroup Information. This field is required for the following recommendationTypes: CAMPAIGN_BUDGET

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: CAMPAIGN_BUDGET, 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

budgetInfo

object (BudgetInfo)

Optional. Current budget information. This field is optional for the following recommendationTypes: CAMPAIGN_BUDGET

campaignImageAssetCount

integer

Optional. Current campaign image asset count. This field is optional for the following recommendationTypes: CAMPAIGN_BUDGET

campaignCallAssetCount

integer

Optional. Current campaign call asset count. This field is optional for the following recommendationTypes: CAMPAIGN_BUDGET

targetPartnerSearchNetwork

boolean

Optional. If true, the campaign is opted into serving ads on the Google Partner Network. This field is optional for the following recommendationTypes: CAMPAIGN_BUDGET

targetContentNetwork

boolean

Optional. If true, the campaign is opted into serving ads on specified placements in the Google Display Network. This field is optional for the following recommendationTypes: CAMPAIGN_BUDGET

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,
  "targetImpressionShareInfo": {
    object (TargetImpressionShareInfo)
  }
  // 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: CAMPAIGN_BUDGET, 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.

targetImpressionShareInfo

object (TargetImpressionShareInfo)

Optional. Current Target Impression Share information of the campaign. This field is necessary for the following recommendationTypes: CAMPAIGN_BUDGET

TargetImpressionShareInfo

Current Target Impression Share information of the campaign.

JSON representation
{
  "location": enum (TargetImpressionShareLocation),
  "targetImpressionShareMicros": string,
  "maxCpcBidCeiling": string
}
Fields
location

enum (TargetImpressionShareLocation)

Required. The targeted location on the search results page. This is required for campaigns where the AdvertisingChannelType is SEARCH and the bidding strategy type is TARGET_IMPRESSION_SHARE.

targetImpressionShareMicros

string (int64 format)

Required. The chosen fraction of targeted impression share in micros. For example, 1% equals 10,000. It must be a value between 1 and 1,000,000. This is required for campaigns with an AdvertisingChannelType of SEARCH and a bidding strategy type of TARGET_IMPRESSION_SHARE.

maxCpcBidCeiling

string (int64 format)

Optional. Ceiling of max CPC bids in micros set by automated bidders. This is optional for campaigns with an AdvertisingChannelType of SEARCH and a bidding strategy type of TARGET_IMPRESSION_SHARE.

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 This field is required for the following recommendationTypes: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH

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.

BudgetInfo

Current budget information of the campaign.

JSON representation
{
  "currentBudget": string
}
Fields
currentBudget

string (int64 format)

Required. Current budget amount. This field is necessary for the following recommendationTypes if budgetInfo is set: CAMPAIGN_BUDGET

AssetGroupInfo

Current AssetGroup information of the campaign.

JSON representation
{
  "headline": [
    string
  ],
  "description": [
    string
  ],
  "finalUrl": string
}
Fields
headline[]

string

Optional. Current headlines of the asset group. This field is optional for the following recommendationTypes if assetGroupInfo is set: CAMPAIGN_BUDGET

description[]

string

Optional. Current descriptions of the asset group. This field is optional for the following recommendationTypes if assetGroupInfo is set: CAMPAIGN_BUDGET

finalUrl

string

Required. Current url of the asset group. This field is necessary for the following recommendationTypes if assetGroupInfo is set: CAMPAIGN_BUDGET