N-gram Search Term Analysis for Google Ads Using AI
Most guides for n-gram search term analysis point you to a Python script or an Excel macro. Both require exporting your search term report, running the analysis offline, then going back into Google Ads to apply the negatives manually. PaidSync closes that loop inside a single AI conversation.
N-gram analysis breaks your search term report into 1-word, 2-word, and 3-word token groups and aggregates spend, clicks, and conversions across all search terms containing each token. The result is a ranked table of patterns where ad spend is going without returns. PaidSync's analyze_search_term_ngrams tool runs this analysis live against your Google Ads account through Claude or ChatGPT. add_negative_keywords applies the results in the same session. No spreadsheet, no script, no manual round-trip.
Why n-gram analysis matters more than reviewing search terms one by one
A mid-sized Google Ads account running broad match and phrase match across 5 to 10 campaigns can trigger 3,000 to 15,000 unique search terms in 30 days. Reviewing each one individually is not practical. You can filter by spend or CPA threshold, but that approach only catches individual terms that crossed a budget threshold on their own.
N-gram analysis finds the structural patterns underneath. The word "free" might appear in 847 different search terms across your account, none of which individually spent more than $12 this month. But across all 847 occurrences, that token drove $4,200 in spend with 0 conversions. A single negative keyword blocks all future variation. Individual term review would never surface that pattern because no single term triggered the threshold.
That is why experienced PPC managers have been running n-gram scripts for years. The problem has always been the workflow: export CSV, run analysis, identify candidates, manually re-enter negatives. Each step adds friction and introduces copy-paste errors.
The AI approach with PaidSync
PaidSync exposes the analyze_search_term_ngrams tool through the MCP protocol. When you prompt your AI assistant to run it, the tool queries the Google Ads API directly, runs the n-gram aggregation server-side, and returns a structured table in your conversation. You do not leave the chat window.
The endpoint is https://mcp.paidsync.ai/mcp with your API key as ?api_key=ps_.... Connect it once to Claude or ChatGPT and all 309 tools including the n-gram analysis are available in every subsequent conversation.
The 7-step workflow
-
Connect Google Ads to PaidSyncSign up at paidsync.ai, connect your account via OAuth, copy the MCP endpoint into your AI client. Takes under 3 minutes.
-
Run the n-gram analysisPrompt the AI: "Run analyze_search_term_ngrams for the last 30 days across all active Search campaigns. Return 1-gram, 2-gram, and 3-gram results sorted by spend descending."
-
Filter for zero-conversion patternsAsk: "From the results, show only n-grams with more than $30 spend and zero conversions in the date range." These are your clearest negative candidates.
-
Check match type contextPrompt: "For each flagged n-gram, which campaigns triggered it most, and under which match types?" Broad match campaigns typically drive the highest n-gram waste volume.
-
Classify by negative list levelDecide account-level versus campaign-level versus ad-group-level for each negative. Account-level blocks across everything. Use it for irreversible exclusions like brand-safety terms.
-
Stage the negatives for reviewPrompt: "Prepare the add_negative_keywords call for these n-grams at account level in exact match: [your list]." The AI shows the complete staged change before executing.
-
Confirm and applyReview the staged negatives. Confirm the action. PaidSync applies via the Google Ads API. Full session for a 10,000 to 50,000 impression account runs 20 to 35 minutes.
Real prompts to use in your AI session
These are the exact prompt patterns that work well against the PaidSync toolset. Copy them directly into your Claude or ChatGPT session after connecting your Google Ads account.
-- Pull n-gram analysis with metrics
Run analyze_search_term_ngrams for campaign [name or ID],
date range last 30 days. Include spend, clicks,
conversions, and CPA per n-gram. Sort by spend desc.
-- Identify waste patterns
From the results, filter for n-grams with spend above $50
and conversion rate below 1%. Group by 1-gram, 2-gram,
3-gram separately.
-- Stage negatives for confirmation
Prepare add_negative_keywords for these n-grams at
account level in exact match:
"free", "tutorial", "how to", "diy guide"
Show me the full change set before executing.
What the output looks like
The analyze_search_term_ngrams response returns a structured table per n-gram size. A typical result for a 30-day window might look like this for a B2B SaaS account:
- 1-gram "free" : 847 occurrences, $4,200 spend, 0 conversions, CPA infinity
- 1-gram "jobs" : 412 occurrences, $1,800 spend, 0 conversions
- 2-gram "free trial" : 290 occurrences, $3,100 spend, 2 conversions, CPA $1,550
- 3-gram "how to build" : 156 occurrences, $890 spend, 0 conversions
Each row is a decision point. "Free" and "jobs" are clear blocks. "Free trial" needs a judgment call: 2 conversions at $1,550 each might be acceptable if LTV is high enough. The AI can help you model that tradeoff if you give it your target CPA as context.
This kind of structural audit is what separates well-managed accounts from accounts that bleed spend into long-tail irrelevant queries over months. See how this connects to broader automated negative keyword workflows with AI and wasted spend detection.
Running the analysis across multiple accounts
For agencies managing multiple Google Ads accounts through MCC, PaidSync supports account-level routing. Prompt: "Switch to account [CID], then run the n-gram analysis for the last 14 days." The AI routes the tool call to the correct account without requiring a new OAuth connection for each client. Each client's negatives are applied to the correct account. See the full Google Ads audit guide for how n-gram analysis fits into a complete account review session.
Run n-gram analysis on your live Google Ads account. Free tier includes 15 tool calls per month.
Start Free Book a DemoFrequently asked questions
What is n-gram search term analysis for Google Ads?
N-gram analysis breaks your search term report into individual word tokens (1-grams), 2-word phrases (2-grams), and 3-word phrases (3-grams) and aggregates performance metrics across all search terms that contain each token. The result is a frequency table showing which words and phrases appear most often in your triggered search terms, sorted by spend, clicks, conversions, or CPA. Patterns that show high spend and zero conversions across multiple search terms are strong negative keyword candidates, even if no single search term individually crosses a blocking threshold.
Why is n-gram analysis better than reviewing search terms one by one?
A typical active Google Ads account triggers thousands of unique search terms per month. Reviewing each one individually takes hours and misses the structural patterns. N-gram analysis surfaces that, for example, the word "free" appears across 847 different search terms and is responsible for $2,300 in spend with 0 conversions. That single negative keyword addition blocks all future variation of that pattern in one action, where individual search term review would only catch the terms you happened to scroll past.
How do I run n-gram analysis without Excel or Python?
PaidSync's analyze_search_term_ngrams tool runs the full n-gram breakdown against your live Google Ads account from within a Claude or ChatGPT conversation. There is no spreadsheet export, no Python script, and no manual pivot table. You prompt the AI, it calls the tool, and returns the n-gram frequency table with spend, clicks, CPA, and conversion data already aggregated. Then you can apply the negatives in the same session using add_negative_keywords.
What is the difference between 1-gram, 2-gram, and 3-gram analysis?
A 1-gram (unigram) is a single word token. A 2-gram (bigram) is any 2-word phrase. A 3-gram (trigram) is any 3-word phrase. For negative keyword purposes, 1-gram analysis catches broad intent signals like "free", "DIY", or "jobs" that are irrelevant regardless of context. 2-gram and 3-gram analysis catches more specific patterns like "how to", "template download", or "near me free" that the 1-gram pass would miss. Running all three layers gives you the most complete picture of where search term waste is concentrated.
Can I use PaidSync to add negative keywords directly from the analysis?
Yes. After analyze_search_term_ngrams returns the results, you can prompt the AI to stage a negative keyword addition for any n-gram at account, campaign, or ad group level. The add_negative_keywords tool shows you the complete change set before executing. You confirm once, and PaidSync applies all the negatives via the Google Ads API. The analysis-to-application workflow runs in a single conversation without switching between tools.
How often should I run n-gram analysis on a Google Ads account?
For accounts with $5,000 or more monthly spend, running n-gram analysis every 2 to 4 weeks is standard practice. The window should cover at least 14 days to give statistical weight to lower-impression n-grams. For accounts running broad match campaigns or Performance Max, the search term volume is higher and the review cadence should be closer to every 2 weeks. For accounts with tight keyword match types and low search term volume, monthly is sufficient.
Does n-gram analysis work for Performance Max campaigns?
Performance Max does not expose a traditional search term report at the same level of detail as Search campaigns. The search categories report and search terms insight view provide partial visibility. PaidSync's analyze_search_term_ngrams operates on the data Google makes available via the API, which for PMax includes search term insights but not the full match-level breakdown available for Search campaigns. For PMax accounts, the n-gram analysis on the Search campaigns that run alongside PMax still identifies the most actionable negative patterns.
Ready to run your first n-gram session?