• Website
  • Server status
  • API documentation
  • Blog
Telegram Icon Community
EN
Русский
Português
English
中文 (中国)
Tiếng Việt
Sign in Start free
  • Website
  • Server status
  • API documentation
  • Blog
  • Community
  • English (US) Русский Português English 中文 (中国) 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.

search icon

Try a different keyword or check for typos. If you still need help, contact support.

  • Getting started with Multilogin automation
  • Basic automation with CLI
  • Low-code automation with Postman
  • Script runner & predefined scripts
  • Puppeteer, Selenium, and Playwright
  • Custom Python scripts
  • Quick solutions with Developer Tools
  • External automation tools
  • Home
  • breadcrumb separator bar
  • Explore features
  • breadcrumb separator bar
  • Efficient task automation with API
  • breadcrumb separator bar
  • Puppeteer, Selenium, and Playwright
  • breadcrumb separator bar
  • Puppeteer automation example

Puppeteer automation example

Written by Villa W ( Updated on October 18th, 2026 )

Updated on October 18th, 2026

Use Puppeteer to automate a Multilogin Mimic browser profile by starting the profile with automation_type=puppeteer, getting the automation port from the start response, and connecting Puppeteer to that local port.

➡️ Keep the Multilogin desktop app running → start the browser profile through the API → get data.port from the response → connect Puppeteer to http://127.0.0.1:<port>.

Puppeteer works with Mimic browser profiles. Legacy Stealthfox profiles don't support Puppeteer.

To start automating, check these resources first: Getting started with automation scripting.

 

This guide covers browser-profile automation. For native Android app automation on Multilogin cloud phones, use ADB or Appium.

 

Who can use this script?

  • 👨‍💻 Account owners and team members
  • 💰 Pro 10 and higher plans
 

How the connection works

  1. The script starts the Multilogin browser profile with automation_type=puppeteer
  2. Multilogin returns the automation port in data.port
  3. The script builds http://127.0.0.1:<port>
  4. puppeteer.connect() connects to the already-running Multilogin profile
  5. Puppeteer can then open pages and run your browser actions

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 account email
    2. password: your Multilogin account password (MD5 encryption is not required)
    3. folder_id, profile_id: find these values using our guides on DevTools (for GUI) or Postman
  2. Replace https://multilogin.com/ with the website you need in the following line:
await page.goto("https://multilogin.com/");

Need the profile ID? You can copy it directly from the Multilogin interface. Learn how: How to copy profile IDs in Multilogin.

 

Running the script

  1. Launch the app, as it makes profile launching possible
  2. Use a Puppeteer version compatible with the Chromium version used by the current Mimic core. If Puppeteer fails to connect after a core update, check the current Mimic core and Puppeteer compatibility before changing the script.
  3. Run the .js file with your automation code

    Make sure to run the automation code in the same folder/project as package.json file.

     

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();
 
 

Expected result: Multilogin starts the selected Mimic browser profile, Puppeteer connects to its returned automation port, opens the target webpage, and saves example.png in your project folder.

Troubleshooting

Why can't Puppeteer connect to the profile?

Check that:

  • The Multilogin desktop app is running
  • folder_id and profile_id are correct
  • The browser profile is Mimic
  • The profile start request returned a valid data.port
  • Your API token is valid
  • Your Puppeteer version is compatible with the current Mimic core

Why does Puppeteer open a different browser?

Make sure your script uses puppeteer.connect() with the port returned by Multilogin rather than launching a separate Puppeteer browser.

puppeteer automation

Was this article helpful?

Give feedback about this article

In this article

  • How the connection works
  • Before you start
  • Running the script
  • Script example
  • Troubleshooting
  • Why can't Puppeteer connect to the profile?
  • Why does Puppeteer open a different browser?

Multilogin community

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

Telegram Icon Join us on Telegram

Read more on the topic

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
Related Article Title Icon

Related articles

  • Getting started with automation scripting
  • Selenium automation example
  • Playwright automation example
  • How to choose the best automation framework

Mobile

  • Cloud phone
  • Virtual phone
  • Remote phone
  • Phone farming
  • Cloud cell phone
  • Cloud Android emulation
  • AI Quick Action Automation

Multi-accounting

  • Multiple Instagram accounts
  • Multiple Tiktok accounts
  • Multiple Reddit accounts
  • Multiple Telegram accounts
  • Multiple Facebook accounts
  • Multiple Youtube accounts
  • Multiple LinkedIn accounts

COMPARISON

  • Multilogin vs. MoreLogin
  • Multilogin vs. FlashID
  • Multilogin vs. DuoPlus
  • Multilogin vs. VMOS cloud
  • Multilogin vs. Octo Browser
  • Multilogin vs. AdsPower
  • Multilogin vs. GoLogin

Platform proxies

  • Mobile proxy
  • Reddit proxy
  • Instagram proxy
  • TikTok proxy
  • Facebook proxy
  • Youtube proxy
  • LinkedIn proxy

USECASES

  • Cloud phones for Tiktok
  • Cloud phones for Instagram
  • Cloud phones for Reddit
  • Cloud phones for Facebook
  • Cloud phones for Youtube

RESOURCES

  • Knowledge base
  • API documentation
  • Glossary
  • Academy
  • Blog
  • Server status
  • Release notes

FREE TOOLS

  • YouTube views to money calculator
  • Instagram money calculator
  • Online URL to text converter
  • Google local SERP checker
  • Random address generator

GET IN TOUCH

  • Contact 24/7 support
    [email protected]
  • Referral program
  • Affiliate program
  • Pricing page
  • Careers
GDPR Compliant

© 2026 Multilogin. All rights reserved.

  • Privacy policy
  • Terms of service
  • Cookie policy
Multilogin watermark
  • MOBILE

    • Cloud phone
    • Virtual phone
    • Remote phone
    • Phone farming
    • Cloud cell phone
    • Cloud Android emulation
    • AI Quick Action Automation
  • MULTI-ACCOUNTING

    • Multiple Instagram accounts
    • Multiple Tiktok accounts
    • Multiple Reddit accounts
    • Multiple Telegram accounts
    • Multiple Facebook accounts
    • Multiple Youtube accounts
    • Multiple LinkedIn accounts
  • COMPARISON

    • Multilogin vs. MoreLogin
    • Multilogin vs. FlashID
    • Multilogin vs. DuoPlus
    • Multilogin vs. VMOS cloud
    • Multilogin vs. Octo Browser
    • Multilogin vs. AdsPower
    • Multilogin vs. GoLogin
  • PLATFORM PROXIES

    • Mobile proxy
    • Reddit proxy
    • Instagram proxy
    • TikTok proxy
    • Facebook proxy
    • Youtube proxy
    • LinkedIn proxy
  • USECASES

    • Cloud phones for Tiktok
    • Cloud phones for Instagram
    • Cloud phones for Reddit
    • Cloud phones for Facebook
    • Cloud phones for Youtube
  • RESOURCES

    • Knowledge base
    • API documentation
    • Glossary
    • Academy
    • Blog
    • Server status
    • Release notes
  • FREE TOOLS

    • YouTube views to money calculator
    • Instagram money calculator
    • Online URL to text converter
    • Google local SERP checker
    • Random address generator
  • GET IN TOUCH

    • Contact 24/7 support
      [email protected]
    • Referral program
    • Affiliate program
    • Pricing page
    • Careers
GDPR Compliant
  • Privacy policy
  • Terms of service
  • Cookie policy

© 2026 Multilogin. All rights reserved.

Expand