Free Guide

The N-Gram Analysis Guide for Amazon PPC

The methodology most agencies don't know exists. Find hidden waste patterns in your search terms, build surgical negative keywords, and slash ACOS

By The AdLabs Team 25 min read 8 Parts

The Hidden Layer of Your Search Terms

Every Amazon advertiser looks at their search term reports. They see individual search terms like "silicone baking mat large," "steel cookie sheet non stick," "rubber oven mat heat resistant," and they make decisions one term at a time. Negate this one. Keep that one. Adjust this bid.

And most of them miss the forest for the trees.

There's an entire layer of insight sitting inside your search term data that becomes visible only when you drill down to the root words within your search terms, break those terms apart into their individual word components, and aggregate performance across all appearances of each word. That layer is called n-gram analysis.

It's not new. Computational linguists have used n-grams for decades. Google built their search engine on n-gram indexing. But in the Amazon PPC world? Almost nobody does this. Most agencies, most sellers, most software. They're all making decisions at the search term level and leaving massive patterns completely invisible.

N-gram analysis doesn't show you what you already know. It reveals the patterns you can't see at the individual search term level: the words that are silently draining your budget across hundreds of terms.

This guide walks you through the complete methodology: what n-grams are, why the approach works, how to build the analysis from scratch, how to interpret the data, and exactly how to turn your findings into negative phrase match keywords that slash wasted spend.

If you've ever felt like you're playing whack-a-mole with irrelevant search terms (negating one, only to see three more pop up), this is the guide that fixes that.

What Are N-Grams?

The Basic Concept

An n-gram is simply a contiguous sequence of n items from a given text. In our context, the items are words, and the text is your Amazon search terms.

When you apply n-gram analysis to your Amazon search term report, you're decomposing every search term into these word-level components, then aggregating all performance metrics (spend, clicks, impressions, orders, revenue) across every search term that contains each component.

Visual: How a Search Term Breaks Down

Unigram Decomposition
"stainless steel water bottle insulated"
↓ Break into individual words ↓
stainless steel water bottle insulated
Each word becomes a unigram. Now aggregate performance across ALL search terms containing each word
Bigram Decomposition
"stainless steel water bottle insulated"
↓ Break into consecutive word pairs ↓
stainless steel steel water water bottle bottle insulated
Two-word combinations reveal more specific patterns. "stainless steel" as a phrase tells a clearer story than either word alone

Why Word-Level Analysis Changes Everything

Here's the problem with standard search term analysis: you're looking at complete phrases. And complete phrases are often unique, searched once or twice, never seen again. You can't make statistical decisions from one or two data points.

But the words inside those phrases? They repeat constantly. The word "steel" might appear in 200 different search terms in your report. Individually, each search term spent $0.50–$3.00. No single one would flag as a problem. But collectively, every search containing "steel" spent $400 with zero orders because you sell silicone products and every steel search is fundamentally irrelevant.

That's the entire point of n-gram analysis: it aggregates performance at the word level, making patterns visible that are completely invisible at the search term level. One word, applied as a single negative phrase match, can eliminate hundreds of irrelevant search terms in one move.

Why N-Gram Analysis Works

The "Death by a Thousand Cuts" Problem

Most wasted spend on Amazon doesn't come from a few big, obviously bad search terms. It comes from hundreds or thousands of low-spend, individually-invisible terms that share a common theme.

Here's what that looks like in practice. Imagine you sell silicone baking mats. Your search term report has 3,000 rows. You sort by spend. The top 50 terms are mostly relevant and you optimize bids. You look for obvious irrelevant terms and negate a few. You feel good about your cleanup.

But buried across rows 51–3,000 are 187 search terms that all contain the word "steel." Each one spent $1–$5. None converted. The total? $612 in pure waste. You'd never find this by scrolling through search terms one by one.

❌ Standard Search Term Review
👁️ Looks at complete search terms one by one
📊 Sorts by spend, misses low-spend terms entirely
🎯 Negates individual terms, new variations keep appearing
⏱️ Time-consuming, incomplete, whack-a-mole
✅ N-Gram Analysis
🔬 Breaks terms into words, aggregates across ALL appearances
📊 Surfaces hidden patterns regardless of individual spend
🎯 One negative phrase match blocks ALL current and future variations
⚡ Fast, systematic, permanent cleanup

