- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- BiddingInfo
- AdGroupInfo
- SeedInfo
- 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/v16/customers/{customerId}/recommendations:generate
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
customer |
Required. The ID of the customer generating recommendations. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "recommendationTypes": [ enum ( |
Fields | |
---|---|
recommendation |
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 |
advertising |
Required. Advertising channel type of the campaign. The following advertisingChannelTypes are supported for recommendation generation: PERFORMANCE_MAX and SEARCH |
ad |
Optional. Current AdGroup Information. Supports information from a single AdGroup. This field is optional for the following recommendationTypes: KEYWORD |
campaign |
Optional. Number of sitelinks on the campaign. This field is necessary for the following recommendationTypes: SITELINK_ASSET |
conversion |
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 |
bidding |
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 |
seed |
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 ( |
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 | |
---|---|
bidding |
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: |
|
target |
Current targetCpa in micros. This can be populated for campaigns with a bidding strategy type of TARGET_CPA or MAXIMIZE_CONVERSIONS. |
target |
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 ( |
Fields | |
---|---|
keywords[] |
Optional. Current keywords. This field is optional for the following recommendationTypes if adGroupInfo is set: KEYWORD |
ad |
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 | |
---|---|
keyword |
Optional. Keywords or phrases to generate ideas from, for example: cars or "car dealership near me". |
url |
A specific url to generate ideas from, for example: www.example.com/cars. |