Today, we are announcing beta support for a new search method in Google Ads scripts. This method is backed by the Google Ads API and supports most queries supported by that API. Please see the documentation page for the
Additionally, we are adding beta support for the Google Ads Query Language to our existing
The key difference between the
To help you build queries for your search, check out our query builder tool. If you have any questions, concerns, or feedback on the new beta features, please contact us via our forum.
AdsApp.search
method for more information.Additionally, we are adding beta support for the Google Ads Query Language to our existing
AdsApp.report
method. When using the report method, Google Ads scripts will automatically determine the correct reporting engine (either AdWords API or Google Ads API) to use based on the FROM
clause in your query.The key difference between the
report
and search
methods is in how the results are returned.
- The
report
method will return aReport
object, as it always has. Each row will be a map of column names to values. - The
search
method will return an iterator of rows, and each row will be analogous to aGoogleAdsRow
in the Google Ads API.
campaign.name
column would be accessed using row['campaign.name']
if you use report
, and row.campaign.name
if you use search
. The flat format from report
can be useful for exporting to a spreadsheet or CSV. The object format from search
is useful for programmatically processing results. Additionally, handling repeated fields is more intuitive since they will be returned as true arrays in the object format rather than concatenated together into a single string.To help you build queries for your search, check out our query builder tool. If you have any questions, concerns, or feedback on the new beta features, please contact us via our forum.