DEV Community

Scott Windon
Scott Windon

Posted on

I Built a Chrome Extension to Mine Autocomplete Search for Niche Analysis

Autocomplete Mining GitHub Repository

Whenever I am researching a new project, product angle, or content idea, the best source of truth is search autocomplete.

Whether it is Google, Amazon, Etsy, or YouTube, the autocomplete dropdown tells you what real people are actually typing into the search bar right now. It is unfiltered user intent.

The problem is doing it manually. You type your seed term, hit space, type a, write down what shows up, delete it, type b, and repeat that across 26 letters and numbers. It gets tedious after about three letters, and most dedicated keyword tools out there are either bloated, expensive, or give you stale third-party database records instead of live results.

I wanted something dead simple that sat right in my browser, ran through A to Z automatically, and gave me clean Markdown so I could dump the results straight into an LLM for niche analysis.

So I built Autocomplete Mining as a Manifest V3 Chrome extension. Here is how it works and how I put it together.

What It Does

The extension docks in Chrome's side panel right next to your active tab.

  1. You open Google, Amazon, Etsy, or YouTube.
  2. The side panel automatically detects the platform.
  3. You enter a seed keyword (e.g. leather wallet or podcast setup).
  4. Hit Mine Now.

The extension systematically types the seed term plus every letter from a to z (and optionally 0 to 9), grabs the live suggestion dropdown on the page, deduplicates the results, and displays progress in real time.

You can run it in suffix mode (keyword + a) or prefix mode (a + keyword), pause or resume whenever you want, and grab the data instantly.

A few interesting problems came up while building it:

1. Hybrid DOM and Background Fallback

Sites render their autocomplete dropdowns differently. On Google, typing directly into the input fires instant input events that spawn role-based listbox elements. But on some networks or heavy SPAs, DOM rendering can lag or get hidden behind overlays.

To solve this, the miner uses a hybrid approach:

  • It first attempts to focus the search input, dispatch proper input events, and grab the suggestions straight from the DOM.
  • If the DOM returns empty or fails to mount within a timeout, it falls back to background fetch calls against the platform's suggestion endpoints.

This means the extension never gets stuck on a blank letter.

2. Sanitising Edge-Case Data

Different search bars have weird quirks. For example, YouTube frequently shortens autocomplete suggestions by replacing the typed query with an ellipsis:

... tutorial for beginners
... review 2026
Enter fullscreen mode Exit fullscreen mode

If you extract that text blindly, you end up with useless fragments. The miner sanitises YouTube responses by stripping the leading ellipsis and prepending the actual query back onto the suggestion, giving you full long-tail phrases.

On Etsy, the search box mixes in shop names and "trending now" items that aren't keyword suggestions. Those get filtered out before the deduplication step.

3. Turning Mined Data Into Niche Intelligence

Getting 150 to 250 autocomplete queries is useful, but categorising them manually takes time.

I added an Analyse with AI feature. Once a run finishes, the extension builds a structured prompt that feeds the entire mined dataset into an AI chat (Claude, ChatGPT, Gemini, Perplexity, DeepSeek, Copilot, or Grok).

The prompt automatically tailors its analysis based on the platform:

  • Google: Maps search intent (informational vs transactional) and identifies featured snippet questions.
  • Amazon: Identifies product bundles, variations, accessory pairings, and PPC target keywords.
  • Etsy: Highlights gift angles, personalisation opportunities, and listing tag combinations.
  • YouTube: Suggests video titles, high-CTR thumbnail hooks, and viewer questions.

One click copies the prompt to your clipboard and opens the chat tab ready to go.

4. Clean Markdown Export

Once mining finishes, you can copy the full output as structured Markdown:

# Autocomplete Mining: "leather wallet"

| Attribute | Details |
| :--- | :--- |
| **Platform** | Amazon |
| **Seed Keyword** | `leather wallet` |
| **Total Unique Suggestions** | 184 |

## A
- leather wallet airtag
- leather wallet slim
- leather wallet men

## B
- leather wallet bifold
- leather wallet black
...
Enter fullscreen mode Exit fullscreen mode

You can also export to CSV or grab a plain newline-separated keyword list.

Wrapping Up

Building this as a native Chrome side panel extension turned out to be the cleanest workflow. It stays out of the way of the page, lets you watch the live suggestions populate, and turns five minutes of manual search bar tapping into a 15-second background task.

Next up, I am looking at adding depth mining (taking the top results and running a second layer of A-Z queries on them automatically).

If you are doing market research or SEO, digging into raw autocomplete data is still one of the fastest ways to find what people actually care about.

Grab the source code or load it unpacked into Chrome from GitHub: swindon/autocomplete-mining-chrome-ext

Top comments (1)

Collapse
 
ace_bl profile image
Ace •

Turning the tedious A to Z autocomplete routine into a side panel that just runs is such a satisfying fix for a real annoyance. Outputting clean Markdown so you can drop results straight into your analysis is a thoughtful touch too. It's a great example of building the tool you wish existed. Which platform has surprised you most with what people are actually searching for?