Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk7 min

How to Take Bulk Screenshots of URLs While Blocking Ads and Trackers

A practical Playwright workflow for batch website screenshots, with request filtering, service-worker caveats, repeatable settings and failure logging.

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.

For repeatable bulk screenshots, run a browser automation script over a validated URL list, install request-blocking rules before navigating, and save each capture under a unique filename. Playwright provides the browser primitives for navigation, routing and screenshots; your script supplies the batch loop, failure log and naming scheme. Blocking depends on your rules and browser configuration, so it cannot guarantee that every ad or tracking method is removed.

What you need to decide first

  • Capture scope: choose a fixed viewport for comparable images or a full-page image for the whole scrollable document.
  • Filtering: select an actively maintained request rule set and decide how to handle service workers. Blocking can break site functionality, especially when rules match resources the page needs.
  • Repeatability: keep viewport, navigation wait condition, filtering rules and browser settings consistent between runs.
  • Batch handling: validate URLs, use filenames that cannot collide, and record success or failure for every URL.

Playwright documents navigation followed by a screenshot, plus request routing and full-page capture. The batch loop and filename strategy below are implementation guidance built from those API primitives, not a tested script.

As an Amazon Associate I earn from qualifying purchases.

Build a Playwright batch capture

Install Playwright

In a new Node.js project, install Playwright and its browser:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. npm init -y
  2. npm install playwright
  3. npx playwright install chromium

Create a URL list and capture script

Save one URL per line in urls.txt. Create capture.cjs with the following script. It uses Chromium, a consistent viewport, a basic illustrative hostname denylist, and a per-URL result log. Replace the example block rules with a maintained list appropriate to your needs; this sample is not a comprehensive ad or tracker filter.

#1 Best Overall
Sale
TP-Link AX1800 WiFi 6 Router (Archer AX21 V5) | Dual Band Wireless Internet, Gigabit, Easy Mesh, Works with Alexa - A Certified for Humans Device
  • DUAL-BAND WIFI 6 ROUTER: Wi-Fi 6(802.11ax) technology achieves faster speeds, greater capacity and reduced network congestion compared to the previous gen. All WiFi routers require a separate modem. Dual-Band WiFi routers do not support the 6 GHz band.
  • AX1800: Enjoy smoother and more stable streaming, gaming, downloading with 1.8 Gbps total bandwidth (up to 1200 Mbps on 5 GHz and up to 574 Mbps on 2.4 GHz). Performance varies by conditions, distance to devices, and obstacles such as walls.
  • CONNECT MORE DEVICES: Wi-Fi 6 technology communicates more data to more devices simultaneously using revolutionary OFDMA technology
  • EXTENSIVE COVERAGE: Achieve the strong, reliable WiFi coverage with Archer AX1800 as it focuses signal strength to your devices far away using Beamforming technology, 4 high-gain antennas and an advanced front-end module (FEM) chipset
  • OUR CYBERSECURITY COMMITMENT: TP-Link is a signatory of the U.S. Cybersecurity and Infrastructure Security Agency’s (CISA) Secure-by-Design pledge. This device is designed, built, and maintained, with advanced security as a core requirement.
const fs = require('node:fs/promises');
const path = require('node:path');
const { chromium } = require('playwright');

const urls = (await fs.readFile('urls.txt', 'utf8'))
  .split(/r?n/)
  .map(line => line.trim())
  .filter(Boolean);

const outputDir = 'screenshots';
await fs.mkdir(outputDir, { recursive: true });

const browser = await chromium.launch({ headless: true });
const context = await browser.newContext({
  viewport: { width: 1365, height: 768 },
  serviceWorkers: 'block'
});

// Illustrative only: substitute and maintain rules for your use case.
const blockedHosts = new Set(['doubleclick.net', 'googlesyndication.com']);
await context.route('**/*', async route => {
  const hostname = new URL(route.request().url()).hostname;
  const shouldBlock = [...blockedHosts].some(host =>
    hostname === host || hostname.endsWith(`.${host}`)
  );
  if (shouldBlock) return route.abort();
  return route.continue();
});

const results = [];
for (let i = 0; i < urls.length; i++) {
  const url = urls[i];
  const filename = `${String(i + 1).padStart(4, '0')}.png`;
  const page = await context.newPage();
  try {
    const response = await page.goto(url, {
      waitUntil: 'domcontentloaded',
      timeout: 30000
    });
    await page.screenshot({ path: path.join(outputDir, filename), fullPage: true });
    results.push({ url, file: filename, status: response?.status() ?? null, error: null });
  } catch (error) {
    results.push({ url, file: null, status: null, error: error.message });
  } finally {
    await page.close();
  }
}

await fs.writeFile('results.json', JSON.stringify(results, null, 2));
await browser.close();

