Criteria

The CampaignCriterionService, AdGroupCriterionService, and CustomerNegativeCriterionService support targeting or excluding various types of criteria.

Campaign criteria

The CampaignCriterionService lets you specify targeting at the campaign level for the following types. You can also specify bid modifiers at this level using a multiplier, but you cannot set absolute bids.

AdScheduleInfo

By default a new campaign will contain no ad schedules, meaning that ads will run for all time periods. You can set up an ad schedule, down to a quarter of an hour, to determine more precisely when to run your ads.

You can only target ad schedules. Exclusion is not supported.

AgeRangeInfo

By default a new campaign will contain no age range criteria, which means that all ages are included.

BrandInfo

By default a new campaign will contain no brand criteria, meaning that no brand will be explicitly targeted or excluded.

CarrierInfo

By default a new campaign will contain no content carrier criteria, which means all carriers are included. Only positive criteria are supported at the campaign level.

CombinedAudienceInfo

Any number of Audience criteria can be combined in a combined audience. By default new campaigns do not contain any combined audiences. For more details see the Help Center article about combined audiences.

ContentLabelInfo

By default a new campaign will contain no content label criteria, which means all categories are included. Only negative criteria are supported at the campaign level.

CustomAffinityInfo

By default a new campaign will contain no custom affinity criteria. Custom affinity criteria are defined by CustomInterest resources that must be created by the user. Only positive criteria are supported. This article contains more details about how custom affinity criteria work and how to use them.

DeviceInfo

Define DeviceInfo criteria using one of the predefined Device enums. The main use case for device targeting is to adjust bids for a specific device using the bid_modifier value of CampaignCriterion.

You can only target devices. Exclusion is not supported.

GenderInfo

By default a new campaign will contain no gender criteria, which means that all genders are included. Only negative criteria are supported at the campaign level.

IncomeRangeInfo

By default a new campaign will contain no income range criteria, which means that all incomes are included. Only negative criteria are supported at the campaign level.

IpBlockInfo

By default a new campaign will not contain IP blocking criteria, which means everything is included.

KeywordInfo

Keywords are created using free-form text and one of the match type enum values.

You can only exclude keywords at the campaign level, so you must specify negative = true on a keyword's CampaignCriterion.

LanguageInfo

By default a new campaign will not contain language criteria, which means all languages are included. Only positive criteria are supported.

ListingScopeInfo

By default a new campaign will not contain listing scope criteria. Only positive criteria are supported.

LocationInfo

Named location targeting is implemented as LocationInfo and are created using a fixed set of criteria IDs. The available IDs are listed in the documentation and can be individually searched for using the GeoTargetConstantService. These criteria can be configured as either positive or negative, with negative targets overriding positive ones. By default a new campaign will contain no location criteria, which means that all locations are targeted.

Learn more about Named location targeting.

LocationGroupInfo

A LocationGroup lets campaigns target multiple geographic regions. These regions are defined by a set of locations and a distance radius around each location in either meters or miles. The targeting of these locations can be filtered using a list of geotargeting criteria IDs.

Learn more about targeting multiple geographic regions.

MobileAppCategoryInfo

By default a new campaign will not contain mobile app category criteria, which means all categories are included. Only negative criteria at the campaign level are supported.

MobileApplicationInfo

By default a new ad group will not contain mobile app criteria. Individual mobile apps must be identified according to the value of the app_id field.

MobileDeviceInfo

By default a new campaign will not contain mobile device criteria, which means that all devices are included.

To specify an individual mobile device you must use the resource name of a MobileDeviceConstant to set the device field on campaign criteria.

You can only target mobile devices. Exclusion is not supported.

OperatingSystemVersionInfo

By default a new campaign will contain no operating system version criteria, which means that all operating systems are targeted. Only positive criteria are supported at the campaign level.

ParentalStatusInfo

By default a new campaign will contain no parental status criteria, which means that all parental status categories are included. Only negative criteria are supported at the campaign level.

PlacementInfo

These are created using a customer URL. There are limits on the length (250 characters) and depth (2 levels) of the URLs used. They can only be configured as negative, and by default a new campaign will not contain placement criteria. Negative placements with a URL of exactly adsenseformobileapps.com are not allowed.

ProximityInfo

Radius targets are implemented as ProximityInfo criteria. They can be created using either an address or latitude-longitude, and by specifying a radius. They can only be configured as positive, and by default a new campaign will not contain proximity criteria.

Learn more about Radius targeting.

TopicInfo

