• Website
  • Server status
  • API documentation
  • Blog
Telegram Icon Community
EN
English
Português
Русский
中文 (中国)
Tiếng Việt
Log in Try for €3.99
  • Website
  • Server status
  • API documentation
  • Blog
  • Telegram Icon Community
  • English (US)
    English
    Português
    Русский
    中文 (中国)
    Tiếng Việt
Log in View Plans

Puppeteer, Selenium, and Playwright

Control browser profiles programmatically with Puppeteer, Selenium, and Playwright. Automate web interactions, scraping, and profile management at scale.

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting started with Multilogin X automation
  • Basic automation with CLI
  • Low-code automation with Postman
  • Script runner & predefined scripts
  • Puppeteer, Selenium, and Playwright
  • Custom API scripts with Python
  • Quick solutions in Developer Tools
  • Home
  • Multilogin X
  • Task automation with API
  • Puppeteer, Selenium, and Playwright
  • Puppeteer automation example

Puppeteer automation example

Written by Villa W ( Updated on April 9th, 2025 )

Updated on April 9th, 2025

Puppeteer is a Node.js library developed by Google that offers a high-level API to control Chromium through the DevTools Protocol. You can use Puppeteer to automate tasks in Mimic browser profiles within Multilogin. In this article, we'll show you how to get started with an example.

You can only automate Mimic browser profiles using Puppeteer. Stealthfox, which is based on Mozilla Firefox, is not supported by it.

 

Before you start

  1. Download Node.js from the official website and install it
  2. Ensure Node.js and npm (Node Package Manager) are installed correctly:
node -v 
npm -v
  1. Create a project directory, then run this command to initialize a new Node.js project and create a package.json file: 
npm init -y
  1. Install Puppeteer as a dependency for your project: 
npm install puppeteer
  1. Install Axios and MD5 library: 
npm install axios 
npm install md5
  1. Insert your values into the below variables in the script:
    1. email: your Multilogin X account email
    2. password: your Multilogin X account password (MD5 encryption is not required)
    3. folder_id, profile_id: find these values using our guides on DevTools or Postman
  2. Replace https://multilogin.com/ with the website you need in the following line:
await page.goto("https://multilogin.com/");

Running the script

  1. Make sure the agent is connected, as it makes profile launching possible
  2. Make sure Puppeteer is compatible with the current Mimic core version – check the release notes for Puppeteer and Mimic
  3. Run the .js file with your automation code

Script example

const puppeteer = require('puppeteer');
const md5 = require('md5');
const axios = require('axios');

const HEADERS = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};
const acc_info = {
    // Insert your account information in both variables below
    "email": "",
    "password": md5("")
};

async function get_token() {
    const signIn_URL = "https://api.multilogin.com/user/signin";
    try {
        const response = await axios.post(signIn_URL, acc_info, {
            headers: HEADERS
        });
        return response.data.data.token;
    } catch (error) {
        console.log(error.message);
        console.log("Response data:", error.response.data);
        return false;
    }
};
// Insert the Folder ID and the Profile ID below
const folder_id = "";
const profile_id = "";

async function start_browserProfile() {
    const token = await get_token();
    if (!token) return;
    // Update HEADERS with bearer token retrived from the get_token function
    HEADERS.Authorization = 'Bearer ' + token;
    // Launch a profile defining "Puppeteer" as automation type
    const profileLaunch_URL = `https://launcher.mlx.yt:45001/api/v2/profile/f/${folder_id}/p/${profile_id}/start?automation_type=puppeteer&headless_mode=false`;
    try {
        const response = await axios.get(profileLaunch_URL, {
            headers: HEADERS
        });
        const browserURL = `http://127.0.0.1:${response.data.data.port}`;
        // if you prefer to connect with browserWSEndpoint, try to get the webSocketDebuggerUrl by following request
        // const {data : {webSocketDebuggerUrl}} = await axios.get(`${browserURL}/json/version`)
        const browser = await puppeteer.connect({
            browserURL: browserURL,
            timeout: 10000
        });
        const page = await browser.newPage();
        await page.goto("https://multilogin.com/");
        await page.screenshot({
            path: "example.png"
        })
        await page.close();
    } catch (error) {
        console.log("Error:", error.message);
        if (error.response) {
            console.log("Response data:", error.response.data);
        }
    }
};

