Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk5 min

Take Screenshots of Multiple URLs in Parallel with Node.js and Puppeteer

A practical Node.js and Puppeteer script for capturing multiple URLs in parallel, with bounded concurrency, screenshot options, and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use one Puppeteer browser, a separate page for each active URL, and a bounded worker pool. This captures several sites at once without launching a browser for every URL or opening an unbounded number of pages. The example below saves a PNG per URL, reports failures individually, and closes the browser even if a capture fails.

Requirements and setup

The Puppeteer documentation currently identifies version 25.12.0 for the screenshot guide and related APIs, and its system requirements page specifies Node.js 22.12 or later. Requirements can change, so check the current Puppeteer system requirements when setting up a project.

As an Amazon Associate I earn from qualifying purchases.

  1. Create a project and install Puppeteer:

    mkdir parallel-screenshots
    cd parallel-screenshots
    npm init -y
    npm install puppeteer
  2. Save the script below as screenshots.mjs. The .mjs extension enables ES module imports in Node.js without changing the package configuration.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. Run it with node screenshots.mjs. Puppeteer’s install normally downloads a compatible browser; consult its installation and system requirements if your environment requires a different setup.

    #1 Best Overall

Runnable example: bounded parallel screenshots

Puppeteer’s documented capture call is Page.screenshot(). A browser can have multiple Page instances, so the script creates a fresh page for each active URL and never shares a page between concurrent jobs. The worker limit is an example setting, not a Puppeteer maximum or official recommendation.

import puppeteer from 'puppeteer';
import { mkdir } from 'node:fs/promises';

const urls = [
  'https://example.com',
  'https://developer.mozilla.org',
  'https://pptr.dev',
];

const concurrency = 3; // Tune for your machine and target sites.
const outputDir = 'screenshots';

function filenameFor(index) {
  return `${String(index + 1).padStart(3, '0')}.png`;
}

async function capture(browser, url, index) {
  const page = await browser.newPage();
  const file = `${outputDir}/${filenameFor(index)}`;

  try {
    await page.setViewport({ width: 1440, height: 900 });
    await page.goto(url, { waitUntil: 'networkidle2', timeout: 45_000 });
    await page.screenshot({ path: file, fullPage: true, type: 'png' });
    console.log(`Saved ${url} -> ${file}`);
  } finally {
    await page.close();
  }
}

async function main() {
  await mkdir(outputDir, { recursive: true });
  const browser = await puppeteer.launch();
  let nextIndex = 0;
  const failures = [];

  async function worker() {
    while (true) {
      const index = nextIndex++;
      if (index >= urls.length) return;
      const url = urls[index];
      try {
        await capture(browser, url, index);
      } catch (error) {
        failures.push({ url, message: error instanceof Error ? error.message : String(error) });
        console.error(`Failed ${url}: ${error instanceof Error ? error.message : error}`);
      }
    }
  }

  try {
    await Promise.all(
      Array.from({ length: Math.min(concurrency, urls.length) }, () => worker()),
    );
  } finally {
    await browser.close();
  }

  if (failures.length) {
    console.error(`n${failures.length} of ${urls.length} captures failed.`);
    process.exitCode = 1;
  }
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Each output filename is based on its list position, so two URLs with the same hostname cannot overwrite each other. A failed URL is logged while other jobs continue; the process exits with a nonzero status after the browser closes if any capture failed. The finally blocks close each page and the browser during ordinary errors.

Choosing a concurrency limit

The worker pool keeps no more than concurrency captures active at once. The Puppeteer documentation does not publish a universal page limit, memory-per-page figure, or multi-site throughput benchmark. Start with a small number, then measure on the machine and sites you actually use. Heavy pages, large full-page images, and constrained memory can make a lower limit more reliable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a short, known list, Promise.all(urls.map(...)) can express concurrent work, but it starts every task immediately. For a large or untrusted list, that can create too many active pages and requests. A bounded pool avoids that uncontrolled fan-out.

Adjusting the screenshot

The example requests a 1440 × 900 viewport before navigation and saves the full page as PNG. Puppeteer documents these relevant screenshot controls in its ScreenshotOptions reference; verify defaults against the Puppeteer version installed in your project.

For example, to save a viewport-sized JPEG, change the capture call to await page.screenshot({ path: file.replace('.png', '.jpg'), type: 'jpeg', quality: 80 });. Do not use PNG quality as a compression control: the option applies to lossy formats.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reliability, performance, and cost

Wait conditions affect completion time

The example uses waitUntil: 'networkidle2' with a 45-second navigation timeout. This is a practical choice, not a guarantee that every page has finished rendering: some sites keep network activity open, while others load important content later. If navigation times out, decide whether your use case needs a different waitUntil condition or a deliberate wait for a page-specific selector before taking the screenshot.

Keep output and resource use predictable

  • Use unique filenames for every input, including when hostnames repeat.

  • Full-page capture can produce much taller images than a viewport capture; choose it only when the entire document is needed.

  • One browser with multiple pages avoids launching a separate browser process for each URL, but no official documentation establishes a performance advantage for a particular workload. Compare approaches on your actual pages if throughput matters.

    Free tools Windows power users keep installed

    One-click scans. No signup required.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Local Puppeteer has no per-screenshot service charge, but browser processes, network use, storage, and compute consume your own machine or hosting resources.

    Rank #3
    15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage | LPDDR4 RAM, 180° Lay-Flat, Dual-Band WiFi, Type-C PD Fast Charging, Thin & Lightweight for Students, Home & Office, Gray
    • WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
    • 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
    • 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
    • CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
    • LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

Or skip the browser setup

ScreenshotNeo is a screenshot API and MCP server for developers. Its one-call endpoint accepts a URL and returns an image or PDF. For a quick capture, save the response to a file:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for authentication and parameters. It removes cookie/consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and 1,000 screenshots per month are free with no card; paid plans start at $5 for 3,000. Sign up for the free plan.

Frequently Asked Questions

Does Puppeteer set an official maximum number of pages or parallel screenshots?

No. Its documentation describes multiple Page instances but does not specify a universal concurrency ceiling. Choose and test a limit for your workload.

Can one Puppeteer Page capture multiple URLs at the same time?

Use a separate Page per concurrently active URL. Sharing a page would make independent navigations and captures interfere with one another.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.