N-Gram Mining — The Search-Term Layer You're Missing
Break your search terms into words, aggregate performance, and find the themes silently draining budget — then kill them permanently with negative phrase matches.
Table of Contents
Part 1
What are n-grams?
Every Amazon advertiser reads their search term report: “silicone baking mat large,” “steel cookie sheet non stick,” “rubber oven mat heat resistant.” Decisions happen one term at a time — negate this, keep that, adjust this bid. And most advertisers miss the forest for the trees, because an entire layer of insight sits inside that data and only becomes visible when you break terms into their component words and aggregate performance across every appearance of each word.
That layer is n-gram analysis. An n-gram is simply a contiguous sequence of n words. A unigram is one word (“silicone”), a bigram is two consecutive words (“baking mat”), a trigram is three (“silicone baking mat”). Apply the idea to a search term report and you decompose every term into its word-level components, then sum spend, clicks, impressions, orders, and revenue across every search term containing each component.
Why does word-level analysis change everything? Because complete search phrases are often unique — searched once, never again. You can't make statistical decisions from one or two data points. But the words inside those phrases repeat constantly. “Steel” might appear in two hundred search terms; each spent a dollar or two; no single one flags as a problem. Collectively, they can burn hundreds with zero orders — invisible at the term level, obvious at the word level. One negative phrase match eliminates all of them in a single move.
Part 2
Why n-gram analysis works
Death by a thousand cuts — the real shape of waste
Most wasted spend doesn't come from a few big, obviously bad search terms. It comes from hundreds or thousands of low-spend, individually invisible terms sharing a common theme. Imagine a silicone baking mat seller with a 3,000-row search term report: the top 50 by spend get optimized, a few obvious irrelevants get negated, the cleanup feels done — while rows 51 through 3,000 hide 187 terms containing “steel,” each spending a dollar or five, none converting, adding up to real money every month. No amount of one-by-one scrolling reliably finds that.
| Standard search term review | N-gram analysis |
|---|---|
| Reads complete terms one by one | Breaks terms into words, aggregates all appearances |
| Sorts by spend — low-spend terms vanish from view | Surfaces patterns regardless of individual term spend |
| Negates single terms; new variations keep appearing | One negative phrase blocks all current and future variations |
| Slow, incomplete, whack-a-mole | Systematic, permanent cleanup |
Negative exact vs. negative phrase — the leverage
Negating an individual term uses negative exact: blocks that one search, nothing else. Tomorrow a slightly different variation of the same irrelevant theme triggers your ads again. But when n-gram analysis shows a word is categorically irrelevant, you apply a negative phrase — blocking every search, current and future, that contains it. Negative exact “steel baking mat” blocks one term; negative phrase “steel” blocks an entire theme. That's the difference between playing defense and playing offense.
What n-gram analysis is NOT for
Part 3
The step-by-step process
The complete workflow, from raw export to applied negatives:
Part 4
Building the analysis sheet
Excel, Google Sheets, Python, or a pre-built tool — the output structure is the same:
| N-gram | Type | Appearances | Clicks | Spend | Orders | ACOS | Read |
|---|---|---|---|---|---|---|---|
| steel | unigram | 187 | 412 | $612 | 0 | ∞ | 🚫 pure waste |
| stainless | unigram | 143 | 298 | $441 | 1 | 2,323% | 🚫 waste |
| metal | unigram | 94 | 189 | $277 | 0 | ∞ | 🚫 waste |
| silicone | unigram | 489 | 2,341 | $3,102 | 312 | 50% | ✅ working |
| baking | unigram | 521 | 2,189 | $2,891 | 287 | 50% | ✅ working |
| mat | unigram | 612 | 3,012 | $4,112 | 401 | 51% | ✅ working |
(Illustrative rows.) Read that table the way the method intends: “steel,” “stainless,” and “metal” — three words that would never jump out of a term-level report — collectively explain over $1,300 of spend with essentially zero return. Three negative phrases end it.
Three ways to build it
Spreadsheet: split each term with =SPLIT() or Text-to-Columns, build a master list of unique words, and aggregate with SUMPRODUCT + SEARCH — summing each metric for every row containing the word. Mind that SEARCH matches substrings (“mat” inside “material”); wrap the word in spaces for whole-word matching. Python: for scale — split each term, emit a row per n-gram, group-and-sum, export. Seconds of runtime on tens of thousands of rows. Tools: several PPC platforms now build this in; a good one shows aggregated metrics per n-gram (not a word cloud), filters by n-gram type, drills down to underlying terms, and exports. The tool doesn't matter — the methodology does.
| N-gram type | Best for | Risk |
|---|---|---|
| Unigrams | Broad irrelevant themes — materials, categories, genders | Higher — single words can over-negate |
| Bigrams | Specific irrelevant products or attribute pairs | Medium — more context, fewer false positives |
| Trigrams | Confirming very specific patterns | Low — targeted but misses broad patterns |
Part 5
Interpreting n-gram data
The three-column decision framework
| Spend | Orders | Relevant? | Action |
|---|---|---|---|
| High | Zero / very low | No | Negative phrase match — immediate |
| High | Zero / very low | Yes | Bid down — the word works, the price is wrong |
| High | High | Yes | Leave it / optimize bids — this is working |
| Low | Zero | No | Negate if easy — low priority cleanup |
| Low | Zero | Yes | Ignore — not enough data to act on |
The critical column is Relevant? — and that requires the human who knows the product. No automation answers “is this word fundamentally relevant to what we sell?” for you.
The drill-down — 30 seconds that prevents expensive mistakes
Before negating any n-gram, list the search terms containing it. The classic pattern: “glass” shows 78 appearances, $234 spend, 2 orders. Drill down and 76 of those terms are wrong-material searches — glass baking dish, glass cookie sheet, tempered glass cutting board — while two (“silicone mat for glass table”) are genuinely relevant. Verdict: negate, because two niche terms don't justify the waste. But sometimes the drill-down flips the call: if half the terms are relevant, don't negate the unigram — move to bigrams for the surgical version.
Ambiguous words
“Large” might matter to your large mat or attract searchers wanting something bigger than you sell. “Kids” is essential in kids' campaigns and poison elsewhere. For ambiguous words: move to bigrams (“large steel” is clearly wrong where “large” alone isn't), apply negatives at campaign or ad group level rather than account-wide, and when genuinely in doubt, don't negate — wasting a little on a borderline term beats killing a converting keyword.
Part 6
Creating negative phrase matches
The decision tree
Where to apply
| Level | When | Example |
|---|---|---|
| Account (negative keyword list) | Universally irrelevant — no product should show for it | “wholesale” for a B2C brand |
| Campaign | Wrong for every product in this campaign, fine elsewhere | “kids” in your adult-product campaign |
| Ad group | Wrong for this one product, fine for siblings | “small” in the large-size ad group of a mixed campaign |
Implementation hygiene
Deploy via bulk upload (campaign, ad group, keyword text, match type = negative phrase, state = enabled), or themed negative keyword lists for account-level words — “material negatives,” “category negatives,” “competitor negatives.” Double-check every entry: a typo in a negative phrase blocks the wrong traffic silently. And after upload, spot-check that the negatives actually applied.
Part 7
The patterns you'll find
After enough n-gram passes, the irrelevancy themes repeat across completely different products. These are the categories to expect:
| Pattern | What it looks like |
|---|---|
| Material mismatch | You sell silicone; searches carry steel, metal, glass, ceramic, wooden. The most common and usually the biggest win |
| Category drift | You sell baking mats; searches bring yoga mat, car mat, door mat. Bigram negatives are the fix |
| Size / spec mismatch | “Commercial,” “industrial,” “mini” — searchers want a fundamentally different grade than you sell |
| Gender / age mismatch | “Men's” on women's products; “kids” on adult products; “baby” below your age range |
| Brand leakage | Competitor names in your terms — negate the ones you'll never convert on (strong-loyalty brands) |
| Intent mismatch | “How to,” “DIY,” “recipe” — informational traffic that rarely buys |
| B2B / B2C mismatch | “Wholesale,” “bulk,” “supplier” hitting a B2C listing — or the reverse |
The dog-food version of the species problem makes the drill-down rule vivid: “cat,” “bird,” “hamster” are safe unigram negatives for a dog food brand — but “fish” is a trap, because “fish flavor dog food” is relevant while “fish tank” is not. The n-gram flagged the word; the drill-down saved the converting terms; bigram negatives (“fish food,” “fish tank”) removed the waste surgically. The data gives you candidates; judgment makes the call. And the waste isn't always about wrong products — wrong contexts show up too: “office” and “commercial” on kids' furniture, “outdoor” on indoor-only lines, “vintage” on a modern brand.
Part 8
Cadence, maintenance, and the positive side
How often to run it
| Account stage | Frequency | Why |
|---|---|---|
| New account / onboarding | Day one | Inherited accounts are full of entrenched waste patterns — the first pass finds the most |
| First 3 months | Monthly | New campaigns are ramping; catch patterns before they accumulate |
| Steady state | Quarterly | New waste slows after cleanup; quarterly catches seasonal shifts and new products |
| After major changes | 2–4 weeks later | New launches, campaigns, or big bid changes invite new irrelevant traffic |
The first analysis on any account is always the most impactful — patterns that have been leaking money for months or years, invisible at term level. Every pass after finds less. That's the method working.
Advanced tactic — bigram layering
When a unigram is too broad to negate but several bigrams built on it are all wrong, layer them: you sell baking mats, “rack” is too broad (cooling rack matters), but dish rack, wine rack, spice rack, shoe rack, towel rack are all wrong. Five bigram negatives approximate the unigram without the false-positive risk.
Advanced tactic — cross-campaign comparison
Run the analysis separately on brand, non-brand, and competitor campaigns. You'll find brand campaigns picking up competitor names (negate them there), non-brand campaigns picking up your own brand (negate to keep data clean), and competitor campaigns leaking generic terms (tighten). It's the audit that verifies your brand/non-brand separation is actually holding.
The positive side — discovery
The same table that finds waste finds strength. N-grams with high orders and low ACOS are your best-converting word themes — are you running exact keywords on them? High impressions with low clicks flag themes where your images and title aren't earning the click. New n-grams that didn't exist last quarter can flag emerging demand worth getting ahead of.
The principles that make it work: aggregate, don't isolate — individual terms lie, aggregated words tell the truth. Relevancy is the only negation criterion. Phrase match is the power tool. Always drill down before negating. Start broad, get specific. One negative phrase, found through n-grams, can cut more waste than a month of manual review — and if you'd like that first pass run on your search terms, the diagnosis is free.
Want this run on your account instead? The first diagnosis is free.
Book Free Consultation