A Lazy Guide to Competitive Analysis
Every business needs some form of competition analysis. Whether it's a large sneaker company looking for their competitors pricing and design or the local drug dealer knowing how much he has to cut his drugs by. But let’s be honest—manually gathering and structuring this data is a hassle.
Why Competitive Analysis is Hard
The biggest issue for most of these websites is that they are subject to change at a moment's notice. That means that the parser you wrote last week might not work today. In addition to this, websites are rendered client side, so a simple GET request is not sufficient. On top of that, there's also bot detection, CAPTCHAs, and rate limiting.
The Standard Approach: Using Playwright for Dynamic Content Extraction
The normal way to extract data from a website like Amazon is to use something like Playwright. Playwright can render the website which can then be processed directly, no differently from looking at the dom in your browser.
Here’s how you would typically extract Amazon product details using Playwright:
The Lazy Solution: Using Hyperbrowser's Extract API
Instead of manually selecting elements and writing complex parsers, what if I could just say:
“Extract product name, price, and features from this page along with a screenshot url and return it as JSON”
That’s exactly what Hyperbrowser’s Extract API does. It automatically structures web data so you don’t have to waste time writing custom parsers.
Step 1: Install the Hyperbrowser SDK
First, install the Hyperbrowser SDK for Node.js:
yarn add @hyperbrowser/sdk
Step 2: Define the Extraction Schema
Unlike the playwright approach, all we need here is the schema of the data we want to extract. Hyperbrowser will then look around the DOM and find what information fits the schema the best.
Competitive Analysis Doesn’t Have to Be a Pain
The old way of scraping required writing custom parsers, dealing with anti-bot protections, and structuring messy HTML, and praying to God that the website didn't change overnight. The lazy way? Use structured extraction and automate the entire process.
While the traditional approach is still valid, Hyperbrowser’s Extract API makes it easier to extract structured data from dynamic websites without all the headaches. Whether you’re tracking pricing, product features, or content updates, structured extraction lets you focus on insights, not scraping bugs.
Get started with Hyperbrowser's Extract API today!