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

For a repeatable bulk screenshot job, run Playwright on an EC2 instance in AWS Asia Pacific (Mumbai), region ap-south-1. Install Node.js and the matching Playwright browser and Linux dependencies, then process URLs through a bounded worker queue. Use page.screenshot({ fullPage: true }) for full-page images; omit it for viewport-only captures. The guide below includes a runnable Node.js pattern, deployment and safety notes, and practical troubleshooting.

Choose the Mumbai Region and a suitable instance

In the AWS console, select the Asia Pacific (Mumbai) Region, whose code is ap-south-1. Check AWS’s current regional instance availability when you launch: available instance families and sizes can change, and there is no universal instance size for an unspecified batch.

Start with a modest instance and low concurrency. Run representative URLs, then monitor memory, CPU, timeouts, and successful captures before changing the instance size or worker count. Throughput and cost depend on the pages, browser version, viewport, instance, and workload; do not assume a fixed screenshots-per-minute rate.

Install Node.js and Playwright’s matching browser

On your chosen Linux AMI, install a supported Node.js runtime, create a project, and add Playwright. Pin the package version so the browser build installed on EC2 matches the version used by the project. Install the browser binaries and required system dependencies using Playwright’s browser installation instructions. Browser downloads use hundreds of megabytes, depending on the browser.

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

For a Chromium-headless-shell-only workload, Playwright documents an --only-shell installation option. Use it only if that mode suits your capture needs. If you choose a different supported browser or Chromium mode, install and launch the matching binary and channel. Avoid copying a browser cache from a different operating system.

Minimal project setup

  1. Install Node.js for your Linux AMI using the installation method appropriate to that AMI.
  2. In your project directory, run npm init -y if the project does not already have a package file.
  3. Install Playwright with npm install playwright.
  4. Install Chromium and its Linux dependencies with npx playwright install --with-deps chromium. If using only the headless shell and that mode fits, consult the Playwright documentation for its --only-shell option.
  5. Save the capture script below as capture.js and run it with node capture.js urls.txt output.

Capture many URLs with a bounded worker queue

This script reads one URL per line, creates one isolated browser context per capture, uses a fixed viewport, and limits concurrent jobs. It writes a PNG per input URL and a JSON-lines manifest recording success or failure and a timestamp. The concurrency and navigation timeout are example starting values, not performance guarantees.

Rank #2
Dell Latitude 3190 11.6" HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
  • 1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core
  • 4GB DDR4 System Memory; 128GB Solid State Drive
  • 11.6" HD (1366 x 768) Multi-Touch Display
  • Combo headphone/microphone jack - Noble Wedge Lock slot - HDMI; 2 USB 3.1 Gen 1
  • Windows 11 Pro
const { chromium } = require('playwright');
const fs = require('node:fs/promises');
const path = require('node:path');
const crypto = require('node:crypto');

function safeHost(url) {
  try {
    return new URL(url).hostname.replace(/[^a-zA-Z0-9.-]/g, '_') || 'page';
  } catch {
    return 'invalid-url';
  }
}

async function capture(urls, outputDir, concurrency = 2) {
  await fs.mkdir(outputDir, { recursive: true });
  const manifestPath = path.join(outputDir, 'manifest.jsonl');
  const browser = await chromium.launch({ headless: true });
  let next = 0;

  async function record(entry) {
    await fs.appendFile(manifestPath, JSON.stringify(entry) + 'n');
  }

  async function worker() {
    while (true) {
      const index = next++;
      if (index >= urls.length) return;
      const url = urls[index];
      const stamp = new Date().toISOString();
      const suffix = crypto.createHash('sha256').update(url).digest('hex').slice(0, 12);
      const outputPath = path.join(outputDir, `${String(index).padStart(5, '0')}-${safeHost(url)}-${suffix}.png`);
      let context;
      try {
        // Validate URLs against your own policy before navigating. Do not let
        // untrusted input reach private or otherwise sensitive network targets.
        const parsed = new URL(url);
        if (!['http:', 'https:'].includes(parsed.protocol)) {
          throw new Error('Only http: and https: URLs are allowed');
        }
        context = await browser.newContext({ viewport: { width: 1440, height: 900 } });
        const page = await context.newPage();
        await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 45_000 });
        await page.screenshot({ path: outputPath, fullPage: true });
        await record({ index, url, status: 'ok', file: outputPath, timestamp: stamp });
      } catch (error) {
        console.error(`Capture failed for ${url}:`, error.message);
        await record({ index, url, status: 'error', error: error.message, timestamp: stamp });
      } finally {
        if (context) await context.close().catch(() => {});
      }
    }
  }

  try {
    await Promise.all(Array.from({ length: Math.max(1, concurrency) }, worker));
  } finally {
    await browser.close();
  }
}

