What it does?
A Python script pulls your Google Ads search term report via GoMarble MCP, flags the wasted-spend terms, checks them against your existing negative list, and clusters the rest into negative keyword recommendations with match-type suggestions.
What you need
- → Google Ads customer ID (CID)
- → GoMarble API key
- → Anthropic API key
First, connect Claude Code to your ad accounts
Set up GoMarble MCP once, then paste the build prompt below into Claude Code.
Install Claude Code and Python
Download Claude Code and Python if you don't already have them installed.
Connect your Google Ads account on GoMarble
Go to apps.gomarble.ai, sign up, and connect your Google Ads account in the Integrations page.
Get your GoMarble API key
In GoMarble, go to Settings → API Key, copy it, and save it somewhere safe.
Add GoMarble MCP to Claude Code
Run the command below in your terminal to connect Claude Code to your GoMarble MCP server.
Claude Pro or Max is recommended for higher usage limits.
The script
Paste this into Claude Code — it will write the Python CLI script for you, based on this spec.
What you get back
-
→
Format: Running `python search_term_mining.py --google 1234567890` writes three files:
- – wasted_terms.csv
- – negative_keywords.csv
- – search_term_brief.txt — an AI-written brief with negative keyword recommendations by match type, positive keyword opportunities, and a prioritized action plan with estimated savings
Want this automated?
Run the prompt above every Monday morning automatically. GoMarble Agents don't just deliver the report (Slack / email / in-app) — they can execute the recommended changes directly in your ad account, too. Offload the whole recurring task and stop doing it manually.
Try GoMarble Agents free →FAQ
What counts as wasted spend?
Does it check my existing negative keywords?
What match types does it suggest?
How many search terms does it analyze?
Does this work for Shopping or Display campaigns?
Does it add the negatives automatically?
Skip the prompt — let GoMarble do this for you.
Sign up, connect your ad accounts, and search term mining & negative keywords runs on every account, every week, automatically.