AdsApp.ExcludedAudience
Stay organized with collections
Save and categorize content based on your preferences.
Represents a Google Ads excluded audience.
Methods:
getAdGroup()
Returns the ad group to which this excluded audience belongs.
Return values:
Type | Description |
AdsApp.AdGroup |
The ad group to which this excluded audience belongs. |
getAudienceId()
Returns the audience ID of the excluded audience.
Return values:
Type | Description |
String |
The audience ID of the excluded audience. |
getAudienceType()
Returns the type of the excluded audience, either
USER_INTEREST
or
USER_LIST
.
Return values:
Type | Description |
String |
The type of the excluded audience. |
getBaseAdGroup()
Returns the base ad group to which this excluded audience belongs.
Return values:
Type | Description |
AdsApp.AdGroup |
The base ad group to which this excluded audience belongs. |
getBaseCampaign()
Returns the base campaign to which this excluded audience belongs.
Return values:
Type | Description |
AdsApp.Campaign |
The base campaign to which this excluded audience belongs. |
getCampaign()
Returns the campaign to which this excluded audience belongs or
null
if it does not belong to a search or display campaign.
Return values:
Type | Description |
AdsApp.Campaign |
The campaign to which this excluded audience belongs or
null if it does
not belong to a search or display campaign. |
getId()
Returns the ID of the excluded audience.
Return values:
Type | Description |
String |
The ID of the excluded audience. |
getResourceName()
Returns the resource name of the excluded audience.
Return values:
Type | Description |
String |
The resource name of the excluded audience. |
remove()
Removes the excluded audience.
Returns nothing.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eRepresents an excluded audience in Google Ads, allowing advertisers to prevent specific groups of users from seeing their ads.\u003c/p\u003e\n"],["\u003cp\u003eProvides methods to access information like the audience ID, type (\u003ccode\u003eUSER_INTEREST\u003c/code\u003e or \u003ccode\u003eUSER_LIST\u003c/code\u003e), and the associated ad group or campaign.\u003c/p\u003e\n"],["\u003cp\u003eEnables retrieval of the base ad group and campaign to which the excluded audience is linked.\u003c/p\u003e\n"],["\u003cp\u003eOffers functionality to remove the excluded audience, effectively ending the exclusion.\u003c/p\u003e\n"],["\u003cp\u003eIncludes methods to get the resource name and ID of the excluded audience for management purposes.\u003c/p\u003e\n"]]],[],null,["# AdsApp.ExcludedAudience\n\nRepresents a Google Ads excluded audience.\n\n### Methods:\n\n| Member | Type | Description |\n|---------------------------------------|------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| [getAdGroup()](#getAdGroup) | [AdsApp.AdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) | Returns the ad group to which this excluded audience belongs. |\n| [getAudienceId()](#getAudienceId) | `String` | Returns the audience ID of the excluded audience. |\n| [getAudienceType()](#getAudienceType) | `String` | Returns the type of the excluded audience, either `USER_INTEREST` or `USER_LIST`. |\n| [getBaseAdGroup()](#getBaseAdGroup) | [AdsApp.AdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) | Returns the base ad group to which this excluded audience belongs. |\n| [getBaseCampaign()](#getBaseCampaign) | [AdsApp.Campaign](/google-ads/scripts/docs/reference/adsapp/adsapp_campaign) | Returns the base campaign to which this excluded audience belongs. |\n| [getCampaign()](#getCampaign) | [AdsApp.Campaign](/google-ads/scripts/docs/reference/adsapp/adsapp_campaign) | Returns the campaign to which this excluded audience belongs or `null` if it does not belong to a search or display campaign. |\n| [getId()](#getId) | `String` | Returns the ID of the excluded audience. |\n| [getResourceName()](#getResourceName) | `String` | Returns the resource name of the excluded audience. |\n| [remove()](#remove) | `void` | Removes the excluded audience. |\n\n`getAdGroup()`\n--------------\n\nReturns the ad group to which this excluded audience belongs.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------|-------------------------------------------------------|\n| [AdsApp.AdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) | The ad group to which this excluded audience belongs. |\n\n`getAudienceId()`\n-----------------\n\nReturns the audience ID of the excluded audience.\n\n### Return values:\n\n| Type | Description |\n|----------|-------------------------------------------|\n| `String` | The audience ID of the excluded audience. |\n\n`getAudienceType()`\n-------------------\n\nReturns the type of the excluded audience, either `USER_INTEREST` or `USER_LIST`.\n\n### Return values:\n\n| Type | Description |\n|----------|------------------------------------|\n| `String` | The type of the excluded audience. |\n\n`getBaseAdGroup()`\n------------------\n\nReturns the base ad group to which this excluded audience belongs.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------|------------------------------------------------------------|\n| [AdsApp.AdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_adgroup) | The base ad group to which this excluded audience belongs. |\n\n`getBaseCampaign()`\n-------------------\n\nReturns the base campaign to which this excluded audience belongs.\n\n### Return values:\n\n| Type | Description |\n|------------------------------------------------------------------------------|------------------------------------------------------------|\n| [AdsApp.Campaign](/google-ads/scripts/docs/reference/adsapp/adsapp_campaign) | The base campaign to which this excluded audience belongs. |\n\n`getCampaign()`\n---------------\n\nReturns the campaign to which this excluded audience belongs or `null` if it does not belong to a search or display campaign.\n\n### Return values:\n\n| Type | Description |\n|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| [AdsApp.Campaign](/google-ads/scripts/docs/reference/adsapp/adsapp_campaign) | The campaign to which this excluded audience belongs or `null` if it does not belong to a search or display campaign. |\n\n`getId()`\n---------\n\nReturns the ID of the excluded audience.\n\n### Return values:\n\n| Type | Description |\n|----------|----------------------------------|\n| `String` | The ID of the excluded audience. |\n\n`getResourceName()`\n-------------------\n\nReturns the resource name of the excluded audience.\n\n### Return values:\n\n| Type | Description |\n|----------|---------------------------------------------|\n| `String` | The resource name of the excluded audience. |\n\n`remove()`\n----------\n\nRemoves the excluded audience.\n\nReturns nothing."]]