Negative Exact vs. Negative Phrase: The Key Distinction

This is where the real leverage of n-gram analysis comes in. When you negate an individual search term, you use negative exact match, which blocks that one specific search and nothing else. Tomorrow, a slightly different variation of the same irrelevant theme will trigger your ads again.

When you identify a word or phrase through n-gram analysis that is categorically irrelevant to your product, you apply a negative phrase match. This blocks every search term, current and future, that contains that word or phrase.

The Leverage Difference
Negative Exact "steel baking mat" → blocks 1 search term
Negative Phrase "steel" → blocks ALL searches containing "steel"

That's the difference between playing defense and playing offense. N-gram analysis is how you find the words that deserve negative phrase match treatment.

When N-Gram Analysis Doesn't Help

Let's be clear about what this methodology is and isn't. N-gram analysis is specifically for finding irrelevant themes in your search traffic. It's not for:

💡 The Relevancy Rule Still Applies

N-gram analysis doesn't change the fundamental negation principle: the only criteria for negating is irrelevancy. If a word is relevant but underperforming, the answer is bid adjustment, not negation. N-grams help you find irrelevant words faster and more comprehensively, but the judgment call is still yours.

The Step-by-Step Process

Here's the complete workflow from raw search term data to applied negative keywords. We'll cover each step in detail.

1Export Search Term Report
2Clean & Prepare Data
Remove branded terms, low-data rows, duplicates
3Break Search Terms into N-Grams
Split every term into unigrams, bigrams, and trigrams
4Aggregate Metrics per N-Gram
Sum spend, clicks, impressions, orders for each word/phrase
5Analyze & Identify Patterns
High spend + zero/low orders + irrelevant = candidate
6Create Negative Phrase Match Keywords
Apply to campaigns. One phrase blocks all variations
7Validate & Monitor
Check for false positives, monitor ACOS impact

Step 1: Export Your Search Term Report

Amazon Advertising console showing the Sponsored Products search term report configuration with report type, country, and date range settings.
The Sponsored Products search term report configuration in the Amazon Advertising console: your starting point for n-gram analysis. Download 60–90 days of data to ensure enough volume for statistically meaningful patterns.

Pull your search term report from the Amazon Advertising console or via the API. Use a date range with enough data for statistical significance, typically 60–90 days for most accounts, 30 days for high-spend accounts.

The columns you need:

💡 Scope Matters

You can run n-gram analysis at the account level, category level, or individual campaign level. Account-level gives you the broadest patterns. Campaign-level lets you find product-specific irrelevancy. Start at the account or category level for the biggest wins, then narrow down as needed.

Step 2: Clean and Prepare the Data

Before you break anything into n-grams, clean up the dataset:

  1. Remove your own brand terms. You're not going to negate your own brand name. Filter them out so they don't pollute the analysis.
  2. Remove Product Targeting rows. Search terms that are ASINs (B0XXXXXXXXX) aren't keyword-based and shouldn't be in this analysis.
  3. Deduplicate. If the same search term appears across multiple campaigns, aggregate the metrics into one row before proceeding. You want to see total performance per search term, not fragmented per campaign.
  4. Filter out very low-data rows (optional). Terms with 1 impression and 0 clicks add noise without insight. Consider a minimum threshold of 1+ clicks.

Step 3: Break Search Terms into N-Grams

This is the core transformation. Every search term in your cleaned dataset gets split into its component words (unigrams), word pairs (bigrams), and word triplets (trigrams).

Complete Breakdown Example
"silicone baking mat for cookies"
Unigrams (1-grams)
silicone baking mat for cookies
Bigrams (2-grams)
silicone baking baking mat mat for for cookies
Trigrams (3-grams)
silicone baking mat baking mat for mat for cookies

Each n-gram inherits the full metrics of its parent search term. If "silicone baking mat for cookies" had 15 clicks and $12 in spend, then every unigram, bigram, and trigram from that term gets credited with those same 15 clicks and $12 in spend.

🔑 Key Insight: The Metrics Are Additive

