DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › browser automation

How to Capture Screenshots of Hundreds of Web Pages with Headless Chrome

By Freedom251 Team · · 8 min read

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.

For a straightforward batch, feed URLs to Chrome’s headless command-line mode and give every screenshot a unique filename. Use Puppeteer or Playwright when you need page-specific navigation, readiness checks, full-page captures, or element screenshots. The key to a dependable run is to define what counts as “ready,” record each URL’s outcome, and benchmark concurrency on your own pages and machine: official documentation does not establish a universal throughput or concurrency target.

Choose the capture method

Need Approach Decision point
Simple URL-by-URL capture Chrome Headless CLI with --screenshot and --window-size. The default filename shown in Chrome’s documentation is screenshot.png in the current working directory. Chrome Headless command-line reference Use a script to assign a distinct output path for each URL; otherwise the default name risks replacing earlier captures.
Scripted navigation and screenshot control Puppeteer’s Page.screenshot() and ElementHandle.screenshot(). Puppeteer screenshots Useful when the job needs browser-control logic beyond opening a URL.
Viewport, element, or full scrollable page Playwright screenshot APIs, including full-page capture. Playwright screenshots Choose the capture area and pixel scale before the batch; full-page images can be much larger than viewport images.

Prepare the batch

  1. Make a URL list. Keep one URL per line in a text file, for example urls.txt. Validate the list and decide how to handle duplicate URLs before capturing.
  2. Choose consistent output settings. Set a viewport size and image format that fit the job. A viewport screenshot and a full-page screenshot are different outputs; confirm that downstream storage and image-processing systems can accept the resulting dimensions.
  3. Choose unique names. Use a stable index or a sanitized URL-derived name. Do not use the same fixed output filename for every page.
  4. Define readiness. A page loading event or a fixed wait does not prove that delayed or dynamic content has appeared. Test the readiness policy on representative pages.
  5. Check permission and request rates. Browser screenshot documentation does not establish site-specific permission, acceptable request rates, or legal rules for capturing third-party pages. Check the relevant site terms and applicable rules.

Capture pages with Chrome Headless CLI

Chrome’s --screenshot flag captures the target URL. --window-size sets the requested viewport dimensions. The documented default output name is screenshot.png, so use a different output path for every URL in a batch. Consult the Chrome Headless command-line reference for the command-line options supported by your Chrome version.

As an Amazon Associate I earn from qualifying purchases.

Capture one page

Replace the URL with a page you are authorized to capture. This example requests a 1440-by-1000 viewport and names the result explicitly:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
chrome --headless --screenshot=shot.png --window-size=1440,1000 https://example.com/

The executable name may differ by operating system or installation. If your shell cannot find chrome, use the installed Chrome executable’s path.

#1 Best Overall
Sale
KAMRUI Pinova P2 Mini PC 16GB RAM 512GB SSD, AMD Ryzen 4300U(Beats 5400U/3500U/N95,Up to 3.7GHz,4C/8T) Mini Computers,Triple 4K Display/HDMI+DP+Type-C/WiFi/BT for Home/Business Mini Desktop Computers
  • 【AMD Ryzen 4300U True 4-Core CPU: Outperforms N95 & i3-10110U】KAMRUI P2 Mini PC is equipped with true 4-core AMD Ryzen 4300U processor built on advanced 7nm Zen2 architecture,This means you get consistent, unthrottled performance for hours on end, whether you’re running multiple browser tabs, streaming 4K content, or managing virtual machines. Compare that to Intel N95 (4 efficiency cores that throttle under load) or Intel i3-10110U (only 2 cores total), and the difference is night and day: The KAMRUI P2 AMD Ryzen 4300U (28W) is 40% faster than the Intel i3-10110U and 25% faster than the Intel N95 in multi-core tasks, ensuring smooth, lag-free performance even during heavy workloads.
  • 【Integrated AMD Radeon Graphics: 2.5X Stronger for Tri 4K】The KAMRUI P2 AMD 4300U Mini PC have unlocked the full potential of the built-in AMD Radeon Vega 5 graphics with 28W power delivery, making it 2.5 times stronger than the Intel UHD graphics found in the N95 and i3-10110U. This means you can enjoy Tri 4K@60Hz displays without a single stutter, perfect for productivity setups, home theaters, or even light photo/video editing and casual gaming. While the Intel N95/i3-10110U struggle to run a single 4K display without lag, The KAMRUI AMD 4300U Mini PC handles Tri 4K effortlessly, turning your workspace into a high-efficiency hub or your living room into a premium entertainment center.
  • 【Large Storage Capacity, Easy Expansion】KAMRUI Pinova P2 mini computers is equipped with 16GB LPDDR4 for faster multitasking and smooth application switching. 512GB M.2 SSD ensures fast startup, fast file transfers and plenty of storage space,eliminating slow loading times and ensuring fast responsiveness. the two storage slots (1x M.2 2280 SATA/NVMe PCIe3.0 slot, 1x M.2 2280 SATA slot) can be combined to provide up to 4TB of total storage(Not included). This gives you enough space for all your projects, media and data.
  • 【4K Triple Display】KAMRUI Pinova P2 4300U mini desktop computers is equipped with HDMI2.0 ×1 +DP1.4 ×1+USB3.2 Gen2 Type-C ×1 interfaces for faster transmission, Triple 4K@60Hz Display, KAMRUI P2 mini computer is ideal for visual home entertainment, home office, conference rooms, etc. USB3.2 Gen2 Type-A port ×2 with a transfer speed of up to 10 Gbps (21 times faster than USB 2.0) for efficient data transfer. Ideal for seamless multitasking between spreadsheets, browsers and presentations, or for an immersive entertainment experience.
  • 【USB3.2 Gen2 Type-C 10Gbps, Versatile connectivity】KAMRUI P2 mini desktop pc fast and versatile connectivity! The USB3.2 Gen2 Type-C port offers a data transfer rate of 10Gbps and simultaneously supports DisplayPort 1.4 video output. The P2 AMD Ryzen 4300U Mini PC is complemented by Gigabit LAN, WiFi and Bluetooth, so nothing stands in the way of a productive working environment.

