- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- BiddingInfo
- TargetImpressionShareInfo
- AdGroupInfo
- SeedInfo
- BudgetInfo
- AssetGroupInfo
- Try it!
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 |
Required. The ID of the customer generating recommendations. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "recommendationTypes": [ enum ( |
Fields | |
---|---|
recommendationTypes[] |
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 |
Required. Advertising channel type of the campaign. The following advertisingChannelTypes are supported for recommendation generation: PERFORMANCE_MAX and SEARCH |
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[] |
Optional. Current campaign country codes. This field is required for the following recommendationTypes: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH |
languageCodes[] |
Optional. Current campaign language codes. This field is required for the following recommendationTypes: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH |
positiveLocationsIds[] |
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[] |
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[] |
Optional. Current AssetGroup Information. This field is required for the following recommendationTypes: CAMPAIGN_BUDGET |
campaignSitelinkCount |
Optional. Number of sitelinks on the campaign. This field is necessary for the following recommendationTypes: SITELINK_ASSET |
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 |
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 |
Optional. Seed information for Keywords. This field is necessary for the following recommendationTypes: KEYWORD |
budgetInfo |
Optional. Current budget information. This field is optional for the following recommendationTypes: CAMPAIGN_BUDGET |
campaignImageAssetCount |
Optional. Current campaign image asset count. This field is optional for the following recommendationTypes: CAMPAIGN_BUDGET |
campaignCallAssetCount |
Optional. Current campaign call asset count. This field is optional for the following recommendationTypes: CAMPAIGN_BUDGET |
targetPartnerSearchNetwork |
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 |
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 ( |
Fields | |
---|---|
recommendations[] |
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 ( |
Fields | |
---|---|
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 |
Current targetCpa in micros. This can be populated for campaigns with a bidding strategy type of TARGET_CPA or MAXIMIZE_CONVERSIONS. |
targetRoas |
Current targetRoas. This can be populated for campaigns with a bidding strategy type of TARGET_ROAS or MAXIMIZE_CONVERSION_VALUE. |
targetImpressionShareInfo |
Optional. Current Target Impression Share information of the campaign. This field is necessary for the following recommendationTypes: CAMPAIGN_BUDGET |
AdGroupInfo
Current AdGroup Information of the campaign.
JSON representation |
---|
{ "keywords": [ { object ( |
Fields | |
---|---|
keywords[] |
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 |
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[] |
Optional. Keywords or phrases to generate ideas from, for example: cars or "car dealership near me". |
urlSeed |
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 |
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[] |
Optional. Current headlines of the asset group. This field is optional for the following recommendationTypes if assetGroupInfo is set: CAMPAIGN_BUDGET |
description[] |
Optional. Current descriptions of the asset group. This field is optional for the following recommendationTypes if assetGroupInfo is set: CAMPAIGN_BUDGET |
finalUrl |
Required. Current url of the asset group. This field is necessary for the following recommendationTypes if assetGroupInfo is set: CAMPAIGN_BUDGET |