Multilogin partner 50MAM browser · MAMOFF minutes — 50% off Get 50% off

MLX · Puppeteer

Puppeteer Automation Example

Minimal pattern to start a Multilogin profile and attach Puppeteer over Chrome DevTools Protocol.

Updated 2026-07-28 · 1 min read

Prerequisites

  • Multilogin agent running locally (default API port often 35000)
  • Valid token + workspace_id (runbook)
  • Node.js + puppeteer-core (not full Puppeteer download if you attach to MLX Chrome)

Flow

  1. Authenticate to the local MLX API.
  2. Start profile with automation enabled.
  3. Read the CDP endpoint from the start response.
  4. puppeteer.connect to that browser.
  5. Run your task; stop the profile in finally.

Example (illustrative)

import puppeteer from "puppeteer-core";

// 1) Call MLX API to start profile with automation=true
// 2) Read websocket / CDP URL from response
const wsEndpoint = process.env.MLX_CDP_URL;

const browser = await puppeteer.connect({
  browserWSEndpoint: wsEndpoint,
  defaultViewport: null,
});

try {
  const pages = await browser.pages();
  const page = pages[0] || (await browser.newPage());
  await page.goto("https://example.com", { waitUntil: "domcontentloaded" });
  console.log(await page.title());
} finally {
  await browser.disconnect();
  // 3) Stop profile via MLX API
}

Exact start/stop routes follow your Multilogin X API version—treat the snippet as the attach pattern, not a vendor SDK dump.

Guardrails

  • Always stop profiles after jobs to avoid Minutes / resource bleed.
  • Do not hardcode tokens in repos.
  • Cap navigation timeouts; record trace_id per job.
  • Re-run fingerprint checks after major browser core updates.

See also the Selenium automation example and script runner hub.

Partner disclosure

Apply your Multilogin code after validation.

Commission may apply via /go/multilogin. Final totals always confirm on official checkout.

Antidetect browser

50% off · code 50MAM

Pro, Business & team profiles with API automation.

Minutes packs

50% off · code MAMOFF

Cloud mobile & pay-as-you-go minute packs.