Run a URL list without overwriting files

This shell example reads urls.txt, numbers outputs, and writes a simple success or failure record. It is sequential; it deliberately does not assume a safe universal parallelism level.

mkdir -p shots
: > results.tsv
i=0
while IFS= read -r url || [ -n "$url" ]; do
  [ -z "$url" ] && continue
  i=$((i + 1))
  output=$(printf 'shots/%05d.png' "$i")
  if chrome --headless --screenshot="$output" --window-size=1440,1000 --timeout=20000 "$url"; then
    printf '%st%st%sn' "$i" "ok" "$url" >> results.tsv
  else
    printf '%st%st%sn' "$i" "failed" "$url" >> results.tsv
  fi
done < urls.txt

Here, --timeout=20000 is a user-chosen maximum wait in milliseconds, not a guarantee that the page finished loading. Chrome’s timeout permits capture to continue after the maximum wait even if loading is still in progress. Adjust it after inspecting representative results; the cited documentation does not establish a universally correct timeout.

Use Puppeteer or Playwright for more control

Choose a browser automation library when each page needs navigation logic, a chosen capture mode, or other scripted actions. These examples illustrate the screenshot calls and use a URL list, unique output names, and per-URL outcome records. Install the selected library according to its official documentation before running them.

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

Puppeteer: viewport screenshot per URL

Puppeteer documents Page.screenshot() for a page and ElementHandle.screenshot() for an element. See Puppeteer’s screenshot guide.

const fs = require('node:fs/promises');
const puppeteer = require('puppeteer');

async function main() {
  const urls = (await fs.readFile('urls.txt', 'utf8'))
    .split(/r?n/)
    .map((url) => url.trim())
    .filter(Boolean);
  const browser = await puppeteer.launch({ headless: true });
  const results = [];

  try {
    const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
    for (let i = 0; i < urls.length; i += 1) {
      const url = urls[i];
      const output = `shots/${String(i + 1).padStart(5, '0')}.png`;
      try {
        await page.goto(url, { waitUntil: 'networkidle2', timeout: 30000 });
        await page.screenshot({ path: output });
        results.push({ url, status: 'ok', output });
      } catch (error) {
        results.push({ url, status: 'failed', error: String(error) });
      }
    }
  } finally {
    await browser.close();
    await fs.writeFile('results.json', JSON.stringify(results, null, 2));
  }
}

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

Create the shots directory before running the script. Puppeteer’s documented example uses waitUntil: 'networkidle2', but that is not proof that every arbitrary page’s late-loading content is complete. Verify results on pages with dynamic content and adapt the readiness condition to what the page actually needs.