Run it with node capture.cjs. Images go into screenshots/; results.json records the URL, saved filename, HTTP status when available, and navigation or capture error. The numeric filenames are unique within a run and preserve input order. If you need names tied to URL identity, derive a filesystem-safe slug and append a hash; do not rely on a raw URL as a filename.

Set request filtering before navigation

The script registers routing before it visits any URL. Playwright’s page.route() can intercept requests and continue or abort them. Playwright notes that requests intercepted by service workers are not handled by this routing mechanism and recommends blocking service workers when interception is required. The script sets serviceWorkers: 'block' on the browser context for that reason. See the Playwright Page documentation.

A hostname denylist is only a simple demonstration: it misses trackers served from other hosts and may block legitimate content if rules are too broad. A production workflow should load maintained rules, test them against representative sites, and preserve the ruleset version with each run. Request filtering does not by itself establish that cookies, fingerprinting, or other non-request tracking techniques are prevented.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
TP-Link AC1200 WiFi Router Dual Band Wireless Internet Router (Archer A54) | 4 x 10/100 Mbps Fast Ethernet Ports, EasyMesh Compatible, Support Guest WiFi, Access Point Mode, IPv6 & Parental Controls
  • Dual-band Wi-Fi with 5 GHz speeds up to 867 Mbps and 2.4 GHz speeds up to 300 Mbps, delivering 1200 Mbps of total bandwidth¹. Dual-band routers do not support 6 GHz. Performance varies by conditions, distance to devices, and obstacles such as walls.
  • Covers up to 1,000 sq. ft. with four external antennas for stable wireless connections and optimal coverage.
  • Supports IGMP Proxy/Snooping, Bridge and Tag VLAN to optimize IPTV streaming
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home
  • Advanced Security with WPA3 - The latest Wi-Fi security protocol, WPA3, brings new capabilities to improve cybersecurity in personal networks

Choose viewport or full-page capture

The example sets a viewport of 1365 × 768 CSS pixels and saves a full-page screenshot. For a viewport-only image, remove fullPage: true. A viewport capture is easier to compare across runs; a full-page image includes the document’s full scrollable area and may be very tall. Playwright’s screenshot guide documents full-page capture and saving screenshots to a path or buffer.

Make captures consistent and useful

Choose when navigation is considered ready

The sample waits for domcontentloaded, which is a specific navigation milestone, not a guarantee that every image, ad slot or client-rendered component has finished. Sites load content asynchronously, so choose a wait condition suited to the pages and record it with your run settings. You can use a deliberate delay or wait for a page-specific selector when a known element indicates readiness. Cloudflare’s snapshot example exposes navigation wait and timeout options, but timing still varies by site: Cloudflare Browser Run documentation.

Handle large or slow pages

  • Set a timeout appropriate to your use case and preserve timeout errors in the result log.
  • Consider whether full-page capture is necessary for every URL; very long pages create large images and take longer to capture.
  • Run a small representative batch first. Check for missing images, blank areas, consent overlays and functionality affected by blocked requests.
  • If captures need to be comparable, keep viewport and wait settings stable and note any changes to the filtering rules.

Keep failures separate from successful captures

Do not silently treat a failed navigation as a screenshot. Record the URL and error, then decide whether to retry it in a separate pass. A response status is not a complete quality check: a page can return successfully and still render as blank or incomplete. Inspect outputs, especially after changing block rules.

Rank #3
Sale
ASUS RT-AX1800S Dual Band WiFi 6 Extendable Router, Subscription-Free Network Security, Parental Control, Built-in VPN, AiMesh Compatible, Gaming & Streaming, Smart Home
  • New-Gen WiFi Standard – WiFi 6(802.11ax) standard supporting MU-MIMO and OFDMA technology for better efficiency and throughput.Antenna : External antenna x 4. Processor : Dual-core (4 VPE). Power Supply : AC Input : 110V~240V(50~60Hz), DC Output : 12 V with max. 1.5A current.
  • Ultra-fast WiFi Speed – RT-AX1800S supports 1024-QAM for dramatically faster wireless connections
  • Increase Capacity and Efficiency – Supporting not only MU-MIMO but also OFDMA technique to efficiently allocate channels, communicate with multiple devices simultaneously
  • 5 Gigabit ports – One Gigabit WAN port and four Gigabit LAN ports, 10X faster than 100–Base T Ethernet.
  • Commercial-grade Security Anywhere – Protect your home network with AiProtection Classic, powered by Trend Micro. And when away from home, ASUS Instant Guard gives you a one-click secure VPN.

Trade-offs: self-hosted Playwright or managed capture

