Web Scraping to the Cloud

My exploration of cloud-based alternatives for headless browser scraping that don't require running heavy services like Puppeteer or Playwright locally

The Problem I Was Trying to Solve

Last month, I was working on a project that required scraping data from several JavaScript-heavy websites. I started with the usual suspects—Puppeteer and Playwright running locally—but quickly hit a wall. My laptop fans were constantly spinning, memory usage was through the roof, and scaling beyond a few concurrent requests seemed impossible.

I thought to myself: "There has to be a better way to do this without turning my MacBook into a space heater."

So I dove into researching cloud-based alternatives that could handle the heavy lifting of browser automation while keeping my local environment light. Here's what I discovered after spending a week testing different solutions.


Cloud-Based Headless Browser Services I Tested

Apify: The All-in-One Platform

I started with Apify, which feels like the "AWS of web scraping." Their cloud platform offers pre-built "Actors" (think serverless functions for scraping) with everything bundled in—proxies, scheduling, and storage.

What I liked most was how I could take my existing Node.js crawler code, make minimal changes, and deploy it as a serverless Actor. The Crawlee library they provide made the transition surprisingly smooth.

The dashboard gives you visibility into runs, memory usage, and logs—which was a huge upgrade from my console.log debugging sessions locally.

Browserless.io: When You Just Need the Browser

Next, I tried Browserless.io, which takes a more focused approach. It's essentially a hosted headless Chrome and Playwright environment that you can access through a REST API.

The best part? I could keep most of my existing Puppeteer code and just point it to their service instead of launching a local browser. Their API handles all the proxy rotation and CAPTCHA solving behind the scenes.

For teams already invested in Puppeteer/Playwright workflows, this felt like the path of least resistance.

ScrapingBee: The One-Liner Solution

ScrapingBee took a different approach that I really appreciated on days when I just wanted results without fussing with browser automation code.

Their API is dead simple—send an HTTP request with your target URL, and get back fully rendered HTML. No need to manage browser instances, handle JavaScript execution, or worry about being blocked.

// This is literally all it takes
const response = await fetch(
  `https://app.scrapingbee.com/api/v1/?api_key=${apiKey}&url=${targetUrl}&render_js=true`,
)
const html = await response.text()

I found myself reaching for this when I needed quick results without the cognitive overhead of browser automation.

Other Services Worth Mentioning

I also briefly tested:

  • Zyte API (formerly Splash): Great for JavaScript-heavy pages with their anti-ban technology
  • PhantomBuster: Excellent if you need to automate workflows beyond just scraping
  • ScrapingBot: Solid option with real browsers to evade detection
  • Scrapy Cloud: Perfect if you're already using Scrapy

The Serverless Route: DIY Cloud Scraping

For some projects, I wanted more control over the execution environment while still avoiding local resource constraints. That's when I explored deploying headless browsers in serverless functions:

AWS Lambda Experiment

I packaged Puppeteer with headless Chrome in Lambda Layers and was surprised by how well it worked. The setup was more involved than using a dedicated service, but the per-execution pricing made sense for my sporadic scraping needs.

The key insight was using

chrome-aws-lambda
package, which provides a properly compiled version of Chromium that stays under Lambda's size limits.

Google Cloud Functions Experience

Google Cloud Functions (2nd gen) was even easier to set up since it already includes many system packages needed for headless Chrome. I just needed to use

puppeteer-core
to keep the deployment size manageable.

This approach gave me the best balance of control and scalability for projects where I needed custom logic around the scraping process.


What I Learned and My Recommendations

After weeks of testing, here's my practical advice if you're facing similar challenges:

  • If you're just getting started: Try ScrapingBee first. The simplicity of a single API call will save you hours of setup time.
  • If you have existing Puppeteer/Playwright code: Browserless.io offers the smoothest transition with minimal code changes.
  • For large-scale, complex projects: Apify provides the most complete ecosystem with scheduling, storage, and proxy management built in.
  • If you're comfortable with cloud services: Deploying to AWS Lambda or Google Cloud Functions gives you the most control at potentially lower costs, especially for intermittent workloads.

The biggest lesson I learned? Don't let infrastructure concerns limit your data collection projects. These cloud solutions have matured to the point where there's rarely a good reason to run resource-intensive browsers on your local machine.


What's Next for My Scraping Projects

I've settled on a hybrid approach for now:

  • ScrapingBee for quick, one-off scraping tasks
  • Apify for scheduled data collection jobs that run regularly
  • AWS Lambda for specialized scrapers that need custom logic

In my next post, I'll share some actual code examples showing how I integrated these services into a unified data pipeline that feeds into my analytics system.

Have you tried any of these services? Or do you have other cloud scraping solutions you'd recommend? Let me know in the comments!