Do I need a browser to scrape?
Tested · How we test
Based on our test of 12 open source tools on 26 public sites, from one machine with no proxy.
Sites where no browser was needed
At least one HTTP client got the content on Walmart, eBay, LinkedIn, Indeed, We Work Remotely, Wikipedia, Hacker News, BBC, arXiv, Project Gutenberg, GOV.UK and Python docs.
On Remote OK, only browsers passed our check, but the pages the HTTP clients got held the content too. Our check missed it, so a browser is probably not needed there either.
Sites that needed a browser
On Instagram, TikTok, Trustpilot, Quotes to Scrape, ScrapingCourse and WebScraping.dev, no HTTP client got the content, while browsers did.
On Instagram, TikTok, Quotes to Scrape, ScrapingCourse and WebScraping.dev, every HTTP client got a page without the content. These sites probably draw it with JavaScript, which only a browser runs.
On Trustpilot, some HTTP clients were refused outright. The browsers probably got through by looking more like a person, not only by running JavaScript.
Sites where neither worked
On Kohl’s, Target, Etsy, G2 and Tripadvisor, every tool was refused or got a page without the content, browsers included. A browser alone does not get past these sites' bot checks. On Amazon and Best Buy, our check could not tell, and each site's page explains why.
How to tell for your own site
- Fetch the page with an HTTP client that imitates a browser, such as curl_cffi.
- Search the HTML for a word you expect, such as a product name or a price. Do not trust the status code: 50 of the 230 pages that answered HTTP 200 in our test did not hold the content.
- If the word is missing, try the same page in a browser. If it appears there, the site needs one.
What a browser costs
On the pages they got, the HTTP clients took a median of 0.6 s and 47 MB of memory. The browsers took 3.0 s and 616 MB, about 13 times the memory. At a few pages that does not matter. At thousands of pages a day, it decides how many machines you need.