Get started

Follow these steps to launch your first script.

  1. Sign in to your Google Ads account.
  2. Click the Tools icon gray box with white
wrench and select Scripts under BULK ACTIONS.
  3. Press the + icon blue circle with white
plus to add a script.
  4. (Temporary, during the beta) Switch your script to use the new scripts experience, to the left of "ADVANCED APIS" above the editor area.
  5. Copy and paste the following code into the editor area, inside the main function:

    function main() {
       let keywords = AdsApp.keywords()
             .orderBy("metrics.impressions DESC")
       console.log("The 10 keywords with the most impressions yesterday:");
       while (keywords.hasNext()) {
           let keyword =;
           console.log(`${keyword.getText()}: ${keyword.getStatsFor("YESTERDAY").getImpressions()}`);
  6. When prompted, click AUTHORIZE so the script can access the account on your behalf. This has to be done once for each script.

  7. Click PREVIEW to run the script in preview mode. Results will appear in the CHANGES / LOGS panel.

Manager accounts

Manager accounts are currently not supported by the beta.

This is a very basic example, but it is a start! We will be adding various code samples to the documentation soon, but for now you can take a look at the reference docs for AdsApp to see what else you can do.