Self-hosted Playwright gives you control over the browser, request rules and batch orchestration. A managed browser service can reduce browser-runtime maintenance, but you still need to check whether it accepts batches directly, what its limits and costs are, and how it handles your data.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Approach Documented capability What you must assess
ScreenshotNeo Website screenshot API and MCP server; one GET request can return an image or PDF. It offers request blocking options, and its billing headers distinguish page verdicts and billed captures. Whether its available options and verdict-based billing suit your capture and filtering requirements. See ScreenshotNeo.
Self-hosted Playwright Navigate to pages, route requests, and capture viewport or full-page screenshots. Browser installation and maintenance, rule-list upkeep, batch orchestration, output handling and service-worker behavior.
Cloudflare Browser Run snapshot Its documented /snapshot endpoint can return rendered content and a screenshot in one request for a URL or HTML input. Account or Workers binding requirements, current limits and pricing, data handling, and whether you need to orchestrate individual URL requests. The cited documentation does not establish bulk-list processing in one call.

Cloudflare’s snapshot documentation was last updated September 26, 2026; check its current documentation for endpoint details and terms before adopting it. None of these documented browser primitives alone proves comprehensive tracker blocking.

Or skip the browser setup

ScreenshotNeo provides a screenshot API and an MCP server for AI agents. It accepts a URL in a single GET request; check its API documentation for available options and parameters. Here is the one-call cURL form:

Rank #4
Sale
TP-Link AXE5400 Tri-Band WiFi 6E Router, 2025 PCMag Editors' Choice | 2.5Gbps WAN Port for Gaming & Streaming, 6GHz Band, 160MHz, OneMesh, Dual-Core CPU, VPN & WPA3 (Archer AXE75)
  • Tri-Band WiFi 6E Router - Up to 5400 Mbps WiFi for faster browsing, streaming, gaming and downloading, all at the same time(6 GHz: 2402 Mbps;5 GHz: 2402 Mbps;2.4 GHz: 574 Mbps)
  • WiFi 6E Unleashed – The 6 GHz band brings more bandwidth, faster speeds, and near-zero latency; Enables more responsive gaming and video chatting
  • Connect More Devices—True Tri-Band and OFDMA technology increase capacity by 4 times to enable simultaneous transmission to more devices
  • Unique Design, More RAM, Better Processing - A unique housing design provides optimal heat dissipation, combined with a 1.0 GHz dual-core CPU and 512 MB High-Speed Memory, the AXE75 is designed for long-term reliability and performance.
  • EasyMesh-compatible - Extend network range even more by adding EasyMesh-compatible routers, extenders, or wireless powerline adapters for a seamless, whole-home connection. Eliminate dead zones, drops, and lag as you move across your home.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

For a URL list, call the endpoint once per URL from your batch script and save each response under a unique filename. ScreenshotNeo’s clean-shot options accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups and chat widgets before capture; each step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and responses include X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Sign up for free and get 1,000 screenshots a month with no card.

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

Troubleshooting

Some ads or trackers still appear

Check whether the request host matches a rule, whether the rule list is current, and whether the request bypasses the routing path. Playwright’s routing limitation around service workers is why the example blocks them. Do not infer that an incomplete blocklist guarantees privacy protection.

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

A page is missing images or interactive content

Your rules may be blocking first-party or required resources, or the screenshot may happen before asynchronous content appears. Temporarily disable filtering for that URL to isolate the cause, then refine rules and wait conditions.

The screenshot is blank or incomplete

Check the navigation error and HTTP status in results.json, then inspect whether the page needs a longer wait or a selector-based readiness condition. A successful navigation status alone does not confirm a visually complete render.

Best Value
TP-Link AC1200 Gigabit Dual Band WiFi Router (Archer A6) | MU-MIMO Wireless Internet Router, 4 x Antennas, OneMesh and AP Mode, Long Range Coverage
  • Dual band router upgrades to 1200 Mbps high speed internet (300mbps for 2.4GHz plus 900Mbps for 5GHz), reducing buffering and ideal for 4K stream
  • Full Gigabit Ports - Gigabit Router with 4 Gigabit LAN ports, ideal for any internet plan and allow you to directly connect your wired devices
  • Boosted Coverage - Four external antennas equipped with Beamforming technology extend and concentrate the Wi-Fi signals
  • MU-MIMO technology - (5GHz band) allows high speeds for multiple devices simultaneously
  • Access Point Mode - Supports AP Mode to transform your wired connection into wireless network, an ideal wireless router for home

Files are overwritten

Ensure each URL gets a unique index or generate a stable identifier from the URL. If multiple runs write to the same output directory, include a run identifier in the directory name or filename.

The batch stops after a single error

Keep navigation and screenshot work inside a per-URL try/catch, as in the sample, so an individual failure is logged and the loop proceeds. Add retry logic only if you also record attempts and avoid masking persistent failures.

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

Frequently Asked Questions

Does blocking ads and trackers remove every kind of tracking?

No. Request interception only blocks requests that match your rules and pass through the interception mechanism; it does not establish that other tracking techniques are prevented.

Does Cloudflare Browser Run’s snapshot endpoint accept a whole URL list in one request?

The cited Cloudflare documentation describes a snapshot request for a URL or HTML input, not bulk-list processing in one call.

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.

Leave a Reply

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

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.

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.