AdsApp.AdParamSelector
Stay organized with collections
Save and categorize content based on your preferences.
Fetches ad params. Unlike other selectors, does not support filtering or
sorting.
Typical usage:
var adParamSelector = AdsApp.adParams();
var adParamIterator = adParamSelector.get();
while (adParamIterator.hasNext()) {
var adParam = adParamIterator.next();
}
Related:
Methods:
get()
Fetches the requested ad params and returns an iterator.
Return values:
orderBy(orderBy)
Specifies the ordering of the resulting entities. The
orderBy
parameter can have one of the following forms:
orderBy("ad_parameter.parameter_index")
- orders results
by index, in ascending order.
orderBy("ad_parameter.parameter_index ASC")
- orders
results by index, in ascending order.
orderBy("ad_parameter.insertion_text DESC")
- orders
results by insertion text, in descending order.
Arguments:
Name | Type | Description |
orderBy |
String |
Ordering to apply. |
Return values:
withCondition(condition)
Adds the specified condition to the selector in order to narrow down the
results.
Multiple conditions can be added to the same selector:
selector = selector
.withCondition("ad_parameter.parameter_index = 1")
.withCondition("ad_parameter.insertion_text = '$99'");
All specified conditions are
AND
-ed together. The above
example will retrieve ad params whose index is 1 and insertion text is
'$99'.
The condition passed into this method must be of the following form:
"COLUMN_NAME OPERATOR VALUE"
Arguments:
Name | Type | Description |
condition |
String |
Condition to add to the selector. |
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-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eAdParamSelector\u003c/code\u003e fetches ad parameters but doesn't allow filtering or sorting.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods like \u003ccode\u003eget()\u003c/code\u003e to retrieve ad parameters using an iterator.\u003c/p\u003e\n"],["\u003cp\u003eThough it states no filtering/sorting, it has methods like \u003ccode\u003ewithCondition\u003c/code\u003e, \u003ccode\u003ewithLimit\u003c/code\u003e, and \u003ccode\u003eorderBy\u003c/code\u003e which contradict this and provide these functionalities.\u003c/p\u003e\n"],["\u003cp\u003eRelated resources include \u003ccode\u003eAdParamIterator\u003c/code\u003e and \u003ccode\u003eAdParam\u003c/code\u003e for working with the retrieved data.\u003c/p\u003e\n"]]],[],null,["Fetches ad params. Unlike other selectors, does not support filtering or sorting.\n\nTypical usage:\n\n```gdscript\nvar adParamSelector = AdsApp.adParams();\n\nvar adParamIterator = adParamSelector.get();\nwhile (adParamIterator.hasNext()) {\n var adParam = adParamIterator.next();\n}\n```\nRelated:\n\n- [AdParamIterator](/google-ads/scripts/docs/reference/adsapp/adsapp_adparamiterator)\n- [AdParam](/google-ads/scripts/docs/reference/adsapp/adsapp_adparam)\n\nMethods:\n\n| Member | Type | Description |\n|-----------------------------------|--------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|\n| [get](#get_0) | [AdsApp.AdParamIterator](/google-ads/scripts/docs/reference/adsapp/adsapp_adparamiterator) | Fetches the requested ad params and returns an iterator. |\n| [orderBy](#orderBy_1) | [AdsApp.AdParamSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_adparamselector) | Specifies the ordering of the resulting entities. |\n| [withCondition](#withCondition_1) | [AdsApp.AdParamSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_adparamselector) | Adds the specified condition to the selector in order to narrow down the results. |\n| [withLimit](#withLimit_1) | [AdsApp.AdParamSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_adparamselector) | Specifies limit for the selector to use. |\n\n`get()` Fetches the requested ad params and returns an iterator.\n\nReturn values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|--------------------------------------|\n| [AdsApp.AdParamIterator](/google-ads/scripts/docs/reference/adsapp/adsapp_adparamiterator) | Iterator of the requested ad params. |\n\n`orderBy(orderBy)` Specifies the ordering of the resulting entities. The `orderBy` parameter can have one of the following forms:\n\n- `orderBy(\"ad_parameter.parameter_index\")` - orders results by index, in ascending order.\n- `orderBy(\"ad_parameter.parameter_index ASC\")` - orders results by index, in ascending order.\n- `orderBy(\"ad_parameter.insertion_text DESC\")` - orders results by insertion text, in descending order.\n\nArguments:\n\n| Name | Type | Description |\n|---------|----------|--------------------|\n| orderBy | `String` | Ordering to apply. |\n\nReturn values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|-------------------------------------|\n| [AdsApp.AdParamSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_adparamselector) | The selector with ordering applied. |\n\n`withCondition(condition)` Adds the specified condition to the selector in order to narrow down the results.\n\nMultiple conditions can be added to the same selector:\n\n```scdoc\nselector = selector\n .withCondition(\"ad_parameter.parameter_index = 1\")\n .withCondition(\"ad_parameter.insertion_text = '$99'\");\n```\nAll specified conditions are `AND`-ed together. The above example will retrieve ad params whose index is 1 and insertion text is '$99'.\n\nThe condition passed into this method must be of the following form:\n\n```scdoc\n\"COLUMN_NAME OPERATOR VALUE\"\n```\n\nArguments:\n\n| Name | Type | Description |\n|-----------|----------|-----------------------------------|\n| condition | `String` | Condition to add to the selector. |\n\nReturn values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|------------------------------------------|\n| [AdsApp.AdParamSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_adparamselector) | The selector with the condition applied. |\n\n`withLimit(limit)` Specifies limit for the selector to use. For instance, `withLimit(50)` returns only the first 50 entities.\n\nArguments:\n\n| Name | Type | Description |\n|-------|-------|------------------------------|\n| limit | `int` | How many entities to return. |\n\nReturn values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|----------------------------------|\n| [AdsApp.AdParamSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_adparamselector) | The selector with limit applied. |"]]