October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Block Ads and Cookie Banners in Browserless Screenshots

A practical guide to Browserless ad filtering and cookie-banner handling in REST screenshots and BrowserQL, with selector and CSS fallbacks.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For Browserless’s REST screenshot API, add blockAds=true to filter ads and blockConsentModals=true to handle cookie and GDPR banners. You can use both in one request. If a specific banner remains, use a verified site-specific selector to click its consent button or hide the element with CSS before capture. Check the resulting image: ad blocking can disrupt some sites, and hiding an overlay is not the same as recording a consent choice.

Block ads and consent banners in the REST screenshot API

Pass the controls as query parameters on the /screenshot endpoint. Put the target URL and screenshot settings in the JSON request body:

curl -X POST 
  "https://production-sfo.browserless.io/screenshot?token=YOUR_API_TOKEN_HERE&blockAds=true&blockConsentModals=true" 
  -H "Content-Type: application/json" 
  -d '{"url":"https://example.com","options":{"type":"png","fullPage":true}}' 
  --output screenshot.png

Replace the placeholder with your Browserless API token; do not publish a real token. The example requests a full-page PNG. The two query parameters are the relevant controls: blockAds enables Browserless’s built-in ad blocker, while blockConsentModals handles common cookie-consent overlays. Browserless documents these options for its REST screenshot API. See its REST launch parameters.

As an Amazon Associate I earn from qualifying purchases.

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

What each control does—and what it does not

blockAds=true

This turns on Browserless’s built-in ad blocker, which Browserless says is powered by uBlock Origin. Its documentation cautions that ad blocking may cause some sites not to load correctly. Filtering can affect more than visible ad placements if a page depends on a blocked resource, so compare captures with the option enabled and disabled when page content goes missing. Browserless launch parameters

blockConsentModals=true

This is the dedicated setting for cookie or GDPR consent banners. Browserless documents it for BrowserQL sessions and the REST /screenshot and /pdf APIs. Its consent example names OneTrust and CookieBot as common platforms, but advises custom selector handling for sites the built-in behavior does not cover. Browserless’s consent example

Removing a banner from a screenshot does not, by itself, show that the site received or stored a consent choice. If your workflow must establish consent rather than simply produce an unobstructed image, use a deliberate page-specific interaction and verify the site’s resulting state.

Use a narrower ad-filter ruleset when supported

When blockAds=true is enabled, blockAdsInclude can select named uBlock Origin Lite rulesets instead of loading all rulesets on supported endpoints. Browserless’s recommended general-purpose list is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
GL.iNet GL-MT3000 Beryl AX Wi-Fi 6 Travel Router, 2.5G WAN, VPN, OpenWrt
  • 【DUAL BAND AX TRAVEL ROUTER】Products with US, UK, EU Plug; Dual band network with wireless speed 574Mbps (2.4G)+2402Mbps (5G); 2.5G Multi-gigabit WAN port and a 1G gigabit LAN port; USB 3.0 port; Wi-Fi 6 offers more than double the total Wi-Fi speed with the MT3000 VPN Router.
  • 【VPN CLIENT & SERVER】OpenVPN and WireGuard are pre-installed, compatible with 30+ VPN service providers (active subscription required). Simply log in to your existing VPN account with our portable wifi device, and Beryl AX automatically encrypts all network traffic within the connected network. Max. VPN speed of 150 Mbps (OpenVPN); 300 Mbps (WireGuard). *Speed tests are conducted on a local network. Real-world speeds may differ depending on your network configuration.*
  • 【OpenWrt 21.02 FIRMWARE】The Beryl AX is a portable wifi box and mini router that runs on OpenWrt 21.02 firmware. It supports more than 5,000 ready-made plug-ins for customization. Simply browse, install, and manage packages with our no-code interface within Beryl AX's Admin Panel.
  • 【PROTECT YOUR NETWORK SECURITY】Our pocket wifi, unlike other vulnerable portable wifi hotspot for travel purposes supports WPA3 protocol–Preventive measures against password brute-force attacks; DNS over HTTPS & DNS over TLS–Protecting domain name system traffic and preventing data eavesdropping from malicious parties; IPv6–Built-in authentication for privacy protection, eliminating the need for network address translation.
  • 【VPN CASCADING AT EASE】Surpassing the mediocre performance of most VPN routers for home usage, the Beryl AX is capable of hosting a VPN server and VPN client at the same time within the same device, enabling users to remote access local network resources like Wi-Fi printers or local web servers, and accessing the public internet as a VPN client simultaneously.
ublock-filters,easylist,easyprivacy,pgl,ublock-badware,urlhaus-full

For example, add &blockAdsInclude=ublock-filters,easylist,easyprivacy,pgl,ublock-badware,urlhaus-full to the screenshot URL alongside the other parameters. Confirm that the endpoint you use honors the option: Browserless lists BrowserQL endpoints, CDP WebSocket, and the /unblock, /screenshot, and /pdf REST endpoints. Some session and bundled-build cases continue to load the full set. A selected list should not be assumed to provide identical coverage to the full ruleset. Browserless launch parameters Browserless BaaS launch options

