ScreenshotNeo

BlogHow-to

How to Capture a Website Screenshot After Dismissing a Cookie Banner with CaptureKit

CaptureKit’s guide shows a cookie-banner removal option, but its current API reference does not list it. Learn how to verify support and capture reliably.

By the ScreenshotNeo team4 October 20267 min read

CaptureKit’s March 2026 guide shows remove_cookie_banners=true in a screenshot request. However, the current CaptureKit API reference does not list that parameter. Confirm that it works with your account and the live API before relying on it. Also, a banner missing from a screenshot does not prove that the site accepted or saved a consent choice: the reviewed documentation does not explain whether this option interacts with the banner or only removes it from the captured view.

The CaptureKit guide’s example sends a request to https://api.capturekit.dev/v1/capture, authenticates with an x-api-key header, and includes remove_cookie_banners=true. Its example uses POST, while the current API reference labels the endpoint GET. That mismatch is another reason to check the current reference and confirm the request method your account supports before using the example in production.

The sample below follows the guide’s POST example. The values are illustrative settings from that guide, not required defaults. It checks for an HTTP error and writes the response body to a PNG file; verify that the returned body is an image before using it downstream.

curl --fail-with-body --request POST \
  'https://api.capturekit.dev/v1/capture?url=https%3A%2F%2Fexample.com&format=png&full_page=true&full_page_scroll=true&full_page_scroll_duration=800&width=1440&height=1200&remove_cookie_banners=true&remove_ads=true&wait_until=networkidle2&delay=2' \
  --header 'x-api-key: YOUR_API_KEY' \
  --output screenshot.png

Use your actual API key and the page you are authorized to capture. If the documented endpoint expects GET, adapt the request method and parameter placement to the current reference rather than assuming the guide’s POST sample remains valid.

2. Choose waits and page coverage for the target site

Cookie banners and page content can appear at different times. CaptureKit’s reference documents several ways to control when capture happens. Start with the least waiting needed, then add a selector wait or delay if the screenshot shows that the page is not ready.

Option Documented behavior When to use it
wait_until Supports networkidle2, load, domcontentloaded, and networkidle0. Choose a page-load condition that fits the target. Network-idle conditions can be unsuitable for pages with persistent network activity.
wait_for_selector Waits for a specified selector. Use when a particular page element must appear before capture. The selector must match the actual page.
delay Accepts zero to ten seconds. Add a short delay for content that appears after the chosen load condition.
full_page Enables a full-page capture. Use when the output must include content below the initial viewport.
full_page_scroll Optional scrolling for lazy-loaded elements; the guide pairs it with full-page capture. Use when below-the-fold images or sections load only as the page is scrolled.
full_page_scroll_duration The reference gives a 400 ms default. The guide example uses 800. Increase from the default if lazy content needs more time to load during scrolling.

For a quick initial-viewport capture, omit full-page scrolling. For a full-page capture, enable it when the target uses lazy loading and inspect the result for missing sections. For repeat comparisons, keep the viewport and timing settings consistent; this makes the capture setup more comparable, but does not guarantee identical rendering.

3. Know what “dismissed” means in the screenshot

There are two different outcomes that can look alike in an image:

  • Visual removal: the banner is not visible in the captured image.
  • Consent interaction: a visitor’s choice is made and recorded by the site, potentially in a cookie or local storage.

The reviewed CaptureKit documentation does not say which outcome remove_cookie_banners performs. Do not treat a clean image as evidence that consent was accepted, rejected, or stored. If your workflow requires a real consent choice, use a documented interaction flow and verify the site’s resulting state separately.

The current API reference documents remove_selectors for hiding specified elements. This can be a visual fallback when you know the banner’s selector, but it likewise does not establish that the site recorded consent. Check the resulting screenshot against the target page; there is no universal selector or guaranteed removal outcome in the reviewed sources.

4. Other documented capture settings

The API reference lists these relevant controls:

  • Output: PNG is the default; JPEG/JPG, WebP, and PDF are also listed.
  • Viewport: the documented default is 1280 × 1024. Set width and height when the layout must match a particular screen size.
  • Ads: remove_ads is documented for automatic ad removal. The guide’s sample enables it.
  • Specific elements: remove_selectors hides specified elements; use it only when you have verified the selector and desired visual result.

Consult the current CaptureKit capture reference for parameter syntax and accepted values. The separate CaptureKit guide is the source for the cookie-banner parameter and its example, but it conflicts with the current reference on parameter coverage and request method.

5. Troubleshooting

Symptom Likely cause What to do
The request rejects remove_cookie_banners or the banner remains visible. The current reference does not list this parameter, so availability may differ from the guide. Confirm support with the live API and your account. If you only need visual cleanup, try the documented remove_selectors option with a selector verified on that page.
The request returns an authentication or authorization error. The API key is missing, invalid, or sent under the wrong header. Send the key using the documented x-api-key header and verify the key and account access.
The endpoint rejects the HTTP method. The guide’s sample uses POST, while the reference labels the endpoint GET. Follow the current reference or confirm the supported method with a working account before changing the integration.
The screenshot is blank or incomplete. The page may not have finished loading, or lazy content may not have loaded during full-page capture. Try a suitable wait_until value, wait for a known selector, or add a short delay. For full-page output, enable scrolling and inspect the result.
The banner is gone, but you cannot tell whether consent was saved. The image only shows what was visible at capture time; the reviewed docs do not describe consent storage. Verify consent behavior independently in a documented interaction flow. Do not infer a stored choice from the screenshot.
The saved file is not a usable PNG. The request may have returned an error response or another output format. Check the HTTP status and response content type before treating the body as an image, and request a documented format.

6. Performance, reliability, and cost considerations

Longer waits and full-page scrolling can increase capture time. Use a short delay only when the target needs it, and avoid waiting for network idle on pages that keep requests open indefinitely; try another documented load condition or wait for a specific selector. Full-page scrolling is useful for lazy-loaded content, but it adds work and should be enabled when the page requires it.

For dependable automation, validate the HTTP status and output type, keep a copy of the URL and capture settings used, and periodically inspect screenshots for changes to the target page. The reviewed sources do not specify CaptureKit pricing, response-time guarantees, or reliability figures, so check its current commercial and service terms before estimating production cost or service levels.

7. Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. Its API accepts a URL in one GET request and returns an image or PDF. The example below uses Stripe as the target; change the URL to the page you need. See the ScreenshotNeo API documentation for request options and formats.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
  • Cookie and consent banners, newsletter popups, and chat widgets are removed before the shot; each cleanup step can be turned off.
  • Bot checks, blank pages, timeouts, failed loads, and cache hits are never billed. Responses identify the page verdict and billing status in headers.
  • An MCP server gives AI agents tools to take screenshots, get page information, and capture PDFs.
  • The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing gives two months free, and every feature is available on every plan.

Sign up for 1,000 free screenshots a month, with no card required.

8. FAQ

Does CaptureKit’s option click Accept?

The reviewed sources do not say. They support describing it as a banner-removal option in the guide, not as a confirmed consent action.

No. The March 2026 guide shows it, but the current reference reviewed for this article omits it. Verify live support before depending on it.

Can I hide a known banner with a selector?

The reference documents remove_selectors for hiding specified elements. That is a visual adjustment, not proof that consent was recorded.

Should I use a full-page screenshot?

Use one when you need content below the viewport. Enable scrolling when the page lazy-loads content as it is scrolled; otherwise, a viewport capture may be enough.