When you aggregate, each n-gram's totals represent the sum of metrics from every search term it appeared in. The word "steel" might appear in 200 search terms. Its aggregated row shows the total spend, total clicks, and total orders from all 200 of those search terms combined. That's the power: you're seeing collective impact, not individual fragments.

Building the N-Gram Analysis Sheet

Whether you use Excel, Google Sheets, Python, or a dedicated tool (like AdLabs) 😉 the output structure is the same. Here's exactly how to build it.

The Output Table Structure

N-GramTypeAppearancesImpressionsClicksSpendOrdersRevenueACOS
steelUnigram18714,230412$612.400$0∞
stainlessUnigram14310,891298$441.201$18.992,323%
metalUnigram946,412189$276.800$0∞
largeUnigram31228,410891$1,312.5042$838.58156%
siliconeUnigram48952,1002,341$3,102.40312$6,240.0050%
bakingUnigram52148,9202,189$2,891.10287$5,740.0050%
matUnigram61261,2003,012$4,112.00401$8,020.0051%

Look at that table. "steel," "stainless," and "metal", three words that individually might not jump out in a search term report, are collectively responsible for $1,330 in wasted spend with essentially zero returns. Three negative phrase matches will eliminate all of it.

Building This in Excel / Google Sheets

This works in any spreadsheet. It's not elegant, but it gets the job done.

  1. Paste your cleaned search term data into Sheet 1. Columns: Search Term, Impressions, Clicks, Spend, Orders, Revenue.
  2. In a helper column, use formulas to split each search term into individual words. In Google Sheets: =SPLIT(A2, " ") will split a cell's text across columns by space.
  3. Create a master word list. Collect all unique words that appeared across all search terms into a single column in Sheet 2.
  4. For each unique word, use SUMPRODUCT to aggregate metrics. Example for summing spend where a search term contains the word:
    =SUMPRODUCT((ISNUMBER(SEARCH(D2, Sheet1!$A$2:$A$5000))) * Sheet1!$D$2:$D$5000)
    This sums the "Spend" column for every row where the search term contains your target word.
  5. Copy across for all metrics: Impressions, Clicks, Spend, Orders, Revenue.
  6. Calculate ACOS = Spend / Revenue.
  7. Sort by Spend descending and start analyzing.

Limitations: SEARCH is case-insensitive but will match partial words ("mat" matches "material"). For precise matching, wrap with spaces: SEARCH(" "&D2&" ", " "&Sheet1!A2&" ").

If you manage multiple accounts or have large datasets, Python is the way to go. Here's the logic:

Python Pseudocode
1. Load search term CSV into a DataFrame
2. For each search term:
   a. Split into words
   b. Generate unigrams, bigrams, trigrams
   c. For each n-gram, append a row:
      {ngram, type, impressions, clicks, spend, orders, revenue}
3. Group by n-gram → sum all metrics
4. Add count column (number of search terms containing this n-gram)
5. Calculate ACOS = spend / revenue
6. Sort by spend descending
7. Export to CSV

This takes seconds to run on datasets with tens of thousands of rows. The grouped output is your analysis table, ready for human review.

Several Amazon PPC tools have n-gram functionality built in. When evaluating them, make sure they:

  • Show you the aggregated metrics per n-gram (not just a word cloud)
  • Let you filter by n-gram type (unigrams, bigrams, trigrams separately)
  • Allow you to see which search terms each n-gram appeared in (drill-down)
  • Support export so you can do your own analysis

The tool doesn't matter. What matters is the methodology. If you understand the process, you can apply it with any tool or build your own.

Unigrams vs. Bigrams vs. Trigrams: Which to Focus On

N-Gram TypeBest ForRisk LevelExample
UnigramsFinding broad irrelevant themes (materials, categories, genders)Higher (single words can over-negate)"steel" for a silicone seller
BigramsFinding specific irrelevant product types or attributesMedium (more context, fewer false positives)"stainless steel" for a silicone seller
TrigramsConfirming very specific patternsLower (very targeted but may miss broader patterns)"stainless steel rack" for a silicone seller

Start with unigrams. They give you the broadest view and biggest immediate wins. Use bigrams to confirm patterns and get more specific when a unigram is too broad to negate safely. Trigrams are useful for validation but rarely where you'll find your primary negatives.