async function main() {
  const [inputFile, outputDir = 'shots'] = process.argv.slice(2);
  if (!inputFile) throw new Error('Usage: node capture.js urls.txt [output-dir]');
  const text = await fs.readFile(inputFile, 'utf8');
  const urls = text.split(/r?n/).map(line => line.trim()).filter(Boolean);
  await capture(urls, outputDir, 2);
}

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

The code uses a separate context per job to isolate cookies, local storage, and other session state. If multiple pages intentionally need the same session, use a shared context deliberately instead; contexts can be created and closed through the Browser API. Keep input controlled: URL validation here checks the scheme, but production systems that accept outside input need a policy that also prevents access to sensitive internal network destinations.

Choose what counts as a finished page

The example waits for domcontentloaded and then captures. That event does not guarantee that every image, font, animation, or lazy-loaded section has finished. Network-idle is not a universal alternative: some pages keep requests open, and a quiet network does not prove that below-the-fold content has loaded.

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.
Rank #3
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
  • 256 GB SSD of storage.
  • Multitasking is easy with 16GB of RAM
  • Equipped with a blazing fast Core i5 2.00 GHz processor.

For a specific site, select a deliberate completion condition, such as waiting for a known selector or a measured delay after navigation. If lazy content matters, test the page’s behavior and consider scrolling it into view before capture. Do not add a wait that assumes every site behaves the same.

Choose screenshot extent and browser context

Choice Use it when Implementation
Viewport screenshot You need only the visible browser area. Call page.screenshot({ path: outputPath }) without fullPage.
Full-page screenshot You need the full scrollable page in one image. Set fullPage: true, as in the example. See Playwright’s screenshot documentation.
Separate context for each URL Pages should not share cookies or other browser state. Create and close a context for each job.
Shared context Pages intentionally need the same login or session state. Reuse a context and manage page lifecycle explicitly; shared state means one page’s session can affect another.
Chromium headless shell A focused headless workload fits the shell mode. Install the matching shell build using Playwright’s documented option; verify the desired rendering behavior for your task.
Other supported browser or channel You need browser coverage or rendering that differs from the shell. Install and launch the matching supported browser and channel.

Keep bulk jobs bounded, consistent, and recoverable

Set concurrency deliberately

Do not create an unbounded number of pages. Each browser job consumes resources, and target sites may rate-limit or block high request volumes. The sample uses two workers as an operational starting point, not a benchmark. Increase gradually only after observing the actual URLs and instance. Playwright Test has its own --workers setting, but that controls test-runner workers; a plain Node.js script needs its own queue or semaphore. Playwright documents that workers are separate processes, each starting a browser, in its parallelism guide.

Rank #4
15.6 Inch Laptop Computer, N4020, 4GB DDR4 RAM, 128GB eMMC,with Windows 11
  • EFFORTLESS EVERYDAY PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 Home system, delivering reliable, low-power efficiency for daily tasks like document editing, email, online classes, and web browsing
  • 15.6-INCH FULL HD DISPLAY: Enjoy immersive visuals on the 15.6" FHD (1920x1080) anti-glare screen with micro-edge bezels. Delivers clear details and comfortable viewing for long study sessions, working on spreadsheets, and video playback
  • RESPONSIVE MULTITASKING & STORAGE: Built with 4GB LPDDR4 RAM and 128GB eMMC storage for smooth daily essential use. Expand your storage by up to 1TB via the integrated TF card slot to easily store movies, photos, and working files
  • ADVANCED CONNECTIVITY: Outfitted with 2x Full-Featured Type-C ports for data transfer, fast charging, and dual-monitor output, alongside 2x USB 3.2 Gen1 ports and a 3.5mm audio jack for complete peripheral compatibility
  • LIGHTWEIGHT & SILENT OPERATION: Slim and portable for effortless travel or commuting. Features a 1MP HD webcam for remote meetings, 38Wh battery with 45W Type-C fast charging, and a fanless silent design for peaceful work environments.

