Take clean website screenshots without cookie banners, chats or popups
Cookie consent banners, chat bubbles and newsletter popups ruin automated screenshots. Here is how to remove them reliably, with or without a screenshot API.
Since GDPR, most European websites open with a consent banner. Add a chat bubble and a newsletter popup and a third of the screenshot is covered. There are three ways to get rid of them.
1. Let the API do it (simplest)
ScreenAPI hides the common consent tools by default (block_cookies is on). Add block_chats=true for chat widgets, newsletter popups and share bars, and block_ads=true for ad networks:
curl "https://getscreenapi.com/api/v1/screenshot?url=https://example.com&block_chats=true&block_ads=true" \
-H "x-api-key: YOUR_KEY" -o clean.png2. Hide what is left with selectors
For a site-specific banner, find its container (right-click > Inspect) and pass it in hide, comma-separated:
curl "https://getscreenapi.com/api/v1/screenshot?url=https://example.com&hide=.promo-bar,%23signup-modal" \
-H "x-api-key: YOUR_KEY" -o clean.png3. Accept or close it with a click
Some sites blur or lock the page until consent is given; hiding the banner is not enough. Click the button instead:
{ "url": "https://example.com", "click": "#accept-all", "delay": 500 }Doing it yourself in Puppeteer or Playwright
The same three techniques work in your own scripts: inject CSS that hides known containers, click the accept button, or block the consent scripts' network requests. The hard part is keeping the list of tools up to date. See Puppeteer full-page screenshots.
Clean captures on every plan, including the free one.
Get a free key