...
Updated May 2026
Google Ads Scripts Guide

Google Ads Scripts:
Complete Guide and Library

Everything you need to understand, find, and run Google Ads scripts. Curated from the best sources in the industry, with opinionated picks for what actually moves the needle in 2026.

19 scripts curated
6 categories
8 top sources
100% free scripts included

What Are Google Ads Scripts?

Google Ads Scripts are JavaScript programs that run inside the Google Ads interface and interact directly with your account data. They execute automatically on a schedule (hourly, daily, or weekly), making changes, pulling reports, or sending alerts without any manual work. No API key, no third-party software, no coding environment required. You paste the script into Google Ads, configure a few variables, and set a run schedule.

Scripts have been part of Google Ads since 2012. In that time, a large community of PPC practitioners has built thousands of free, production-tested scripts covering almost every aspect of account management. The ones in this library come from that community.

They work at two levels. Single-account scripts run inside one account and are useful for reporting, alerts, and optimization. MCC-level scripts run across all accounts in a manager account and are the foundation of how agencies operate at scale.

What scripts can do

Send email alerts, update bids, pause keywords, build spreadsheet reports, check URLs, pull search terms data, monitor budgets, and audit account structure.

What scripts cannot do

Create campaigns from scratch via full automation, access competitor data, read Smart Bidding signals, or replace strategic judgment on account structure.

Why Scripts Still Matter in 2026

The fair question is whether scripts are still relevant when AI assistants can generate code on demand. The answer is yes, for a specific reason: scripts run against your live account data. An AI tool can write a budget pacing script in 30 seconds, but it cannot check whether your account is actually on pace this morning. Only a script that runs inside Google Ads can do that.

The shift AI has made is in the barrier to entry. You no longer need to understand JavaScript to adapt a script to your account. You paste it into Claude or ChatGPT, describe your threshold values, and get a modified version in seconds. The community-built scripts in this library are the raw material. AI is the tool that makes them accessible to everyone.

Practical note: The highest-value scripts in 2026 are the ones that give you visibility inside Performance Max campaigns and catch operational issues (broken URLs, site downtime, feed errors) before they cost you money. Both categories are well-represented in the library below.

Performance Max is the other driver. Google increasingly routes budget through PMax with very little transparency. Scripts are currently the primary way to get asset group-level performance data, search category breakdowns, and placement reports out of PMax. Without them, you are largely flying blind.

19 scripts

19 Curated Google Ads Scripts

Reporting
Beginner
Account Performance Summary

Emails you a daily digest of your account's key metrics: clicks, impressions, cost, conversions, and ROAS. No spreadsheet setup required. The simplest way to stay informed on accounts you're not checking daily.

Reporting Dan's Pick
Beginner
Quality Score Historical Tracker

Logs quality scores for every keyword into a Google Sheet daily. Google does not store historical QS data, so without a script like this you have no idea whether your QS is improving or declining. One of the most widely used scripts ever written in the Google Ads community.

Reporting
Intermediate
Auction Insights Reporter

Automatically pulls auction insights data (impression share, overlap rate, outranking share) into a spreadsheet so you can track competitor trends over time. Especially useful for competitive markets where a new entrant or price change explains sudden performance shifts.

Reporting Dan's Pick
Intermediate
N-gram Search Term Analysis

Breaks down your search terms into 1-word, 2-word, and 3-word patterns and analyzes them by spend, clicks, and conversions. The fastest way to surface negative keyword candidates and identify winning query patterns to add as keywords. One of the most universally useful scripts in the entire library.

Budget Dan's Pick
Beginner
Budget Pacing Alert

Sends an email alert when your account is on track to significantly over- or under-spend its monthly budget. Configurable threshold. The most basic script for any account you're not monitoring daily. Prevents the end-of-month budget overshoot that no one catches until the invoice arrives.

Budget
Beginner
Monthly Budget Monitor

Checks each campaign daily against a monthly budget target set in a Google Sheet and alerts when spend is trending off-pace. Works with shared budgets. Useful when different campaigns have different monthly caps that need individual tracking rather than a single account-level budget.

Budget
Advanced
Performance Anomaly Detector

Flags when any key metric deviates significantly from expected performance based on historical patterns. Uses statistical thresholds rather than fixed rules, so it adapts to seasonal patterns in your account. Best suited to larger accounts where manual daily review isn't practical.

Shopping & PMax Dan's Pick Most Popular
Beginner
PMax Insights Script

The most widely used Performance Max script. Pulls search categories, asset group performance, and placement data out of the PMax black box into a clean Google Sheet. Free v28 available on GitHub. The paid version ($199 one-time) adds additional breakdowns. Used by Dentsu, Merkle, Publicis, and thousands of independent practitioners.

Shopping & PMax
Beginner
PMax Asset Group Performance Report

Creates a Google Spreadsheet with KPI breakdowns by asset group, including cost, conversions, ROAS, and asset strength indicators. Useful when you have multiple asset groups targeting different product ranges and need to compare them quickly without waiting for the UI to load.

Shopping & PMax Dan's Pick
Beginner
Merchant Center Monitor

