Reports

Reporting is a powerful feature that allows you to access the rich collection of AdWords API reports. Reporting queries are specified using the AdWords Query Language, and the returned values are simple JSON objects. For example,

var report = AdsApp.report(
    "SELECT AdGroupId, Query, Ctr, Cost, Impressions " +
    "FROM   SEARCH_QUERY_PERFORMANCE_REPORT " +
    "WHERE  Impressions < 10 " +
    "DURING LAST_30_DAYS");

var rows = report.rows();
while (rows.hasNext()) {
    var row = rows.next();
    var query = row["Query"];
    var impressions = row["Impressions"];
}

Note that reports do not support the ORDER BY or LIMIT clauses. Results will be returned in no particular order.

Read the Reference for more details about the API. For an example on using reports in Google Ads scripts, see the Search Query solution.

Key benefits of using reports:

  • Access to a wide variety of stats not available to regular Google Ads entities (including segments).
  • Ability to access a large amount of data. Reports are not presently subject to any quotas, and fetching of a million-row report is possible.
  • Performance—the download of a report may take a while, but iterating through the report rows is blazingly fast.