Handle a banner the built-in consent blocker misses

Click a verified consent button

Browserless’s example shows checking for and clicking a consent selector, with examples such as [id*=accept], [class*=accept], and button[id*=cookie]. These are broad examples, not universal selectors: a match could identify an unrelated button. Prefer a selector confirmed on the target site, check that the element is visible, and verify the page state after clicking. Browserless’s consent example

Rank #2
GL.iNet GL-BE9300 Flint 3 Tri-Band Wi-Fi 7 Router 5 x 2.5G VPN Router
  • 【Rapid OpenVPN & Wireguard speed】Wireguard VPN and OpenVPN speeds both up to 680Mbps, giving you complete control over your gaming, streaming and working bandwidth. Actual speed may differ depending on internet service provider, network environment, VPN server location, VPN service provider, etc.
  • 【AdGuard Home Supported】Enabling the use of a DNS server for blocking unwanted tracking and offers a convenient web interface for filtering selected digital advertisements. Users can take full control of their online experience and enjoy a clutter-free browsing environment with ease.
  • 【Mass device connectivity】Experience enhanced online connectivity with our higher storage capacity, catering to over a hundred devices and fulfilling the requirements of DIY users seeking to install additional plugins. Enjoy stable and reliable connections, ensuring seamless performance and accommodating a wide range of digital needs.
  • 【Easy Setup】Follow the Initial Set-up video tutorial on Amazon or Connect BE9300 to your computer via Ethernet cable to access the web Admin Panel, easy connect to wireless internet.
  • 【MLO Technology】Flint 3 represents the future of wireless technology, delivering ultra-fast speeds, significantly reduced latency, and improved connectivity in high-density environments through cutting-edge innovations like Multi-Link Operation (MLO), enhanced OFDMA, 4K QAM, and preamble puncturing.

Hide a known overlay with CSS

If the goal is only to keep a known banner out of the image, Browserless’s BAP page setup guide demonstrates adding a style before capture:

await page.addStyleTag({ content: ".cookie-banner { display: none !important; }" });

Replace .cookie-banner with a selector confirmed for the page you capture. This changes the rendered view; it does not submit a consent choice. Injected styles can also hide sticky headers, but check the screenshot for an empty gap or for content that the selector unintentionally removes. Browserless BAP page setup

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

Apply consent handling in BrowserQL

Browserless documents blockConsentModals in BrowserQL session settings or launch JSON. For direct GraphQL requests, configure it in the launch payload. If the built-in behavior does not cover the page, the consent example also shows how to perform an explicit consent action in the mutation when you know the page-specific selector. The exact interaction belongs to the target page’s controls; avoid treating a generic selector as safe across unrelated sites. Browserless launch parameters Browserless’s consent example

Choose the right handling method

Method Where it is configured Best suited to Main caution
blockAds=true Browserless endpoint query parameter or supported launch configuration Broad, automated ad filtering Browserless warns some sites may fail to load correctly.
blockConsentModals=true REST screenshot or PDF request; BrowserQL session or launch settings Common cookie and GDPR banner platforms Some sites may need custom handling.
Click a consent selector Page-specific browser action or BrowserQL mutation Pages where a deliberate button interaction is appropriate A broad or incorrect selector may click the wrong control.
Inject CSS BAP page code before capture A known overlay that should only be absent from the rendered image Hiding is not consent; a wrong selector can remove useful content.
blockAdsInclude Query/launch parameter on supported endpoints, with blockAds enabled Choosing a named subset of ad-filter rulesets Endpoint scope varies, and a subset may not match full-set coverage.

Verify the screenshot and troubleshoot common problems

  • Ads or banners still appear: confirm the parameter spelling and that it is attached to the endpoint request. For consent overlays, try a target-specific selector if the built-in blocker misses that platform.
  • Page content is missing or the page fails to load: compare a capture with blockAds disabled. If your endpoint supports blockAdsInclude, try a narrower named list rather than assuming the full ruleset is harmless.
  • A click removes the wrong element or changes the page unexpectedly: replace a broad selector with one inspected on that specific page, and check visibility before clicking.
  • The image has a blank strip or missing content after hiding a banner: inspect the selector’s target and the resulting layout. A hidden overlay can leave a gap or cover content if the rule is too broad.
  • You need evidence of consent, not just a clean image: CSS removal is insufficient. Use an explicit, appropriate consent interaction and verify the page’s state.

After changing either blocker, inspect the actual output rather than assuming the rendered page is intact. Browserless’s documentation identifies the ad-blocking load risk; checking for layout shifts and unintended removals is a practical verification step.

