AdsApp.​SearchRow

  • Represents a single row of data returned from an AdsApp search query.

  • Provides access to column values through nested objects mirroring the query structure.

  • Can be iterated through using hasNext() and next() methods to retrieve individual rows.

  • Column values are accessed using dot notation, e.g., row.campaign.id to get a campaign's ID.

Represents a row of a report.

NOTE: The SearchRow is a JavaScript Object, holding all values requested. These values are nested inside the row object.

Typical usage:

  var query = 'SELECT campaign.id, campaign.name FROM campaign';
  var rows = AdsApp.search(query);
  while (rows.hasNext()) {
    var row = rows.next();
    // The row works as an associative array
    var campaign = row.campaign;
    var id = campaign.id;
    var name = campaign.name;
  }