start_browserProfile();
 
 
puppeteer automation

Was this article helpful?

Give feedback about this article

In this article

  • Before you start
  • Running the script

Multilogin community

Stay informed, share your thoughts, and engage with others!

Join us on Telegram

Read more on the topic

blogpost img

10 Best Datacenter Proxies for Web Scraping (2025 Edition)

Apr 2, 2025 5 min read
Google SERP Img

What is a Google SERP Proxy and Why Should You Care?

Apr 1, 2025 6 min read
UK Proxy Img

What Are Dedicated UK Proxies? Everything You Need to Know

Apr 1, 2025 6 min read
art-icon

Related Articles

  • How to use Puppeteer browser automation in Multilogin 6
  • Multilogin X automation FAQ
  • Multilogin 6 automation FAQ
  • How to update a profile with Postman

ANTIDETECT PLATFORM

  • Antidetect browser
  • Mobile antidetect browser
  • Headless browser
  • Multilogin residential proxies
  • Multi-account management
  • Web automation

RESOURCES

  • Knowledge base
  • API documentation
  • Glossary
  • Blog
  • Multilogin 6 download
  • Server status
  • Release notes

PLATFORM PROXIES

  • Google proxy
  • Facebook proxy
  • Reddit proxy
  • Twitter proxy
  • Amazon proxy
  • LinkedIn proxy

GEO PROXIES

  • Japan proxy
  • UK proxy
  • USA proxy
  • China proxy
  • Canada proxy
  • India proxy

MULTI-ACCOUNT MANAGEMENT

  • Create multiple Facebook accounts
  • Create multiple LinkedIn accounts
  • Create multiple Amazon accounts
  • Create multiple eBay accounts
  • Create multiple Gmail accounts
  • Create multiple Discord accounts

COMPARISON

  • Multilogin vs. Gologin
  • Multilogin vs. Adspower
  • Multilogin vs. Dolphin Anty
  • Multilogin vs. Incognition
  • Multilogin vs. Octo Browser

GET IN TOUCH

  • Contact 24/7 support
    [email protected]
  • Contact sales
  • Affiliate program
  • Careers

© 2025 Multilogin. All rights reserved.

  • Privacy policy
  • Terms of service
  • Cookie policy
  • ANTIDETECT PLATFORM

    • Antidetect browser
    • Mobile antidetect browser
    • Headless browser
    • Multilogin residential proxies
    • Multi-account management
    • Web automation
  • RESOURCES

    • Knowledge base
    • API documentation
    • Glossary
    • Blog
    • Multilogin 6 download
    • Server status
    • Release notes
  • MULTI-ACCOUNT MANAGEMENT

    • Create multiple Facebook accounts
    • Create multiple LinkedIn accounts
    • Create multiple Amazon accounts
    • Create multiple eBay accounts
    • Create multiple Gmail accounts
    • Create multiple Discord accounts
  • COMPARISON

    • Multilogin vs. Gologin
    • Multilogin vs. Adspower
    • Multilogin vs. Dolphin Anty
    • Multilogin vs. Incognition
    • Multilogin vs. Octo Browser
  • PLATFORM PROXIES

    • Google proxy
    • Facebook proxy
    • Reddit proxy
    • Twitter proxy
    • Amazon proxy
    • LinkedIn proxy
  • GEO PROXIES

    • Japan proxy
    • UK proxy
    • USA proxy
    • China proxy
    • Canada proxy
    • India proxy
  • GET IN TOUCH

    • 24/7 support: [email protected]
    • Contact sales
    • Affiliate program
    • Careers
  • Privacy policy
  • Terms of service
  • Cookie policy

© 2025 Multilogin. All rights reserved.

Expand