Criteria

  • Targeting and exclusion of various criteria are supported by the CampaignCriterionService, AdGroupCriterionService, and CustomerNegativeCriterionService.

  • The CampaignCriterionService allows for campaign-level targeting and bid modifiers for various criteria types.

  • The AdGroupCriterionService enables targeting and exclusion at the ad group level for a range of criteria.

  • Negative targeting at the account level is supported by the CustomerNegativeCriterionService for specific criteria types.

Targeting criteria can be set at three different levels:

Not all criteria types can be set at all levels: some, for example, can be set only at the campaign level. Additionally, some criteria can only be used for negative targeting, and some can only be used for positive targeting.

Supported criteria by level

The following table describes the allowed usage of all criterion types:

Type Positive? Negative? Available levels Notes
Ad schedule Yes No
  • Campaign
Age range Yes Yes
  • Campaign
  • Ad group
App payment model Yes No
  • Ad group
Audience Yes No
  • Ad group
Refer to the Demand Gen audience targeting guide.
Brand list Yes Yes
  • Campaign
  • Ad group
At the ad group level, only positive targeting is supported.
Carrier Yes No
  • Campaign
Combined audience Yes No
  • Campaign
  • Ad group
See the combined audiences Help Center article.
Content label No Yes
  • Campaign
  • Customer
Custom affinity Yes No
  • Campaign
  • Ad group
Defined by CustomInterest resources. For audience segments that combine keywords, URLs, and apps, use CustomAudienceInfo; see the custom audiences guide.
Custom audience Yes No
  • Campaign
  • Ad group
Defined by CustomAudience resources. See the custom audiences guide.
Custom intent Yes No
  • Ad group
Defined by CustomInterest resources. For audience segments that combine keywords, URLs, and apps, use CustomAudienceInfo; see the custom audiences guide.
Device Yes No
  • Campaign
Set bid_modifier to 0.0 to opt out of a device type. Use AdGroupBidModifier for ad group-level device bid adjustments; see the bid modifiers guide.
Entity bid Yes No
  • Ad group
In v25 and later, sets an item-level bid (item_code) for a travel entity (such as a hotel, thing to do, or event) in Vertical Ads using the VERTICAL_ADS_ITEM_BID criterion type.
Extended demographic Yes Yes
  • Campaign
  • Ad group
Gender Yes Yes
  • Campaign
  • Ad group
Campaign-level gender exclusions (negative = true) are also supported for Performance Max campaigns. Attempting to target only the UNDETERMINED category in a demographic dimension returns CriterionError.CANNOT_TARGET_ONLY_UNDETERMINED. See Version differences for demographic validation rules in v24 and later.
Income range Yes Yes
  • Campaign
  • Ad group
IP block No Yes
  • Campaign
  • Customer
Keyword Yes Yes
  • Campaign
  • Ad group
At the campaign level, you can only exclude keywords.
Keyword theme Yes Yes
  • Campaign
Language Yes No
  • Campaign
  • Ad group
In v24 and later, attempting to target a disallowed language returns CriterionError.CANNOT_TARGET_LANGUAGE.
Life event Yes Yes
  • Campaign
  • Ad group
Listing group Yes No
  • Ad group
Tree-based structure for Hotel Ads and Shopping campaigns. See the Shopping listing groups guide.
Listing scope Yes No
  • Campaign
Local service ID Yes No
  • Campaign
Represents a service type for Local Services Campaigns. In v24 and later, Local Services service ID signals can also be set on Performance Max asset groups using AssetGroupSignal.local_services_id.
Location Yes Yes
  • Campaign
  • Ad group
See the location targeting guide. In v24 and later, removing all locations from a Local Services Performance Max campaign returns CampaignCriterionError.CANNOT_REMOVE_ALL_LOCATIONS_FROM_LOCAL_SERVICES_PMAX_CAMPAIGN.
Location group Yes No
  • Campaign
Target multiple geographic regions using a distance radius. See the location targeting guide.
Mobile app category Yes Yes
  • Campaign
  • Ad group
  • Customer
Mobile application Yes Yes
  • Campaign
  • Ad group
  • Customer
Mobile device Yes No
  • Campaign
Negative keyword list No Yes
  • Customer
Links an ACCOUNT_LEVEL_NEGATIVE_KEYWORDS shared set to an account (at most one per account).
Operating system version Yes No
  • Campaign
Parental status Yes Yes
  • Campaign
  • Ad group
At the campaign level, only negative targeting is supported.
Placement Yes Yes
  • Campaign
  • Ad group
  • Customer
Managed placements support positive targeting at the campaign and ad group levels, and negative targeting at all levels. Limits on URL length (250 chars) and depth (2 levels); adsenseformobileapps.com is not allowed.
Placement list No Yes
  • Customer
