playwright logoscrapy logo svg
puppeteer logo
python logojs logophp logojava logoc# logo
Chrome logoFirefox logoWebkit logo

Run Puppeteer Without the AWS Headaches

No more spending hours squeezing Puppeteer into a Lambda or clearing Chrome's memory leaks out of your EC2  instances. Scale to thousands of concurrencies with our Puppeteer as a Service.

Write the scripts as usual or use our REST APIs
Connect the endpoint to our pool of browsers
Let us handle all the deployment details
Infrastructure challenges you will encounter while building browser automations with Puppeteer or Playwright
Pink Light

// Import just the core library without the browsers
import puppeteer from "puppeteer-core";

// Specify launch-arguments such as headful mode and stealth settings
const queryParams = new URLSearchParams({
    headless:false,
    stealth:true,
    token: "YOUR-API-KEY?",
}).toString();

// Then replace the connection to use Browserless
const browser = await puppeteer.connect({
  browserWSEndpoint: `wss://production-sfo.browserless.io?${queryParams}`
});

// The rest of your script remains the same
const page = await browser.newPage();



Because Chrome isn't designed for virtual machines

Puppeteer-core is a small package that's simple to deploy. It's Chrome that's the tough bit, with its huge file size and memory leaks
So, let us manage the browsers for you. Set the connection endpoints to Browserless, and you’re good to go.
You don't even need to install Puppeteer on AWS if you don't want to. Our /function endpoint allows for POSTing of custom code and context to run it with.
See the getting started docs

REST APIs for HTML scraping, PDF exporting and more

For common tasks you can use our REST APIs instead of writing Puppeteer scripts. We have APIs for automations such as generating PDFs and retrieving JSON.
/content to capture HTML
/pdf for creating exports
/scrape for structured JSON
/screenshot for a .png or .jpg
/performance for Lighthouse testing
/downloads for returning files
You can run this script yourself in our live debugger.
Live Debugger

// For PDFs, let's take some API content and inject some simple styles
export default async ({ page }: { page: Page }) => {

  // Let's get React's API docs without extra stuff.
  await page.goto('https://reactjs.org/docs/react-api.html');
  const apiContent = await page.evaluate(() => document.querySelector('article').innerHTML);

  // Now, let's get some simple markdown CSS for print
  await page.goto('https://raw.githubusercontent.com/simonlc/Markdown-CSS/master/markdown.css');
  const stylesheet = await page.evaluate(() => document.body.innerText);

  // Finally, let's inject the above in a blank page and print it.
  await page.goto('about:blank');
  await page.setContent(apiContent);
  await page.addStyleTag({ content: stylesheet });
  
  // Return a PDF buffer to trigger the editor to download.
  return page.pdf();
};


// Run the browser for up to 1 minute, then shut down if nothing connects to it.
const browser = await puppeteer.connect({
   browserWSEndpoint: `wss://chrome.browserless.io/chromium?${queryParams}`,
 });
 const [page] = await browser.pages(); 
 await page.goto("https://www.example.com")
 const cdp = await page.createCDPSession();

 const { error, browserWSEndpoint } = await cdp.send('Browserless.reconnect', {
    timeout: 60000,
  });

  if (error) throw error;
  console.log(`${browserWSEndpoint}?${queryParams}`);

  await browser.close();
  //Reconnect using the browserWSEndpoint that was returned from the CDP command.
  const browserReconnect = await puppeteer.connect({
    browserWSEndpoint: `${browserWSEndpoint}?${queryParams}`,
  });
  const [pageReconnect] = await browserReconnect.pages();  
  await sleep(2000);
  await pageReconnect.screenshot({
    path: 'reconnected.png',
    fullPage: true,
  }); 
  await browserReconnect.close();

Advanced session management & hybrid automations

Add extra capabilities to your automations with features such as:
Cookies and reconnects for efficient scaling
/unblock and proxies to dodge bot detectors
Hybrid automations to allow user logins or other input
GPUs for image intensive automations
Test Browserless yourself with a 7 day trial.
Start Free trial
Quote icon

Customer Stories

"Creating Puppeteer scripts was straightforward, but Chrome was annoying to manage with the container needing regular reboots. We found Browserless and within a few hours, everything was running smoothly. Years later, it's still happily running our HTML and PDF exports with minimal maintenance required."

Sebastien Rogier
Tech Lead, Semji

"Browserless helped us focus on the problem we were trying to solve, and less on scaling an automation infrastructure. Browserless's developer focused approach has been a key to us bringing our product to market at the speed we were able to do so. Joel and team are some of the most customer-centric partners I've worked with."

Scott Weinert
Co-Founder & CTO, Atomic
Arrow pointed left
Arrow pointed right

Ready to try the benefits of Browserless?