REST Resource: advertisers.adGroups

  • An AdGroup is a single ad group associated with a line item, identified by unique IDs for the ad group, advertiser, and line item, and includes a display name and format.

  • AdGroupFormat defines various formats for the ads within an ad group, such as in-stream, video discovery, bumper, non-skippable in-stream, audio, responsive, reach, and masthead.

  • ProductFeedData details how products are selected for an ad group, allowing matching based on all products, specific products, or custom labels, and indicates if the feed is disabled.

  • ProductMatchDimension specifies the criteria for matching products, which can be by product offer ID or by a custom label with a defined key and value.

  • CustomLabel consists of a key and value used to categorize products, with available keys ranging from CUSTOM_LABEL_KEY_0 to CUSTOM_LABEL_KEY_4.

Resource: AdGroup

A single ad group associated with a line item.

JSON representation
{
  "name": string,
  "advertiserId": string,
  "adGroupId": string,
  "lineItemId": string,
  "displayName": string,
  "adGroupFormat": enum (AdGroupFormat),
  "bidStrategy": {
    object (BiddingStrategy)
  },
  "entityStatus": enum (EntityStatus),
  "targetingExpansion": {
    object (TargetingExpansionConfig)
  },
  "productFeedData": {
    object (ProductFeedData)
  },
  "adGroupInventoryControl": {
    object (AdGroupInventoryControl)
  }
}
Fields
name

string

Output only. Identifier. The resource name of the ad group.

advertiserId

string (int64 format)

Output only. The unique ID of the advertiser the ad group belongs to.

adGroupId

string (int64 format)

Output only. The unique ID of the ad group. Assigned by the system.

lineItemId

string (int64 format)

Required. Immutable. The unique ID of the line item that the ad group belongs to.

displayName

string

Required. The display name of the ad group.

Must be UTF-8 encoded with a maximum size of 255 bytes.

adGroupFormat

enum (AdGroupFormat)

Required. Immutable. The format of the ads in the ad group.

bidStrategy

object (BiddingStrategy)

Optional. The bidding strategy used by the ad group. Only the youtubeAndPartnersBid and demandGenBid field can be used in the bidding strategy.

entityStatus

enum (EntityStatus)

Required. Controls whether or not the ad group can spend its budget and bid on inventory.

If the ad group's parent line item is not active, the ad group can't spend its budget even if its own status is ENTITY_STATUS_ACTIVE.

targetingExpansion

object (TargetingExpansionConfig)

Optional. The optimized targeting settings of the ad group.

productFeedData

object (ProductFeedData)

Optional. The settings of the product feed in this ad group.

adGroupInventoryControl

object (AdGroupInventoryControl)

Optional. Required for Demand Gen ad groups. Specifies the inventory control of the ad group.

AdGroupFormat

The format of the ad group.

Enums
AD_GROUP_FORMAT_UNSPECIFIED Format value is not specified or is unknown in this version.
AD_GROUP_FORMAT_IN_STREAM In-stream ads.
AD_GROUP_FORMAT_VIDEO_DISCOVERY In-feed ads.
AD_GROUP_FORMAT_BUMPER Bumper ads.
AD_GROUP_FORMAT_NON_SKIPPABLE_IN_STREAM Non-skippable in-stream ads.
AD_GROUP_FORMAT_AUDIO Non-skippable in-stream audio ads.
AD_GROUP_FORMAT_RESPONSIVE Responsive ads.
AD_GROUP_FORMAT_REACH Effective reach ad groups, including in-stream and bumper ads.
AD_GROUP_FORMAT_MASTHEAD Masthead Ad that is surfaced on the top slot on the YouTube homepage.
AD_GROUP_FORMAT_DEMAND_GEN

Demand Gen ads.

ProductFeedData

The details of product feed.

JSON representation
{
  "productMatchType": enum (ProductMatchType),
  "productMatchDimensions": [
    {
      object (ProductMatchDimension)
    }
  ],
  "isFeedDisabled": boolean
}
Fields
productMatchType

enum (ProductMatchType)

How products are selected by the product feed.

productMatchDimensions[]

object (ProductMatchDimension)

