Free Google Ads script with AI AI Max NegativeIQ

Stop guessing: the script connects your Google Ads account to AI, classifies every search term, protects what converts, and tells you what to add as a negative keyword. Built for Search campaigns.

Cost€0, for good
LicenceOpen Source
Runs inGoogle Ads + Sheets
AIlocal or cloud

Search terms, classified by AI

What the script does for you every day.

Most Google Ads accounts lose budget every day to search terms that will never convert: job seekers, competitors, irrelevant queries. Reviewing them by hand takes time and quickly gets out of hand.

Every day the Fetcher pulls your latest search terms into a Google Sheet. The Analyzer sends them to an AI that classifies each term based on your industry, your business and your conversion data.

Every term gets a classification, a confidence score and a one-sentence reason. You review, correct where needed and push the negatives back into your account with one click.

Conversion protection, always on. A search term that has converted is never flagged as a negative.
Example output
Search TermClassConfAI Reason
buy running shoes online✓ Relevant0.97High purchase intent
running shoes jobs✗ Junk0.99Job search, no intent
nike air max price⚑ Competitor0.94Brand competitor query
how to clean sneakers✗ Info0.81No purchase intent
red sneakers size 9🛡 Protected—Has conversions
This is what the “SearchTerms” tab looks like. In your sheet it shows your real data.

Three parts, one system

Everything runs inside your own accounts.

01 / Google Ads script

The Fetcher

Runs daily. Pulls every search term from your Search campaigns, removes duplicates and adds up clicks and conversions over 30 days. Writes everything to the sheet.

02 / Apps Script

The Analyzer

Sends the search terms to the AI in batches. Each term comes back with a classification, a confidence score and a plain-language reason. You define your industry once.

03 / Google Sheet

The template

Four tabs: SearchTerms is your working surface, Config is the only thing you adjust per account, Negative_Export holds the validated negatives, and Expansion_Ideas collects terms worth building campaigns around.

Local AI or cloud AI

You choose where your search terms are analysed.

The quick way

Cloud AI

You enter the API key of an AI provider and can start right away. The search terms are sent to that provider for analysis. The cost is usually a few cents per run.

The private way

Local AI

The model runs on your own hardware. The search terms never leave your premises. You need a machine that can run a language model, and a little more setup.

In both cases

Your account stays yours

The script runs in your Google Ads account and your Google Sheet. There is no server of mine in between, and I do not see your data.

How long will AI-Classify take on your account?

Google Apps Script stops after 6 minutes. Move the sliders to see whether one run is enough.

Inputs

Runtime
Batches

20

of 15 terms
Duration

50s

Limit: 6 minutes
Runs needed

1

clicks on AI-Classify
Status

Safe

fits in one run
Cost with gpt-4o-mini
Input tokens

—

approx. 400 per batch
Output tokens

—

approx. 120 per batch
Total cost

—

estimated
Batch size and runtime for your keyword count
Safe (under 5 min)Tight (5–6 min)Split neededYour setting

Set up in minutes

You set up the Config and API key once. You don't need to know how to code.

01
Sheet

Copy the template

Open the template from GitHub, make a copy and fill in the Config tab: industry, business name and five to eight example classifications.

02
Google Ads

Add the Fetcher to Google Ads

Tools → Scripts → New. Paste the Fetcher code, replace the sheet URL, authorise it and set it to run daily.

03
Apps Script

Add the Analyzer to your sheet

Extensions → Apps Script. Paste the Analyzer code, save and authorise. A new menu item appears in the sheet.

04
Layout

Run the setup menu

AI Max NegativeIQ → Prepare Layout. This formats all tabs, adds the colour coding and sets up the dropdowns.

05
Review

Let it run, then review

The next day you classify the new terms, review the suggestions and push the negatives to your account with one click.

Real code. Here's a slice.

The full source is open on GitHub.

fetcher_v1.js
// Pull search terms from Google Ads → Sheet
function fetchSearchTerms() {
  // Only pull terms with real traffic
  const query = `SELECT
    search_term_view.search_term,
    metrics.clicks,
    metrics.conversions
    FROM search_term_view
    WHERE segments.date DURING LAST_30_DAYS
    AND metrics.clicks > 0`;

  // Deduplicate — aggregate across campaigns
  AdsApp.search(query).forEach(row => {
    // ... aggregate logic
  });

  // Write new terms to Sheet
  writeNewTermsToSheet(seen, sheet);
}
// Full source on GitHub

Free. Open source. No email required.

If it saves you budget, I'd appreciate a star on GitHub. It helps others find the script.

View on GitHub
You decide where the AI runs

More

A coffee, a preview and a game.

If it saved you budget

Buy me a coffee

The script is free and stays free. A coffee helps the next one get finished sooner.

What's next

Version 2 for Performance Max

The current version covers Search campaigns. A Performance Max variant is in the works. Drop me a message and I'll let you know when it's ready.

Get notified
Free browser game

Nonogrid for your coffee break

50 handmade picture-logic puzzles, a daily challenge and a puzzle editor. Runs in your browser, no sign-up, no tracking.

Play now

Want me to set it up for you? €99 fixed price.

I set the script up on your account and adapt the Config to your industry. It's running within a day.

  • A reply from Max in person
  • An assessment, not a sales pitch
  • A reply within 2 working days
Or write to me directly: [email protected] No spam. No unwanted calls. Just a reply from me, Max.

Free and without obligation. I only use your details to reply to you. Privacy

Message received.

You'll hear from me within 2 working days, directly from Max.

Until I reply: play a round of Nonogrid →