This is the legacy documentation for Google Ads scripts. Go to the current docs.

AdsApp.​ReportRowIterator

Stay organized with collections Save and categorize content based on your preferences.
Represents an iterator of report rows.

Typical usage:

 var rows = report.rows();
 while (rows.hasNext()) {
   var row = rows.next();
 }
Related:

Methods:

MemberTypeDescription
hasNext boolean Returns true if the report has more rows.
next AdsApp.ReportRow Returns the next row in the report.

hasNext()

Returns true if the report has more rows.

Return values:

TypeDescription
boolean true if the report has more rows.

next()

Returns the next row in the report.

Report rows are returned as plain Javascript objects — in other words, associative arrays. Individual columns can be accessed by indexing by AWQL column names:

 var report = AdsApp.report(
     'SELECT Query, Ctr ' +
     'FROM   SEARCH_QUERY_PERFORMANCE_REPORT ' +
     'DURING 20130101,20130301');
 var rows = report.rows();

 while (rows.hasNext()) {
   var row = rows.next();
   var query = row['Query'];
   var ctr = row['Ctr'];
 }

Return values:

TypeDescription
AdsApp.ReportRow The next row in the report.