Negative Keyword Script Generator
Generate a Google Ads Script that automatically scans search terms and adds matching queries to a shared negative keyword list.
Why automate negative keywords?
As Google Ads accounts grow, it becomes harder to consistently catch low-intent queries like research terms, job seekers, or brand-risk phrases before they waste budget. A negative keyword script helps you turn those reviews into a repeatable, automated process.
This script scans recent search terms in your account and automatically adds matching queries to a shared negative keyword list. That means fewer missed negatives, cleaner traffic over time, and less manual cleanup week after week.
What this script does
This tool generates a ready-to-use Google Ads Script based on your own negative keyword criteria. You choose the name of the shared negative keyword list and the phrases you want to block. The script then looks for those phrases inside real search queries and adds matching queries as phrase-match negatives to your selected list. No black boxes, just a script you control.
How to use this tool (step by step)
View step-by-step instructions
Before running the script, you’ll need a shared negative keyword list.
- In Google Ads, go to Tools & Settings → Shared library → Negative keyword lists
- Click + to create a new list
- Give the list a clear name (for example: Brand Safety Negatives or Low-Intent Queries)
- Save the list (you don’t need to add keywords yet)
This is the list the script will automatically update over time.
- Enter the exact name of your shared negative keyword list
- Add the phrases you want to monitor (one per line), e.g. scam, jobs, lawsuit, reviews
- Click Generate Script
- Copy the full script output
You can update or regenerate the script at any time if your criteria changes.
- In Google Ads, go to Tools & Settings → Bulk actions → Scripts
- Click the + button to create a new script
- Paste the generated script into the editor
- Click Authorize to allow the script to run
- Use Preview to confirm everything looks correct
- Schedule the script to run automatically (weekly is recommended for most accounts)
Once live, the script will scan recent search terms and add matching queries to your negative keyword list.
- Go back to Shared library → Negative keyword lists
- Select your list
- Apply it to the campaigns you want protected
Once applied, any new negatives added by the script will automatically affect those campaigns.
After setup, the script runs on a schedule, adds new low-intent queries as phrase-match negatives, and helps keep your campaigns cleaner over time without constant manual review.
This script is designed to support regular search term hygiene, not replace manual review. Always preview changes and monitor performance after enabling scripts in production accounts.