Monitors your Google Merchant Center feed and sends an alert when products get disapproved or when the number of feed errors crosses a configurable threshold. For ecommerce accounts, feed health is directly tied to Shopping revenue. This script catches problems before they empty your campaign of eligible products.

Shopping & PMax
Intermediate
Shopping Search Term Analysis

Specifically built for Shopping campaigns. Analyzes search terms triggering your Shopping ads and surfaces negative keyword opportunities at the product group level, so you can add negatives in the right place rather than at the top-of-account level where they might block too much traffic.

Alerts Dan's Pick
Beginner
Site Down Pauser
By Optmyzr / community

Checks your website URL every 30 minutes. If it returns an error code (404, 500, or any configurable response), all campaigns are paused automatically to stop burning budget on traffic going nowhere. Re-enables campaigns automatically when the site recovers. One of the most universally installed scripts across all account types.

Alerts Dan's Pick
Beginner
Broken URL Checker

Scans every destination URL, sitelink, and callout extension across your account for broken links. Sends a report of all 404s and redirect errors. Run weekly. Product pages get deleted, collections get reorganized, redirects break. Without this script running, broken URLs silently drain budget for weeks before anyone notices.

Alerts
Beginner
Performance Drop Alert

Sends an email when key metrics (cost, conversions, ROAS) drop below configurable thresholds compared to the previous period. Acts as an early warning system between your regular account check-ins. More useful than scheduled reports because it only triggers when something has actually gone wrong.

Keyword Mining Legacy
Intermediate
Search Term Harvester

Automatically finds search terms that meet configurable CTR and conversion thresholds and adds them as exact match keywords to the appropriate ad group. One of the original Google Ads automation scripts, still widely used for accounts that rely on broad match and want to build tighter exact match coverage over time.

Keyword Mining
Intermediate
Negative Keyword Conflict Finder

Finds cases where your own negative keywords are blocking your intended positive keywords from serving. This is a surprisingly common problem in mature accounts that have accumulated years of negatives. Most practitioners don't run this audit manually, which means the conflicts go undetected for months.

Keyword Mining
Intermediate
N-gram Negative Keyword Suggestor

A focused variant of n-gram analysis built specifically to identify negative keyword candidates. Surfaces word patterns with high spend and zero (or near-zero) conversions, ranked by wasted budget. More actionable output than the full n-gram analysis script, which surfaces both positive and negative signals simultaneously.

Quality Score
Beginner
QS Impact Calculator

Calculates the exact CPC premium or discount each keyword is receiving due to its Quality Score. Turns QS from an abstract number into a real dollar cost you can act on. Useful for prioritizing which keywords to improve first when QS varies significantly across your account.

Quality Score
Beginner
Low QS Keyword Pauser

Pauses keywords below a configurable Quality Score threshold. Has a report-only mode so you can review the candidates before any changes go live. Useful for large accounts where manually finding and pausing every keyword below QS 4 is too time-consuming to do in the UI.

Quality Score
Beginner
Quality Score Account Overview

Generates a full spreadsheet breakdown of QS across your entire account, segmented by campaign and ad group. Includes the QS component scores (Expected CTR, Ad Relevance, Landing Page Experience) so you can see exactly which component is dragging each keyword down.

No scripts match your search.

The Starting Stack I'd Install on Every Ecommerce Account

If you're starting from scratch and want to know which scripts to prioritize, these are the seven I would run on any ecommerce Google Ads account on day one. They cover the critical gaps (PMax visibility, feed health, site uptime, budget tracking) and take less than an hour to set up in total.

01
PMax Insights Script
Performance Max is where most ecommerce budget goes. Without this script you have no visibility into what's actually driving results inside it.
mikerhodes.com.au ↗
02
N-gram Search Term Analysis
Ecommerce accounts generate huge search term volumes. This script surfaces the negative keyword patterns that are quietly draining budget every week.
github.com/Brainlabs-Digital ↗
03
Merchant Center Monitor
Feed disapprovals silently remove products from Shopping and PMax. This script catches them before they hollow out your campaigns.
ads-scripts.com ↗
04
Broken URL Checker
Ecommerce sites constantly reorganize URLs. Broken destination URLs mean paid clicks going to 404 pages. Run this weekly.
nilsrooijmans.com ↗
05
Site Down Pauser
Site outages happen. When they do, you want your ads to pause within 30 minutes, not 3 hours. Set this once and forget it.
optmyzr.com ↗
06
Budget Pacing Alert
Basic hygiene. Prevents the budget overshoot you only discover when the invoice arrives at the end of the month.
mikerhodes.com.au ↗
07
Quality Score Historical Tracker
QS is one of the most actionable levers in a Search campaign. Without historical logging you cannot tell if your work is actually improving it.
ppc.io ↗

The Best Google Ads Script Libraries and Resources

These are the sources worth bookmarking. Between them they cover almost every Google Ads automation need, and the community around them is active enough that new scripts appear regularly.

Official
Google Ads Scripts Official Docs

The canonical reference for syntax and API objects. Includes a full code examples library organized by functionality. Start here when something breaks.

developers.google.com ↗
Individual — 400+ Scripts
Nils Rooijmans

