AdsApp.ExcludedLocationSelector
Stay organized with collections
Save and categorize content based on your preferences.
Fetches excluded locations. Unlike other selectors, does not support
filtering or sorting.
Typical usage:
var locationSelector = AdsApp.targeting().excludedLocations();
var locationIterator = locationSelector.get();
while (locationIterator.hasNext()) {
var location = locationIterator.next();
}
Related:
Methods:
get()
Fetches the requested excluded locations and returns an iterator.
Return values:
withLimit(limit)
Specifies limit for the selector to use. For instance,
withLimit(50)
returns only the first 50 entities.
Arguments:
Name | Type | Description |
limit |
int |
How many entities to return. |
Return values:
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\u003eThe ExcludedLocationSelector fetches locations that have been excluded from targeting, but it doesn't allow for filtering or sorting these locations.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the \u003ccode\u003eget()\u003c/code\u003e method to retrieve an iterator for the excluded locations, which you can then loop through to access individual locations.\u003c/p\u003e\n"],["\u003cp\u003eIt's possible to limit the number of excluded locations returned by using the \u003ccode\u003ewithLimit()\u003c/code\u003e method, for example, \u003ccode\u003ewithLimit(50)\u003c/code\u003e would return a maximum of 50 locations.\u003c/p\u003e\n"]]],[],null,["# AdsApp.ExcludedLocationSelector\n\nFetches excluded locations. Unlike other selectors, does not support filtering or sorting.\n\nTypical usage:\n\n```gdscript\nvar locationSelector = AdsApp.targeting().excludedLocations();\n\nvar locationIterator = locationSelector.get();\nwhile (locationIterator.hasNext()) {\n var location = locationIterator.next();\n}\n```\nRelated:\n\n- [ExcludedLocationIterator](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedlocationiterator)\n- [ExcludedLocation](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedlocation)\n\n### Methods:\n\n| Member | Type | Description |\n|--------------------------------------|--------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|\n| [get()](#get) | [AdsApp.ExcludedLocationIterator](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedlocationiterator) | Fetches the requested excluded locations and returns an iterator. |\n| [withLimit(limit)](#withLimit_limit) | [AdsApp.ExcludedLocationSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedlocationselector) | Specifies limit for the selector to use. |\n\n`get()`\n-------\n\nFetches the requested excluded locations and returns an iterator.\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------|\n| [AdsApp.ExcludedLocationIterator](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedlocationiterator) | Iterator of the requested excluded locations. |\n\n`withLimit(limit)`\n------------------\n\nSpecifies limit for the selector to use. For instance, `withLimit(50)` returns only the first 50 entities.\n\n### Arguments:\n\n| Name | Type | Description |\n|-------|-------|------------------------------|\n| limit | `int` | How many entities to return. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------------------------|----------------------------------|\n| [AdsApp.ExcludedLocationSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedlocationselector) | The selector with limit applied. |"]]