Rank #3
GL.iNet GL-MT6000 Flint 2 Wi-Fi 6 Gaming Router Dual 2.5G Ports
  • Please update the firmware upon initial setup of the router, as it greatly enhances the device's performance and ensures a superior user experience.*** 【WiFi 6 Standard with ultra-low latency】Wi-Fi 6 speeds up to 6 Gbps to let you enjoy smoother 4K streaming, gaming, video calls and more, DDR4 1GB / eMMC 8GB
  • 【High Speed Gaming Router】Dominate with uninterrupted performance with the ultimate MT6000 gaming internet router, equipped with 8-stream Wi-Fi 6 technology, the Flint 2 delivers blazing speeds, ensuring a stable and high-speed connection during intense multiplayer battles.
  • 【Rapid OpenVPN & Wireguard speed】Wireguard VPN and OpenVPN speeds up to 900Mbps and 880Mbps respectively, giving you complete control over your gaming, streaming and working bandwidth. Actual speed may differ depending on internet service provider, network environment, VPN server location, VPN service provider, etc.
  • 【AdGuard Home Supported】Enabling the use of a DNS server for blocking unwanted tracking and offers a convenient web interface for filtering selected digital advertisements. Users can take full control of their online experience and enjoy a clutter-free browsing environment with ease.
  • 【Mass device connectivity】Experience enhanced online connectivity with our higher storage capacity, catering to over a hundred devices and fulfilling the requirements of DIY users seeking to install additional plugins. Enjoy stable and reliable connections, ensuring seamless performance and accommodating a wide range of digital needs.
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 screenshot API and MCP server for developers. Its one-request API can return a PNG, JPEG, WebP, or PDF; cookie and consent banners, newsletter popups, and chat widgets are removed before capture, and each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, with the page verdict and billing status reported in response headers. AI agents can take screenshots through its MCP server tools.

For the API key and parameter details, see the ScreenshotNeo documentation.

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

The free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.

Rank #4
GL.iNet GL-MT5000 Brume 3 Wired VPN Security Gateway NO Wi-Fi
  • 【Up to 1100 Mbps VPN Speed 】 Hardware-accelerated WireGuard and OpenVPN-DCO deliver up to 1100 Mbps VPN throughput, over 3× faster than Brume 2 for smooth remote access and file transfers.
  • 【Three 2.5G Ports & Multi-WAN】Tri-port 2.5GbE design with flexible WAN LAN configuration supports multi-gigabit wired setups, dual-ISP Multi-WAN and failover to keep home and SOHO networks online.
  • 【Stealth VPN Obfuscation】VPN obfuscation disguises VPN traffic as regular HTTPS, helping you evade blocking, bypass restrictive networks and maintain stable, private connections.
  • 【DPI protection】Deep Packet Inspection with visual dashboards blocks adult/gambling/malicious sites, while SQM and QoS prioritize gaming, calls, and video when bandwidth is tight
  • 【OpenWrt & USB 3.0 Expansion】OpenWrt with 1GB DDR4 and 8GB eMMC lets you install plugins and build VPN, ad-blocking or NAS, while USB 3.0 Type‑C connects high-speed storage or 4G/5G dongles

FAQ

Does hiding a cookie banner count as accepting cookies?

No. CSS hides an element in the rendered page; it does not establish that the site received a consent choice.

Can I use these controls for a PDF instead of a screenshot?

Browserless documents blockConsentModals for its REST /pdf API as well as /screenshot. Check the endpoint’s launch-parameter documentation for the controls available to your specific request.

Best Value
GL.iNet GL-MT3600BE Beryl 7 Dual-Band Wi-Fi 7 Travel Router
  • 【DUAL BAND WIFI 7 TRAVEL ROUTER】Products with US, UK, EU, AU Plug; Dual band network with wireless speed 688Mbps (2.4G)+2882Mbps (5G); Dual 2.5G Ethernet Ports (1x WAN and 1x LAN Port); USB 3.0 port. Enjoy gaming and streaming across up to 120 devices.
  • 【HIGH SPEED VPN CLIENT & SERVER】Max. VPN speed of 1100 Mbps (WireGuard); 1000 Mbps (OpenVPN-DCO). OpenVPN and WireGuard are pre-installed, compatible with 30+ VPN service providers (active subscription required). Simply log in to your existing account with our portable wifi device, and Beryl 7 automatically encrypts all network traffic within the connected network. *Speed tests are conducted on a local network. Real-world speeds may differ depending on your network configuration.*
  • 【OpenWrt 21.02 FIRMWARE】The Beryl 7 (GL-MT3600BE) is a high-performance Wi-Fi 7 travel router, built with OpenWrt 21.02 (Kernel 5.4.281) for maximum customization and advanced networking capabilities. With 512MB storage, total customization with open-source freedom and flexible installation of OpenWrt plugins.
  • 【PERFECT PORTABLE WIFI ROUTER FOR TRAVEL】The Beryl 7 is an ideal international wireless portable wifi travel router. With its mini size and travel-friendly features, the pocket Wi-Fi router is the perfect companion for travelers in need of a secure internet connectivity on the go. portable wi-fi for traveling, hotels or cruise ships.
  • 【PROTECT YOUR NETWORK SECURITY】Our pocket wifi, unlike other vulnerable portable wifi hotspot devices for travel purposes supports WPA3 protocol–Preventive measures against password brute-force attacks; DNS over HTTPS & DNS over TLS–Protecting domain name system traffic and preventing data eavesdropping from malicious parties; IPv6–Built-in authentication for privacy protection, eliminating the need for network address translation.

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 *

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
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair 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.