✦ ADLABS FEATURE

Automated Keyword Harvesting & Negation — With Criteria That Actually Make Sense

AdLabs surfaces n-gram patterns in your search term data automatically — showing you which words are draining spend across hundreds of terms. Find the negative phrase matches that matter, applied in bulk, without rebuilding a spreadsheet every month.

Try Free →
AdLabs keyword harvesting and negation

Interpreting N-Gram Data

The Three-Column Decision Framework

When you're staring at your n-gram table sorted by spend, every row falls into one of three categories. The decision process is simple:

SpendOrdersRelevant?Action
HighZero/Very LowNoNegative Phrase Match, immediate action
HighZero/Very LowYesBid down (the word is relevant but bids are too high)
HighHighYesLeave it / Optimize bids (this is working)
LowZeroNoNegate if easy, low priority but clean it up
LowZeroYesIgnore, not enough data to act on

The critical column is "Relevant?", and that requires human judgment. This is not something you automate. You, the person who knows the product, looks at each high-spend n-gram and asks: "Is this word fundamentally relevant to what I sell?"

🚩 The Cardinal Sin: Negating Based on ACOS Alone

High ACOS does not mean irrelevant. A unigram showing 200% ACOS might contain a mix of relevant and irrelevant search terms. If you negate the word entirely, you'll kill the relevant traffic too. Always drill down. Look at the actual search terms containing that n-gram before making a decision. The question is never "is this profitable?" It's "is this relevant?"

The Drill-Down: From N-Gram to Search Terms

Before you negate any n-gram, drill down into the search terms that contain it. This is your sanity check.

Drill-Down Example: The Word "Glass"
N-Gram: "glass" | 78 appearances | $234 spend | 2 orders
↓ What search terms contain "glass"? ↓
Search TermClicksSpendOrdersRelevant?
glass baking dish12$18.400❌ Wrong material
glass cookie sheet8$11.200❌ Wrong material
tempered glass cutting board6$9.600❌ Wrong product
glass mat for oven9$14.100❌ Wrong material
silicone mat for glass table4$5.802✅ Relevant
76 of 78 search terms are irrelevant (wrong material). 2 are relevant but niche. Verdict: Negate "glass" because the 2 relevant terms don't justify $228 in waste.

This drill-down step is essential. It takes 30 seconds per n-gram but prevents costly mistakes. If you find that 50%+ of the search terms containing an n-gram are actually relevant, don't negate the unigram. Instead, look at bigrams for a more targeted negative, or negate individual search terms.

Handling Ambiguous Words

Some words are tricky. "Large" might be relevant for your large baking mat but irrelevant because searchers want something bigger than you sell. "Kids" might be relevant for your kids' products but irrelevant in other campaigns.

For ambiguous words:

🔑 The 80/20 Rule of N-Grams

You'll typically find 80% of your wasted spend concentrated in the top 10–15 irrelevant n-grams. Don't try to clean up every single word. Focus on the high-spend, clearly-irrelevant patterns first. The marginal returns drop off fast after the big wins.

Creating Negative Phrase Match Keywords

The Decision Tree

You've identified your n-gram candidates. Now, for each one, follow this decision process:

Is the n-gram categorically irrelevant to your product?
Would ANY search containing this word be irrelevant?
If YES ↓
Apply as Negative Phrase Match
Blocks all current & future search terms containing this word
Is the n-gram irrelevant only in combination with other words?
The word alone is fine, but paired with X it's always irrelevant
If YES ↓
Use the bigram as your negative phrase
e.g., "stainless steel" instead of just "steel" if "steel wool" is relevant
Is the n-gram relevant to some products but not others?
If YES ↓
Apply negative at the ad group or campaign level, not account-wide
Blocks it where irrelevant, preserves it where it converts

Where to Apply: Campaign vs. Ad Group vs. Account

LevelWhen to UseExample
Account (Negative Keyword List)Universally irrelevant. No product in your account should show for this word"wholesale" for a B2C brand
Campaign LevelIrrelevant for all products in this campaign but potentially relevant elsewhere"kids" in your adult product campaign
Ad Group LevelIrrelevant for this specific product but relevant for other products in the same campaign"small" in your large-size product ad group (in a campaign with both sizes)