Rank #2
Sale
GMKtec Mini PC, G3 Ultra Intel Pentium Gold 7505 16GB LPDDR4 RAM 512GB SSD | Office Business Desktop Computer (Beats N100/N150), 4K Dual HDMI/USB3.2 Gen2 10Gbps/WiFi 6/BT5.2/2.5GbE
  • WHY CHOOSE G3 ULTRA MINI PC PENTIUM GOLD 7505 - Choose the Intel Pentium Gold 7505 for snappier everyday responsiveness: It delivers up to 30% faster single-core performance than the Ryzen 5 3500U, making office apps and web browsing feel noticeably quicker, while its Intel UHD Graphics (48 EUs) provides 2.4x the GPU performance of the N100 & N150's 24-EU graphics, ensuring smoother 4K streaming and light photo editing.
  • 16GB RAM MEMORY & 512GB STORAGE - GMKtec Nucbox G3 Ultra mini computer is prebuilt with 16GB LPDDR4 RAM at 3200 MT/s, you will enjoy a speedier experience with Built-in 512GB M.2 SATA Hard Drive. Our mini desktop pc boots up in seconds, work on multiple browser tabs, software applications and quickly transfers files. There is a primary slot and secondary expansion storage. Primary slot is M.2 2280 PCIE and secondary slot is M.2 2280 SATA.
  • RICH INTERFACE - Nucbox pentium mini computer is equipped with 3* USB 3.2 Gen2 ports, up to 10Gbps/S, 1*USB 2.0, HDMI(4K@60Hz)*2, 3.5mm Audio Jack. Supports WiFi 6, and Gigabit Ethernet RJ45 2.5GbE network connectivity, Bluetooth 5.2. This Mini PC supports multiple device connection and can be used with servers, monitoring equipment, office equipment, displays, projectors, televisions, etc.
  • 4K DUAL SCREEN DISPLAY - Mini desktop computer is equipped with upgraded Intel Graphics(max 1000MHz), supports 4K video playback and AV1 decoding, connect the pc with a projector as a home theatre, enjoy a variety of entertainments. Two HDMI 2.0 ports allows you to multi-task efficiently on two 4K@60Hz displays.
  • UPGRADED COOLING FAN - The G3 Ultra has upgraded the cooling fan to reduce fan noise and thermals. We are using an upgraded thermal paste as well to help reduce heat on the CPU.

Playwright: viewport or full-page screenshot

Playwright supports viewport, element, and full-page screenshots; full-page mode captures the full scrollable page. See Playwright’s screenshot documentation.

const fs = require('node:fs/promises');
const { chromium } = require('playwright');

async function main() {
  const urls = (await fs.readFile('urls.txt', 'utf8'))
    .split(/r?n/)
    .map((url) => url.trim())
    .filter(Boolean);
  const browser = await chromium.launch({ headless: true });
  const results = [];

  try {
    const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } });
    for (let i = 0; i < urls.length; i += 1) {
      const url = urls[i];
      const output = `shots/${String(i + 1).padStart(5, '0')}.png`;
      try {
        await page.goto(url, { waitUntil: 'load', timeout: 30000 });
        await page.screenshot({ path: output, fullPage: true });
        results.push({ url, status: 'ok', output });
      } catch (error) {
        results.push({ url, status: 'failed', error: String(error) });
      }
    }
  } finally {
    await browser.close();
    await fs.writeFile('results.json', JSON.stringify(results, null, 2));
  }
}

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

To capture only the viewport, omit fullPage: true. For one element, locate it and use the locator’s screenshot method, for example await page.locator('main').screenshot({ path: output });. Confirm that the selector matches the intended element on every target page.

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

Set readiness and capture scope deliberately

Viewport, full page, or element

  • Viewport: captures the currently visible browser area at the selected viewport dimensions.
  • Full page: captures the full scrollable document in Playwright’s full-page mode. It can produce much taller images and larger files than viewport captures.
  • Element: captures a selected element, which is useful when only one component matters. A missing or ambiguous selector needs to be handled as an individual page failure.

Loading is not the same as readiness

Chrome’s CLI timeout is a maximum wait, not confirmation that all content has rendered. Puppeteer’s documented networkidle2 example is one possible navigation condition, but neither it nor a fixed delay reliably captures all dynamic content on arbitrary sites. Inspect a sample of pages, especially those with lazy-loaded images, client-side rendering, or content that appears after interaction.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Scale the run without guessing

The official Chrome, Puppeteer, and Playwright materials cited here document capture features, not throughput benchmarks, memory-per-page estimates, or a recommended concurrency for a hundred-page job. Begin with a representative subset on the same machine and runtime you will use for the full batch.

  1. Run a small sample that includes typical pages and the slowest or most dynamic ones.
  2. Record duration, output size, timeout rate, failures, and resource use in your environment.
  3. Increase parallelism cautiously, repeating the sample and comparing the same measures.
  4. Choose a concurrency level based on observed failures and resource use, then retain per-URL outcomes so failed pages can be retried selectively.

