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

How to Use Screenshot API Selectors to Hide Cookie Banners

Use a provider’s documented hide-selector control or injected CSS to remove a cookie banner from an API screenshot. Parameter names, methods, and timing vary.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To hide a cookie banner in an API-generated screenshot, pass a CSS selector that matches the banner to the screenshot provider’s documented hide-selector option. If the provider supports injected CSS, a rule targeting the same element can also work. Check the provider’s exact parameter name, HTTP method, and capture timing: they differ between APIs. A hide selector removes a matching element; a capture selector instead limits the screenshot to a chosen element.

Choose the right control for the job

First check whether your screenshot API offers built-in cookie-banner handling. That is different from supplying your own CSS selector, and neither feature has a universal parameter name.

  • Built-in banner handling: asks the provider to detect or dismiss cookie banners. For example, Screenshot API documents blockCookieBanners, while Screenshotbase documents block_cookie_banners. These names and behaviors are provider-specific.
  • Custom hide selector: targets a page element you identify. Screenshot API documents hideSelectors for POST requests; Screenshotbase documents hide_selectors as an array of CSS selectors.
  • Capture selector: selects the element to include in the screenshot, rather than an element to remove. Screenshot API documents selector for capturing a specific element.
  • Injected CSS: if supported, applies a stylesheet rule before capture. Screenshot API lists a css option for POST requests.

Do not copy a parameter name or request example from one provider into another without checking its documentation.

Find a selector that matches the banner

  1. Open the target page in a browser and inspect the cookie banner’s markup.
  2. Identify a selector for the banner container, such as a stable ID or class. Prefer a selector specific to the banner rather than a broad selector that could hide unrelated page content.
  3. Pass that selector using the provider’s documented hide-selector field, or write a CSS rule for it if the API supports CSS injection.
  4. Capture the page and inspect the result. Selector hiding only works when the selector matches an element in the rendered page; site markup can change, and a selector may match too much or too little.

For example, the CSS rule #consent-banner { display: none !important; } would target an element whose ID is consent-banner. It is illustrative only: use the selector and injection format that match the actual site and API.

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

Account for rendering and timing

Some pages render consent UI after initial navigation. If the screenshot is taken before the banner appears, a hide rule may not address the intended state; if it appears after the rule is applied, it may remain visible. Check whether your provider supports waiting for a selector or another navigation state. Screenshot API documents waitForSelector and multiple wait strategies, and ScreenshotAPI.com documents a CSS waitForSelector parameter. Whether a wait helps depends on how that particular page loads.

Also verify the API’s request-method restrictions. Screenshot API documents hideSelectors and CSS injection as POST options, so those fields should not be assumed to work in a GET request.

As an Amazon Associate I earn from qualifying purchases.

Provider behavior varies

These examples show why the documentation for your chosen endpoint matters. They describe vendor-documented capabilities, not independent tests or guarantees that a feature will work on every site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Provider Documented banner or selector controls Method or qualification
ScreenshotNeo Custom CSS and hide selectors are among its documented capture options; its capture process accepts consent banners like a visitor and removes known consent platforms, newsletter popups, and chat widgets. Individual cleanup steps can be turned off. See ScreenshotNeo documentation for request parameters.
Screenshot API blockCookieBanners, hideSelectors, selector, and custom css. hideSelectors and css are documented for POST requests. Provider documentation.
Screenshotbase block_cookie_banners is separate from hide_selectors; the latter is documented as an array, with matching elements hidden using display: none and visibility: hidden. See provider documentation for its request format.
ScreenshotAPI.com blockCookieBanners and a CSS waitForSelector are documented. The cited endpoint reference does not establish a custom hide-selector control. Endpoint reference.
ScreenshotAPI.net no_cookie_banners is documented as a boolean for hiding or blocking banners. The documentation says its default is false. Resource-control documentation.
ScreenshotCore Its overview describes selector-based element interaction, including hiding or capturing a single element. Consult its detailed endpoint documentation for exact field names: ScreenshotCore.

Or skip the browser setup

ScreenshotNeo is a screenshot API and MCP server for developers. Its one-call API supports capture options including custom CSS and selectors, and the parameter names used by other screenshot APIs also work, which can make switching easier. Its capture flow accepts the consent banner like a visitor and removes known consent platforms, newsletter popups, and chat widgets before the shot; 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.

cURL:

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

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Replace the example URL with the page you want to capture. Review the API documentation for available parameters and response details. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Troubleshooting

  • The banner is still visible: confirm the selector matches the rendered banner container and that the correct hide option and request method are being used. Check whether the banner appears asynchronously and whether the API applies the rule before capture.
  • Other page content disappears: the selector may be too broad. Narrow it to a banner-specific ID, class, or other stable element and inspect another capture.
  • The selector field is ignored or rejected: check the exact spelling, expected data type, and method in the endpoint documentation. For example, the cited Screenshot API documentation limits hideSelectors to POST.
  • The banner appears only on some runs: investigate page timing and consent UI behavior, then use a documented wait control if appropriate. Validate the output rather than assuming a fixed delay works for every site.
  • A built-in blocker misses the banner: use a custom selector or CSS only if the provider supports it, and target the actual markup. Built-in handling is not a promise of universal coverage.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently Asked Questions

Is a hide selector the same as a selector for capturing one element?

No. A hide selector removes matching page elements; a capture selector chooses an element to include in the screenshot.

Will one cookie-banner selector work on every website?

No. Selectors depend on each site’s markup, which can change. Inspect and validate the output for the page you capture.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

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 *

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
PC Slower Than It Used to Be?Free scan - under a minute
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.