PaidSync>Blog>N-gram Search Term Analysis Template for Google Ads

N-gram Search Term Analysis Template for Google Ads

Founder written
Author: Ahmed Ashraf|12 min read|Updated September 23, 2026

An n-gram template for Google Ads has one row per word pattern found in your search terms: the pattern, how many search terms contain it, its cost, clicks and conversions, and the decision you take on it. Fill it by hand from the search terms report, or let PaidSync's analyze_search_term_ngrams fill it from your live account in Claude or ChatGPT. The tool returns the 1-, 2- and 3-word patterns that spent money with zero conversions, and add_negative_keywords or add_account_negative_keywords blocks the ones you choose, previewed first.

The n-gram template

Copy the header row into a sheet. Each row is one pattern. The first six columns are data from the account, and the last three are your decisions.

pattern,words,search_terms_containing,cost,clicks,conversions,decision,negative_level,match_type
ColumnWhat goes in itWhere it comes from
patternThe word or phrase, such as "free" or "how to"analyze_search_term_ngrams returns it as the pattern
words1, 2 or 3Count the words in the pattern
search_terms_containingHow many different search terms contain the patternReturned by the tool, or counted by hand with a "contains" filter
costSpend across those search terms in the windowReturned in the account currency
clicksClicks across those search termsReturned by the tool
conversionsConversions across those search termsAlways 0 in the tool's output, because it returns only patterns that never converted. By hand, add up the column.
decisionNegate, watch or keepYou, with the rule below
negative_levelAccount, campaign or ad groupYou
match_typePhrase, broad or exactThe tool suggests phrase for multi-word patterns and broad for single words

The decision rule

  • Negate when the pattern has nothing to do with what you sell, such as "jobs" or "free" for a paid product, and it shows up in at least three search terms.
  • Watch when the pattern is relevant but has not converted yet. Keep it for one more window before you block it.
  • Keep when the pattern describes your product. Zero conversions there points to the ad, the landing page or the offer, not the query.

Filling it by hand

Download the search terms report for the window from Google Ads (Insights and reports, then Search terms). For each word you suspect, filter the search term column for "contains", then add up cost, clicks and conversions and count the matching rows. Write one template row per word. It works, but it is slow on thousands of search terms, and you only find the words you already thought to check. The tool reads every term and finds the patterns for you.

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 several campaigns can trigger thousands of 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 hundreds of search terms across your account, none of which spent enough on its own to cross your review threshold. Added together, that one word can carry real spend with zero 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. If you write scripts anyway, see how to use Jev AI to find negative keywords in Google Ads, which pairs PaidSync with a fast decision model.

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, and you sign in with your PaidSync login (OAuth). Connect it once to Claude or ChatGPT and all 630+ tools including the n-gram analysis are available in every subsequent conversation.

The 7-step workflow

  1. Connect Google Ads to PaidSync
    Sign up at paidsync.ai, connect your account via OAuth, copy the MCP endpoint into your AI client.
  2. Run the n-gram analysis
    Prompt the AI: "Run analyze_search_term_ngrams for the last 30 days. List every pattern it returns with its cost, clicks and the number of search terms containing it." Each pattern becomes one row of the template.
  3. Tighten the thresholds
    The tool returns only patterns with zero conversions that cost at least 5 in the account currency across at least 3 search terms. Raise min_cost, for example to 30, to keep only the clearest candidates.
  4. Check campaign context
    Ask: "For each flagged pattern, pull the search terms report and show which campaigns the matching search terms came from." A pattern that wastes money in one campaign can be fine in another.
  5. Classify by negative list level
    Decide account level, campaign level or ad group level for each negative and write it in the negative_level column. Account level blocks across every campaign, so use it for patterns that are wrong everywhere.
  6. Preview the negatives
    Prompt: "Preview adding these patterns as phrase-match negatives at account level: [your list]." add_account_negative_keywords (account level) and add_negative_keywords (campaign or ad group level) run as a preview by default, so the first call shows the change set without applying it.
  7. Confirm and apply
    Review the preview, then confirm. Over MCP, your assistant's own confirmation is the check before the real call runs. Applied changes are logged, on a best-effort basis, with a 7-day before-and-after outcome.

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.

-- Fill the template Run analyze_search_term_ngrams for the last 30 days with min_cost 30. List each pattern with its cost, clicks and the number of search terms containing it. -- Check where the patterns came from For the top 10 patterns, pull the search terms report and show which campaigns the matching terms came from. -- Preview the negatives Preview add_account_negative_keywords for these patterns in phrase match: "free", "jobs", "how to" Show me the change set before anything is applied.

What the tool returns

analyze_search_term_ngrams reads up to 2,000 search terms, most expensive first, for a window of 1 to 365 days (30 by default) that ends yesterday. It splits each search term into 1-, 2- and 3-word patterns and adds up cost, clicks and conversions for each pattern. It then returns only the patterns that never converted, cost at least min_cost (5 in the account currency by default) and appear in at least min_occurrences search terms (3 by default), up to 30 of them, most expensive first.

Each pattern comes with a suggested negative and match type: phrase for multi-word patterns, broad for single words. The recoverable total counts each search term once, so a term that feeds three patterns is not counted three times. When the window holds more than 2,000 search terms, the response says the list may be truncated, and a shorter window or one campaign at a time gives a complete read.

Patterns that did convert are not in the output. To judge a converting pattern, pull the search terms report and compare its cost per conversion with your target.

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 task to the correct account without requiring a new OAuth connection for each client. Each client's negatives are applied to the correct account. The Google Ads audit checklist shows where n-gram analysis fits in a complete account review, and the Google Ads audit guide shows how to run that review with AI.

Run n-gram analysis on your live Google Ads account. Free tier includes 15 tasks per month.

Start Free Book a Demo

Frequently asked questions

What columns should an n-gram template have?

Nine. The pattern, its word count, the number of search terms that contain it, cost, clicks and conversions, then three decisions you make yourself: negate, watch or keep, the negative level, and the match type.

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 shows that a single word, such as "free", appears across hundreds of search terms and together holds spend with zero 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 it returns the patterns that spent money without a conversion, with cost, clicks and the number of search terms each appears in, already aggregated. Then you can block them in the same session with add_negative_keywords or add_account_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 patterns, ask the assistant to add the ones you choose. add_account_negative_keywords adds them to a shared Account Negatives list attached to every campaign, and add_negative_keywords adds them at campaign or ad group level. Both run as a preview by default, so the first call shows the change set. Over MCP, your assistant's own confirmation is the check before the real call runs.

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?

Not directly. analyze_search_term_ngrams reads the standard search terms report. Performance Max search terms sit in a separate search term insights report that the tool does not read. For accounts with Performance Max, run the n-gram analysis on the Search campaigns that run alongside it, which still surfaces the most actionable negative patterns.

Ready to fill the template from your live account?