Full-page captures can increase image dimensions and storage requirements, so check downstream limits before launching a large batch. Avoid assuming that a faster run is reliable if it produces missing content or more failures.

Rank #3
Sale
GMKtec G3S Mini PC Intel N95 Processor (Up to 3.4GHz) 8GB RAM 256GB M.2 SSD | Mini Desktop Computer with VESA Mount for Office Home Business HTPC Proxmox, Dual 4K Display, WiFi 5, Gigabit Ethernet
  • 12th Intel Alder Lake N95 Processor – The GMKtec G3 S Mini PC is powered by the 12th Gen Intel N95 processor with 4 cores, 4 threads, 6MB cache and a burst frequency up to 3.4GHz. Compared with N100/N5105/N5100/N5095, the N95 delivers up to 36% overall performance improvement. Perfect for routine tasks, office work, and home entertainment, this compact mini desktop is more convenient than traditional bulky PCs.
  • 8GB RAM & 256GB SSD Storage – Pre-installed with 8GB DDR4 memory and a fast 256GB M.2 2242 SSD, the G3 S mini desktop offers quicker startup, smoother multitasking, and faster file transfers. Enjoy seamless performance whether you’re working on multiple applications, browsing, or streaming content.
  • Rich Interfaces & Connectivity – The G3 S mini computer comes equipped with USB 3.2 (up to 10Gbps), dual HDMI 2.0 (4K@60Hz), and a 3.5mm audio jack. With support for WiFi 5, Bluetooth 5.0, and Gigabit Ethernet (RJ45 1000MbE), it connects easily with monitors, projectors, printers, office equipment, and other peripherals, making it versatile for both home and business use.
  • Dual 4K Display Support – Featuring upgraded Intel UHD Graphics (up to 1000MHz), the G3 S supports 4K video playback and AV1 decoding for a smooth viewing experience. With dual HDMI outputs, you can connect two 4K@60Hz displays simultaneously, enabling efficient multitasking for work and entertainment.
  • GMKTEC WARRANTY - GMKtec offers a 3-year limited warranty (1 year replacement + 2 years parts replacement) for each mini PC, starting from the date of the purchase effective on all sales starting Oct. 2026. All defects due to design and workmanship are covered. With a professional after sales team always ready to attend to your needs, you can simply relax and enjoy your mini PC

Troubleshoot common batch failures

  • Every run seems to produce only one screenshot: the script may reuse screenshot.png. Give each URL a unique output filename.
  • Chrome command is not found: the executable may not be on the shell’s path or may have a different name. Invoke the installed executable by its full path.
  • Screenshot has missing content: the page may still be loading when capture begins. Adjust the readiness policy or timeout after testing the affected page; a timeout alone does not guarantee completeness.
  • Some URLs fail while others work: keep a per-URL result log, inspect the recorded error, and retry only failed inputs rather than discarding successful output.
  • Full-page output is too large for the next step: use viewport or element capture when that matches the task, or verify the receiving system’s image and storage limits before recapturing.
  • Element screenshot fails or captures the wrong area: verify that the selector exists and identifies the intended element on that page; layouts can differ across URLs.

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. One GET request returns a PNG, JPEG, WebP, or PDF, and its API accepts familiar screenshot parameter names to make switching easier. Cookie and consent banners, newsletter popups, and chat widgets can be removed before capture, with each cleanup step optional. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers report the page verdict and billing status. AI agents can use its MCP server tools, including take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. See the ScreenshotNeo API documentation for parameters and response details.

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

For example, this cURL request saves a screenshot of one URL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

Keep the key private and replace YOUR_API_KEY with your account key. To capture hundreds of URLs, call the endpoint for each input and preserve a result record per URL so you can identify and retry failures. The API also supports bulk capture of up to 100 URLs per call. Sign up for 1,000 free screenshots a month with no card.

Frequently Asked Questions

Does Chrome Headless guarantee that a page is fully loaded when it takes a screenshot?

No. Its timeout is a maximum wait; capture may proceed while loading continues.

Is there an official recommended concurrency for capturing hundreds of pages?

The cited Chrome, Puppeteer, and Playwright documentation does not establish one. Benchmark your pages and runtime.

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

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.

browser automationHeadless ChromePlaywrightPuppeteerweb screenshots

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.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.