By default a new campaign will not contain topic criteria. Only negative criteria are supported at the campaign level.

UserInterestInfo

By default a new campaign will not contain user interest criteria. Only negative criteria are supported at the campaign level.

When retrieving UserInterest to set in UserInterestInfo, verify the availabilities[] are compatible with the campaign type. Some UserInterest options are only available for specific campaign types.

UserListInfo

By default a new campaign will not contain user lists criteria. Use the ID of the user list to identify the user list in the criterion. Positive and negative criteria are supported at the campaign level.

WebpageInfo

By default a new campaign will not contain web page criteria, which means all webpages are included. Only negative criteria at the campaign level are supported.

YouTubeChannelInfo

By default a new campaign will not contain YouTube channel criteria. Only negative criteria are supported at the campaign level.

YouTubeVideoInfo

By default a new campaign will not contain YouTube video criteria. Only negative criteria are supported at the campaign level.

Ad group criteria

The AdGroupCriterionService lets you specify targeting at the ad group level for the following types.

AgeRangeInfo
By default a new campaign will contain no age range criteria, which means that all ages are included. At the ad group level, you can bid on or exclude age ranges.
AppPaymentModelInfo
At the ad group level, you can only target app payment model criteria.
CombinedAudienceInfo
Any number of Audience criteria can be combined in a combined audience. By default new ad groups do not contain any combined audiences. For more details see the Help Center article about combined audiences.
CustomAffinityInfo
By default a new ad group will contain no custom affinity criteria. Custom affinity criteria are defined by CustomInterest resources that must be created by the user. Only positive criteria are supported.This article contains more details about how custom affinity criteria work and how to use them.
CustomIntentInfo
By default a new campaign will not contain custom intent criteria. Custom intent criteria are defined by CustomInterest resources that must be created by the user. Only positive criteria are supported. This article contains more information about how custom intent criteria work and how to use them.
GenderInfo
By default a new campaign will contain no gender criteria, which means that all genders are included. Only negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude genders.
IncomeRangeInfo
By default a new campaign will contain no income range criteria, which means that all incomes are included. Only negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude income ranges.
KeywordInfo
At the ad group level, you can either target or exclude keywords.
ListingGroupInfo
Listing groups define a tree-based structure of criteria for Hotel Ads and Shopping campaigns.
MobileAppCategoryInfo
At the ad group level, you can either target or exclude mobile app category criteria.
MobileApplicationInfo
By default a new ad group will not contain mobile app criteria. Individual mobile apps must be identified according to the value of the app_id field.
ParentalStatusInfo
By default a new campaign will contain no parental status criteria, which means that all parental status categories are included. Only negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude parental status categories.
PlacementInfo
These are created using a customer URL. There are limits on the length (250 characters) and depth (2 levels) of the URLs used. They can only be configured as negative, and by default a new campaign will not contain placement criteria. Negative placements with a URL of exactly adsenseformobileapps.com are not allowed.
TopicInfo
By default a new campaign will not contain topic criteria. Only negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude income ranges.
UserInterestInfo

By default a new campaign will not contain user interest criteria. Only negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude user interests.

When retrieving UserInterest to set in UserInterestInfo, verify the availabilities[] are compatible with the campaign type. Some UserInterest options are only available for specific campaign types.

UserListInfo

By default a new campaign will not contain user lists criteria. Use the ID of the user list to identify the user list in the criterion. Positive and negative criteria are supported at the campaign level. At the ad group level, you can bid on or exclude user lists.

WebpageInfo

At the ad group level, you can either target or exclude web page criteria.

YouTubeChannelInfo

At the ad group level, you can either target or exclude YouTube channel criteria.

YouTubeVideoInfo

At the ad group level, you can either target or exclude YouTube video criteria.

Customer criteria

The CustomerNegativeCriterionService lets you specify negative targeting at the account level for the following types.

MobileAppCategoryInfo
Exclude a mobile app category in the MobileAppCategoryConstant list.
MobileApplicationInfo
Exclude individual mobile apps according to the value of the app_id field.
NegativeKeywordList
Exclude a SharedSet of keywords. Only one negative keyword list criterion can be attached per account.
PlacementInfo
These are created using a customer URL. There are limits on the length (250 characters) and depth (2 levels) of the URLs used. Negative placements with a URL of exactly adsenseformobileapps.com are not allowed.
YouTubeChannelInfo
Exclude a YouTube channel by its channel ID or channel code.
YouTubeVideoInfo
Exclude a specific YouTube video by its video ID as it appears on the YouTube watch page.