Links a NEGATIVE_PLACEMENTS shared set to an account to exclude placements across campaigns.
Proximity Yes No
  • Campaign
Created using an address or latitude-longitude and a radius. See the location targeting guide.
Retail filter bundle Yes Yes
  • Ad group
In v24 and later (allowlisted accounts only), links a RETAIL_FILTER shared set to an ad group (or to AssetGroupListingGroupFilter in Performance Max campaigns) for dynamic tag-based product filtering.
Topic Yes Yes
  • Campaign
  • Ad group
User interest Yes Yes
  • Campaign
  • Ad group
Verify the availabilities are compatible with the campaign type. Some user interest options are only available for specific campaign types.
User list Yes Yes
  • Campaign
  • Ad group
Use the ID of the user list.
Vertical ads item group rule list Yes Yes
  • Ad group
Links a VERTICAL_ADS_ITEM_GROUP_RULE_LIST shared set to an ad group in Search campaigns with travel feeds (also supported on AssetGroupSignal in Performance Max campaigns in v24 and later for accounts on an allowlist).
Video lineup Yes Yes
  • Campaign
  • Ad group
Specifying an invalid lineup ID returns CampaignCriterionError.INVALID_VIDEO_LINEUP_ID.
Webpage Yes Yes
  • Campaign
  • Ad group
Used to target or exclude specific pages on an advertiser's website based on conditions. Setting a Webpage criterion as negative is used to implement URL exclusions.
Webpage list No Yes
  • Campaign
Links a WEBPAGES shared set to exclude a list of webpages at the campaign level (available to accounts on an allowlist only).
YouTube channel Yes Yes
  • Campaign
  • Ad group
  • Customer
YouTube video Yes Yes
  • Campaign
  • Ad group
  • Customer

Version differences

Several criterion types and validation behaviors differ across supported Google Ads API versions:

  • v25 and later: Supports the EntityBid (entity_bid) criterion on AdGroupCriterion with criterion type VERTICAL_ADS_ITEM_BID to set item-level bids for travel entities in Vertical Ads.
  • v24 and later:
    • Supports RetailFilterBundle (AdGroupCriterion.retail_filter_bundle and AssetGroupListingGroupFilter.Dimension.retail_filter_bundle) and RetailFilter (SharedCriterion.retail_filter) for tag-based product filtering (allowlisted accounts only).
    • Supports the user_rating, venue, and event_participant_display_name rule dimensions on VerticalAdsItemGroupRuleInfo in SharedCriterion.
    • Supports AssetGroupSignal.local_services_id and AssetGroupSignal.vertical_ads_item_group_rule_list (allowlisted) for Performance Max asset group signals.
    • Returns CriterionError.CANNOT_EXCLUDE_ALL_TARGETS when attempting to exclude all targets within a demographic dimension (AgeRangeInfo, GenderInfo, IncomeRangeInfo, or ParentalStatusInfo).
    • Returns CriterionError.CANNOT_TARGET_LANGUAGE when attempting to target a disallowed language.
    • Returns CampaignCriterionError.CANNOT_REMOVE_ALL_LOCATIONS_FROM_LOCAL_SERVICES_PMAX_CAMPAIGN when attempting to remove all locations from a Local Services Performance Max campaign.

Audience info targeting criteria

You can target audiences at the ad group level using AudienceInfo criteria on AdGroupCriterion.audience. Set ad_group_criterion.audience.audience to the resource name of the Audience you want to target. To use AudienceInfo criteria on an AdGroupCriterion, you must set ad_group.audience_setting.use_audience_grouped = true when creating the ad group (this setting is immutable after creation). You can also optionally set campaign.audience_setting.use_audience_grouped = true when creating the campaign to prevent segment and demographic exclusions at the campaign level.

Inspect MutateAudienceResult for audience_id

When creating an audience with AudienceService.MutateAudiences, each operation returns a MutateAudienceResult. You can inspect MutateAudienceResult to obtain the audience_id by parsing the returned resource_name, and you can inspect mutable fields (such as name) on the returned audience object when response_content_type is set to MUTABLE_RESOURCE:

# Inspect MutateAudienceResult to get audience_id.
for result in response.results:
    resource_name = result.resource_name
    # Format: customers/{customer_id}/audiences/{audience_id}
    audience_id = audience_service.parse_audience_path(resource_name)[
        "audience_id"
    ]
    print(f"Created audience '{resource_name}' with ID '{audience_id}'.")

    # Access mutable fields on result.audience when MUTABLE_RESOURCE is requested.
    if result.audience.resource_name:
        print(f"Audience name from mutable resource: {result.audience.name}")