Make outputs auditable

  • Use a run-specific output directory and collision-resistant filenames; an input index plus hostname and URL hash is one option.
  • Keep a manifest with the URL, timestamp, output path, and outcome so failed pages can be retried without guessing which files are complete.
  • Check that expected files exist and are nonempty before treating a batch as complete.
  • Store output on a filesystem with enough capacity. If artifacts need durable retention, upload them to an approved object-storage destination chosen for your retention, access, and budget needs.
  • For production jobs, add capped retries for transient failures and handle browser-process crashes. Do not retry indefinitely or ignore persistent failures.

Stabilize images you plan to compare

Rendering can differ across host operating systems, browser versions, settings, hardware, and headless modes. Keep the AMI, Node.js and Playwright versions, browser binary, viewport, and capture conditions stable when comparing screenshot output. Pages themselves may vary by location, authentication, time, or automated-access protections. Respect each site’s terms and rate limits, and do not bypass access controls.

Secure the EC2 workload and close it when finished

  • Use a dedicated instance and a least-privilege role for the job.
  • Restrict administrative ingress to trusted source addresses. AWS’s security-group guide warns against allowing SSH or RDP from anywhere because that exposes access to all internet IP addresses.
  • Treat URL input as untrusted if it comes from users or external systems. Scheme validation alone is not sufficient to prevent requests to sensitive internal destinations; enforce an appropriate network and URL policy.
  • When captures are complete, stop or terminate the instance as appropriate and close other billed resources you no longer need. EC2 availability and pricing vary by instance and region; check current AWS details for your account and launch choices.

Troubleshoot common failures

Symptom Likely cause What to do
Playwright cannot launch Chromium or reports missing shared libraries The browser build or Linux dependencies are absent or do not match the installed Playwright package. Reinstall the matching browser and dependencies using the Playwright install flow for the pinned package version.
Navigation times out The site is slow, blocked, unreachable from the instance, or the chosen completion condition never occurs. Check the URL from the instance, inspect the error, and choose a timeout and navigation condition appropriate to the target. Do not assume network-idle will suit every page.
Image is blank, partial, or missing below-fold content The page may not have rendered yet, lazy content may not have loaded, or the site may serve different content or block automation. Wait for a meaningful selector or site-specific condition, test any needed scrolling, and inspect the page without attempting to evade access controls.
Process slows down or runs out of memory Concurrency is too high for the instance or pages retain resources. Lower worker count, ensure each context closes in a finally path, and measure resource use before scaling up.
Output files overwrite one another Filenames are derived only from a hostname or another non-unique value. Include the input index and a URL hash or another collision-resistant identifier.
Some URLs fail while the batch continues Individual sites can fail independently; a single batch-wide success flag hides partial completion. Record per-URL status in a manifest, verify expected files, and retry only transient failures with a capped policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server for developers. A single GET request can return a PNG, JPEG, WebP, or PDF. Cookie and consent banners are accepted and removed, alongside known newsletter popups and chat widgets, before capture; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, with response headers identifying the page verdict and billing status. AI agents can use its MCP server tools, including take_screenshot, get_page_info, and capture_pdf.

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

Here is a one-call cURL example. See the ScreenshotNeo API documentation for request options and response details.

Best Value
Sale
15.6 Inch Win 11 Laptop Computer, N4020, 4GB DDR4 RAM, 128GB Storage
  • 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.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

One thousand screenshots a month are free with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.

Quick Recap

Bestseller No. 1
HP 14' HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
HP 14" HD Laptop, Windows 11, Intel Celeron Dual-Core Processor Up to 2.60GHz, 4GB RAM, 64GB SSD, Webcam, Dale Pink (Renewed)
14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
$249.99
Bestseller No. 2
Dell Latitude 3190 11.6' HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
Dell Latitude 3190 11.6" HD 2-in-1 Touchscreen Laptop Intel N5030 1.1Ghz 4GB Ram 128GB SSD Windows 11 Professional (Renewed)
1.1 GHz (boost up to 2.4GHz) Intel Celeron N5030 Quad-Core; 4GB DDR4 System Memory; 128GB Solid State Drive
$179.99
Bestseller No. 3
Dell Latitude 5420 14' FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
Dell Latitude 5420 14" FHD Business Laptop Computer, Intel Quad-Core i5-1145G7, 16GB DDR4 RAM, 256GB SSD, Camera, HDMI, Windows 11 Pro (Renewed)
256 GB SSD of storage.; Multitasking is easy with 16GB of RAM; Equipped with a blazing fast Core i5 2.00 GHz processor.
$289.99

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.