Automating Market Research Without AI: Often the Better Call
An n8n workflow turns 400+ search terms into a deduplicated provider database with plain JavaScript instead of a vision model. Why that worked better.
· 7 min
Automating market research at scale doesn't need AI. In my case it even worked better without it.
The workflow that runs today pulls public search results for 400+ search terms per run. From those it builds a clean, deduplicated database of providers, without a vision model reading pages and without an LLM parsing text. It runs entirely on rules, with plain JavaScript.
That's not how the workflow started, though. The first version worked with AI and failed for reasons that are easy to explain in hindsight. The lesson goes beyond this one workflow. The reflex right now is to reach for an AI model first and only then ask whether the task even needs one. Sometimes the more boring tool wins, and it pays to know in which situations that happens before you build the expensive version.
Why manual research tips over at a few hundred keywords
A team wanted to know, on an ongoing basis, which providers show up for a particular market and which of them look like real prospects. The information itself isn't hard to find, it's public: search results, directories, vertical portals.
Going through ten keywords by hand once is still doable. An afternoon with open browser tabs gets you a usable list. The problem starts with volume. With dozens of results per keyword, someone has to open every single one, identify the provider and check it against everything already on the list.
At 400 to 500 keywords and several thousand results per run, that math stops working. Keeping the list current would take a small team of its own, and by the time anyone finished a pass, the first results would be long out of date.
The first attempt: a vision model that failed on real data
My first approach used a vision model. I took screenshots of the result pages, sent the images to the model and asked it to extract provider names and fields. That sounded plausible, because the pages weren't uniform HTML I could simply pattern-match against, or at least that's what I thought.
The approach didn't survive contact with real data. The model hallucinated entries, made up provider names that weren't on the page at all, swapped fields between neighboring listings and simply dropped whole rows. The same site renders its results as a carousel, a sidebar or a grid depending on the view. The model just couldn't keep up with layouts that kept shifting under it.
So I rebuilt the workflow around a fact I'd overlooked: the source data already has structure. It's HTML. A JavaScript parser that looks for fixed patterns in the markup always returns the same result, however the page happens to render, with no token costs, no hallucination risk and no need for a model to have a good day.
If you want to take a quick look at what's actually inside an HTML snippet like that, my HTML preview tool does it without setting up a project.
Put more generally: I reach for a model when a step really needs judgment, meaning interpreting free text, weighing ambiguous cases or phrasing something in natural language. When the input already has a schema, though, a rule-based parser usually beats a language model on cost, speed and reliability. I wrote up the bigger picture in more detail in my comparison of AI assistants and AI agents, in case that interests you.
The setup: collect first, then merge
The workflow runs in two phases with a staging store in between. That way collecting and analyzing can run independently of each other, and fail independently too. In the end this separation turned out to matter more than either phase on its own.
Phase one collects and extracts. It works through the keywords in batches, sticks to API limits along the way and pulls the relevant fields out of every result page. The requests go through residential proxies, because quite a few sites block anything that looks automated, and a cookie banner handler runs first so the content underneath is reachable at all.
Phase two aggregates, deduplicates and enriches. It reads from the staging store, not live from the source, so a slow or failed collection run can't skew the analysis. If you're looking for more starter workflows in this pattern, you'll find a few in the five beginner n8n workflows for marketing. And if the platform question is still open, my comparison of n8n and Make.com is worth a read.
Where the real work is
Writing the parser was the easy part, an afternoon's work. Almost all the remaining time went into edge cases that only showed up when I scaled the workflow from a handful of test keywords to the full 400+.
The index problem
Under ten results, everything stayed clean. As soon as a batch came back with gaps, whether from timeouts, blocked requests or empty responses, false duplicates appeared out of nowhere. If nine out of ten requests in a batch succeed, the array shifts by one, and the results for keyword six quietly land under keyword five. The whole mapping breaks without an error showing up anywhere.
The fix was to stop trusting the array position at all. Every result is tied to its original keyword through an explicit reference, not through the index. That way a result always knows which keyword and which row it belongs to, no matter how many neighboring requests failed.
The duplicate problem
A single provider often shows up more than once, once through its own account, once through a partner channel, sometimes both at the same time for different products. Deleting one of the two rows costs real information, namely the partner attribution.
Fixing the index problem largely solved this one too. My approach is called cluster-and-enrich: I group every entry for a provider, pick a master record from it, with the most direct entry winning, and take over from the rest of the group the fields the master is missing. That's how I merge two entries for the same provider instead of throwing one away.
Fuzzy duplicates
Tiny differences wreck clean grouping before it even starts. Example GmbH and Example GmbH with a trailing space count as two separate providers, and capitalization and the odd special character cause the same problem.
So I normalize consistently before I group anything: lowercase everything, remove whitespace, remove special characters. Variants of the same name written differently end up in the same group instead of two separate ones.
API limits
Several sites flatly reject automated requests unless they go through residential proxies. The workflow has to accept cookie banners programmatically before any content becomes visible at all. And export APIs usually reject strings beyond a certain length, so a single long tracking URL or a scrap of HTML markup is enough to crash the whole export. That's why I check every field for length and clean it up before writing it.
What surprised me most was how much of the difficulty was reliability at scale, not the extraction logic itself. Getting the parser running took an afternoon. Getting 400+ keywords and several thousand rows through cleanly on every run took weeks.
What runs in production
The workflow runs on n8n, with JavaScript, residential proxies and Google Sheets as the delivery layer. One person built it over about four weeks, and it's been running in production since. Every run processes 400+ keywords and delivers a clean provider list by email, with no duplicates.
The partner attribution is kept where a provider shows up through more than one channel. On top of that come direct links to each provider's profile and the mapping back to the keyword that originally surfaced it. What used to cost a team hours of manual research now runs unattended and delivers a finished contact list on its own schedule.
For contrast, take a look at the Content Machine case. That automation sits at the other end of the spectrum, same platform, same scope of one person in a few weeks, but there AI really earns its place in the pipeline. The decisions in that workflow are exactly the kind a rule-based parser can't make.
The thought I ended up sticking with: before I reach for a model, I first check whether the data already has a shape. If it does, a parser usually gets there faster and cheaper, with fewer surprises in the middle of the night when the workflow runs unsupervised.
FAQ
- Do you need AI for market research?
- No, not automatically. If the source already has structure, like HTML from search results or directory pages, a rule-based parser is usually cheaper, faster and more reliable than a model. I only reach for AI when a step really needs judgment that can't be pinned down in fixed patterns, like classifying free text or writing a summary.
- How do you deduplicate scraped provider data?
- Group first, then merge. Every entry that belongs to the same provider goes into one group. From that group I pick a master record, usually the most direct entry, and scan the remaining entries for extra fields that get merged into the master instead of deleted. Before grouping I normalize consistently, lowercase, whitespace removed, special characters removed, or a single trailing space or different capitalization will split one provider into two groups.
- What breaks when you scrape search results at scale?
- Mostly the error handling, which you don't even notice at small volumes. If even a single request in a batch times out or comes back empty, the mapping by array position shifts and results land under the wrong keyword. Long tracking URLs or leftover HTML markup can crash an export API that enforces a maximum string length. And some sites block automated requests completely unless you route them through residential proxies and accept cookie banners programmatically.

Eric Hinzpeter
Eric Hinzpeter, Senior B2B Content Strategist. He builds AI agents and marketing automation for production use and writes up what comes out of it here.