A list of dimensions used to match products.

isFeedDisabled

boolean

Whether the product feed has opted-out of showing products.

ProductMatchType

The types of the ways to match products.

Enums
PRODUCT_MATCH_TYPE_UNSPECIFIED Not specified or unknown.
PRODUCT_MATCH_TYPE_ALL_PRODUCTS All the products are matched.
PRODUCT_MATCH_TYPE_SPECIFIC_PRODUCTS Specific products are selected.
PRODUCT_MATCH_TYPE_CUSTOM_LABEL Match products by their custom labels.

ProductMatchDimension

A dimension used to match products.

JSON representation
{

  // Union field dimension can be only one of the following:
  "productOfferId": string,
  "customLabel": {
    object (CustomLabel)
  }
  // End of list of possible types for union field dimension.
}
Fields
Union field dimension. The dimension and value on which to match the product. dimension can be only one of the following:
productOfferId

string

The ID of the product offer to match with a product with the same offer ID.

customLabel

object (CustomLabel)

The custom label to match all the products with the label.

CustomLabel

The key and value of a custom label.

JSON representation
{
  "key": enum (CustomLabelKey),
  "value": string
}
Fields
key

enum (CustomLabelKey)

The key of the label.

value

string

The value of the label.

CustomLabelKey

The key of the custom label

Enums
CUSTOM_LABEL_KEY_UNSPECIFIED Not specified or unknown.
CUSTOM_LABEL_KEY_0 Key index 0.
CUSTOM_LABEL_KEY_1 Key index 1.
CUSTOM_LABEL_KEY_2 Key index 2.
CUSTOM_LABEL_KEY_3 Key index 3.
CUSTOM_LABEL_KEY_4 Key index 4.

AdGroupInventoryControl

The inventory control of the ad group.

JSON representation
{

  // Union field inventory_controls can be only one of the following:
  "adGroupInventoryStrategy": enum (AdGroupInventoryStrategy),
  "selectedInventories": {
    object (SelectedInventories)
  }
  // End of list of possible types for union field inventory_controls.
}
Fields
Union field inventory_controls. The inventory control of the ad group. inventory_controls can be only one of the following:
adGroupInventoryStrategy

enum (AdGroupInventoryStrategy)

The inventory strategy.

selectedInventories

object (SelectedInventories)

The selected inventories.

AdGroupInventoryStrategy

The inventory strategy for the ad group.

Enums
AD_GROUP_INVENTORY_STRATEGY_UNSPECIFIED Not specified or unknown.
AD_GROUP_INVENTORY_STRATEGY_ALL_GOOGLE_AND_DISPLAY_NETWORK_INVENTORY The ad group is opted-in to all Google and Display Network inventory.
AD_GROUP_INVENTORY_STRATEGY_ALL_GOOGLE_INVENTORY The ad group is opted-in to all Google inventory.

SelectedInventories

The inventory control of the ad group.

JSON representation
{
  "allowYoutubeStream": boolean,
  "allowYoutubeShorts": boolean,
  "allowYoutubeFeed": boolean,
  "allowDiscover": boolean,
  "allowGmail": boolean,
  "allowGoogleDisplayNetwork": boolean
}
Fields
allowYoutubeStream

boolean

Whether the ad group is opted-in to YouTube in-stream inventory.

allowYoutubeShorts

boolean

Whether the ad group is opted-in to YouTube shorts inventory.

allowYoutubeFeed

boolean

Whether the ad group is opted-in to YouTube in-feed inventory.

allowDiscover

boolean

Whether the ad group is opted-in to Discover inventory.

allowGmail

boolean

Whether the ad group is opted-in to Gmail inventory.

allowGoogleDisplayNetwork

boolean

Whether the ad group is opted-in to Google Display Network inventory.

Methods

bulkEditAssignedTargetingOptions

Bulk edits targeting options for multiple ad groups.

bulkListAssignedTargetingOptions

Lists assigned targeting options for multiple ad groups across targeting types.

create

Creates a new ad group.

delete

Deletes a AdGroup.

get

Gets an ad group.

list

Lists ad groups.

patch

Updates an existing ad group.