Building the Bulk Upload

Once you've finalized your negative keywords list, implement them efficiently via bulk upload:

  1. Create a spreadsheet with columns: Campaign Name, Ad Group (if ad-group-level), Keyword Text, Match Type (Negative Phrase), State (Enabled).
  2. For account-level negatives, use Negative Keyword Lists in the Amazon Ads console. Create themed lists: "Material Negatives," "Category Negatives," "Competitor Negatives."
  3. Double-check every entry. A typo in a negative phrase match can block relevant traffic. Slow is smooth, smooth is fast.
  4. Upload and verify. After uploading, spot-check a few campaigns to confirm the negatives are applied correctly.
⚠️ Common Mistake: Negative Broad Match Confusion

Amazon does NOT support negative broad match. Your only options for negatives are negative exact and negative phrase. Negative phrase blocks any search term that contains your phrase in order. This is exactly what you want for n-gram-based negation. Don't confuse this with the broad match behavior of positive keywords. The mechanics are completely different.

Real-World Examples & Case Studies

Case Study 1: Silicone Kitchen Products — "The Material Mismatch"

A brand selling silicone baking mats, silicone spatulas, and silicone trivets. Their auto and broad match campaigns were generating clicks from people searching for metal, glass, steel, and wooden kitchen products.

The N-Gram Findings

N-GramSearch TermsSpendOrdersACOSAction
steel187$6120∞Neg. Phrase
wooden94$3120∞Neg. Phrase
metal112$28712,870%Neg. Phrase
glass78$23421,170%Neg. Phrase
ceramic43$1280∞Neg. Phrase
cast iron61$1980∞Neg. Phrase

Total wasted spend identified: $1,771/month
Negatives applied: 6 negative phrase matches
Result: ACOS dropped 2.3 percentage points in the first month. The same budget now concentrated entirely on relevant silicone-related traffic.

Six words. That's all it took to eliminate nearly $1,800 in monthly waste across hundreds of search terms. Each individual search term was spending pennies. No standard analysis would have caught this. The n-gram analysis made the pattern obvious in minutes.

Case Study 2: Premium Dog Food — "The Species Problem"

A brand selling premium grain-free dog food. Their broad match campaigns were leaking into cat food, bird food, and other pet categories.

N-GramSearch TermsSpendOrdersAction
cat234$8913Neg. Phrase
bird67$2010Neg. Phrase
rabbit31$940Neg. Phrase
fish89$2671Drill down first*
hamster18$540Neg. Phrase

*Note on "fish": The drill-down revealed that some "fish" search terms were relevant ("fish flavor dog food," "salmon fish dog food"). The n-gram alone wasn't safe to negate. Instead, they used bigram negatives: "fish food" and "fish tank" blocked the irrelevant traffic while preserving the relevant fish-flavor searches.

💡 This Is Why You Always Drill Down

"Fish" looked like a clear negate at the unigram level. But the drill-down saved them from blocking converting keywords. The bigram approach ("fish food" and "fish tank" as negative phrases) was the surgical solution. N-gram analysis gives you the data; human judgment makes the call.

Case Study 3: Kids' Furniture — "The Age & Gender Patterns"

A brand selling kids' bedroom furniture. N-gram analysis revealed several waste patterns that weren't obvious from standard review:

N-GramSearch TermsSpendOrdersInsight
adult156$4670Wrong demographic entirely
office89$3120Commercial furniture, not kids'
outdoor72$2180They sell indoor furniture only
vintage43$1340Style mismatch (they sell modern)
industrial38$1120Style mismatch

Key takeaway: The waste wasn't just about wrong products. It was about wrong contexts. Age, location (indoor vs. outdoor), and style preferences all create irrelevant traffic patterns that only surface through n-gram aggregation.

Material Mismatches

You sell silicone, searches include "steel," "metal," "glass," "ceramic," "wooden." Or vice versa. This is the most common pattern and usually the biggest win.

Category Drift

You sell baking mats, searches include "yoga mat," "car mat," "door mat." The word "mat" connects you to unrelated categories. Bigram negatives like "yoga mat" or "car mat" are the solution.

Size / Spec Mismatches

"Commercial," "industrial," "professional," "mini": when your product is a specific size or grade and searchers want something fundamentally different.