The largest single curated collection anywhere. 400+ scripts delivered via Google Sheet on email signup. Covers Shopping, PMax, QS, budgets, and more. The most comprehensive free library in the space.

nilsrooijmans.com ↗
Individual — PMax Specialist
Mike Rhodes

Best known for the PMax Insights Script (free v28 on GitHub, paid at $199 one-time). Free scripts include budget pacing, QS tracker, and daily account summary. Trusted by major global agencies.

mikerhodes.com.au ↗
Agency — Open Source
Brainlabs (GitHub)

Award-winning scripts open-sourced by one of the largest performance agencies. Well-maintained, production-grade code. Includes n-gram analysis, auction insights tracking, and anomaly detection.

github.com/Brainlabs-Digital ↗
Individual — Original Scripts
Russell Savage
Legacy

One of the original Google Ads script authors. FreeAdWordsScripts.com is a long-running blog with scripts for QS reporting, label management, account cleanup, and Google Drive integration. Scripts may not be compatible with the current Google Ads API.

freeadwordsscripts.com ↗
Ex-Google Engineer — Gists
Frederick Vallaeys (Optmyzr)

Former Google AdWords Evangelist and Optmyzr CEO. Publishes scripts on GitHub Gists covering n-gram analysis, AI-assisted RSA generation, and PMax search term categorization. Highly technical, high quality.

gist.github.com/siliconvallaeys ↗
Store — Configured Scripts
ads-scripts.com

Scripts designed for non-technical users and MCC-level agencies. All configured via Google Sheet, no code editing required. Includes a PMax Asset Group report, Merchant Center monitor, and budget trackers. Mix of free and paid.

ads-scripts.com ↗
Curated Directory
Optmyzr Enhanced Scripts

Optmyzr wraps popular scripts in a no-code interface so you configure parameters through a UI instead of editing code. Covers budgets, bid adjustments, site monitoring, and QS management. Requires an Optmyzr subscription.

optmyzr.com ↗

How to Install a Google Ads Script in 5 Steps

Installing a script takes under 5 minutes for most of the ones in this library. The process is the same regardless of which script you choose.

1
Open the Scripts section in Google Ads

In your Google Ads account, go to Tools → Bulk Actions → Scripts. In a Manager (MCC) account you'll find Scripts under the same Bulk Actions menu.

2
Create a new script

Click the blue + button to create a new script. Give it a descriptive name (e.g. "Budget Pacing Alert — Monthly"). The editor will open with a blank JavaScript file.

3
Paste the script and configure variables

Copy the script code from its source and paste it into the editor. Most scripts have a configuration section at the top with variables you need to set: your email address, budget thresholds, or a Google Sheet URL. Edit only those values.

4
Authorize and preview

Click Authorize to grant the script access to your account data. Then click Preview to run the script in read-only mode. This lets you see what it would do without making any changes. Check the logs at the bottom for errors before running for real.

5
Set a run schedule

Click Save, then set the frequency: Hourly (for site monitors), Daily (for budget and reporting scripts), or Weekly (for analysis scripts like n-gram and broken URLs). Most scripts in this library include a recommended frequency in their documentation.

Frequently Asked Questions

Yes. All the scripts in this library are free. Running scripts inside Google Ads costs nothing. The only scripts that carry a fee are premium versions like Mike Rhodes' paid PMax script ($199 one-time), which offers additional features beyond the free version. Everything else listed here is fully free.
Not anymore. In 2026, the practical barrier is much lower than it used to be. Most scripts have a clearly marked configuration section at the top where you fill in your email address, thresholds, and Google Sheet URLs. For anything else, you can paste the script into Claude or ChatGPT, describe what you want to change, and get a modified version in seconds. You do not need to write scripts from scratch.
A poorly written or misconfigured script can make unintended changes (pausing keywords, modifying bids). The risk is manageable: always run a script in Preview mode first, which executes everything but makes no changes to your account. The scripts in this library are community-tested and widely used, but you should always review what a script does before running it live. Google Ads does maintain a Change History log so any script changes can be identified and reversed.
It depends on the script's purpose. Site monitors and budget alerts should run hourly. Daily reporting scripts (account summary, budget pacing) run once a day. Analysis scripts like n-gram analysis or broken URL checks are best run weekly, because the underlying data needs time to accumulate before patterns become meaningful. Each script in this library notes the recommended frequency.
Yes, though with limitations. Google Ads Scripts can pull PMax data that is available via the Google Ads API, which includes some campaign-level metrics, asset group data, and search category reports. What scripts cannot access is data Google does not expose via the API at all. Mike Rhodes' PMax Insights Script is the most thorough publicly available solution for PMax visibility via scripts.
Single-account scripts run inside one Google Ads account and can only access data from that account. MCC-level scripts run inside a Manager account and can loop through all child accounts, making them useful for agencies managing multiple clients. Most scripts come in both versions. If you only manage one account, the single-account version is all you need.

Want to Know Which of These Your Account Actually Needs?

A free Google Ads audit identifies the gaps in your account structure and tells you exactly where automation would have the most impact.

Get Your Free Audit