Gender / Age Mismatches

"Men's" when you sell women's products. "Kids" when you sell adult products. "Baby" when your minimum age is 3+.

Brand Leakage

Competitor brand names appearing in your search terms. If they're spending significant amounts, negate competitor brand names you'll never convert on (typically very strong brands with high loyalty).

Intent Mismatches

"How to," "DIY," "recipe," "review": informational searches that rarely convert to purchases. Usually low spend individually but can add up.

B2B / B2C Mismatches

"Wholesale," "bulk order," "commercial," "supplier": when you're B2C and getting B2B traffic, or vice versa.

✦ ADLABS FEATURE

See Where Your Spend Is Going — Before It Becomes Waste

AdLabs dashboards track TACOS, ACOS by tactic, and search term performance — so you can monitor the impact of your n-gram negations and confirm that waste is actually dropping over time, not just shifting to different irrelevant terms.

Try Free →
AdLabs spend reporting

Cadence, Maintenance & Advanced Tactics

How Often to Run N-Gram Analysis

N-gram analysis isn't a one-time exercise, but it's also not something you need to run weekly. The ideal cadence depends on your account's lifecycle:

StageFrequencyWhy
New Account / OnboardingImmediately (day 1)Biggest wins come from the initial cleanup. Inherited accounts are usually full of waste patterns.
First 3 MonthsMonthlyAs new campaigns ramp up, new patterns emerge. Monthly catches them before they accumulate.
Steady StateQuarterlyAfter initial cleanup, the rate of new waste patterns slows significantly. Quarterly is enough to catch seasonal shifts and new product additions.
After Major Changes2–4 weeks afterNew product launches, new keyword campaigns, or major bid changes can introduce new irrelevant traffic patterns.

The first n-gram analysis on a new account is always the most impactful. You'll find patterns that have been wasting money for months or years. Patterns that nobody caught because they were invisible at the search term level. After that initial cleanup, each subsequent analysis finds less, but it's still worth doing quarterly to stay clean.

Advanced Tactic: Bigram Layering

Sometimes a unigram is too broad to negate, but multiple bigrams using that word are all irrelevant. You can "layer" bigram negatives to achieve near-unigram coverage without the false-positive risk:

Bigram Layering Example
Unigram "rack" is too broad to negate (you sell baking mats, but "cooling rack" is relevant)
↓ Instead, negate these bigrams ↓
dish rack wine rack spice rack shoe rack towel rack
Five bigram negatives block the waste while preserving "cooling rack for baking," a relevant term

Advanced Tactic: Cross-Campaign N-Gram Comparison

Run n-gram analysis separately on your branded vs. non-branded vs. competitor campaigns. You'll often find:

This cross-campaign view reinforces the strategic separation of brand, non-brand, and competitor, and n-gram analysis is the audit tool that ensures the separation is actually working.

Advanced Tactic: N-Gram Discovery (The Positive Side)

While the primary use of n-gram analysis is finding waste, the same technique can reveal opportunities. Look for n-grams with:

🔑 N-Grams Work Both Ways

The same analysis that finds waste also reveals your strongest converting themes. If "organic" appears in 300 search terms and consistently converts at 15% ACOS, that tells you exactly what shoppers value about your product, and where to double down in your listing copy, A+ content, and keyword targeting.

See What Others Can't

Most Amazon advertisers are making keyword decisions with blinders on. They look at search terms one by one, chase high-ACOS terms, negate sporadically, and wonder why their wasted spend never seems to go down. Meanwhile, the real patterns (the words and phrases that silently connect hundreds of irrelevant search terms) stay completely hidden.

N-gram analysis removes the blinders. It's not a magic trick. It's not proprietary technology. It's a systematic way of looking at the same data everyone has access to, but seeing what almost nobody sees.

One negative phrase match keyword, identified through n-gram analysis, can eliminate more wasted spend than a month of manual search term review.

The Principles That Make It Work

If you've been managing Amazon PPC without n-gram analysis, you've been leaving money on the table. Now you know how to pick it up.

This guide is based on years of managing hundreds of Amazon advertising accounts, combined with research from That Amazon Ads Podcast and That Amazon Ads Masterclass.