Skip to main content
Block cookie consent banners and popups from appearing in your screenshots.

Basic usage

bash
curl "https://api.domshot.com/shot?key=YOUR_API_KEY&url=https://example.com&blockBanners=true" \
  --output screenshot.png
const params = new URLSearchParams({
  key: 'YOUR_API_KEY',
  url: 'https://example.com',
  blockBanners: 'true'
});

await fetch(`https://api.domshot.com/shot?${params}`)
  .then(res => res.blob())
  .then(blob => fs.writeFile('screenshot.png', blob));
$params = [
  'key' => 'YOUR_API_KEY',
  'url' => 'https://example.com',
  'blockBanners' => 'true'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.domshot.com/shot?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$result = curl_exec($ch);
file_put_contents('screenshot.png', $result);
curl_close($ch);
package main

import (
    "net/http"
    "net/url"
)

func main() {
    params := url.Values{}
    params.Set("key", "YOUR_API_KEY")
    params.Set("url", "https://example.com")
    params.Set("blockBanners", "true")

    resp, _ := http.Get("https://api.domshot.com/shot?" + params.Encode())
    defer resp.Body.Close()

    // Save response to file
}

What gets blocked

TypeExamples
Cookie consent bannersGDPR/CCPA popups
Cookie notices”We use cookies” messages
Consent dialogs”Accept all” buttons
Cookie settingsPreference panels

Combining with other blocking

Cookie banner blocking works alongside ad and tracking blocking:
bash
curl "https://api.domshot.com/shot?key=YOUR_API_KEY&url=https://example.com&blockAds=true&blockTracking=true&blockBanners=true" \
  --output screenshot.png
const params = new URLSearchParams({
  key: 'YOUR_API_KEY',
  url: 'https://example.com',
  blockAds: 'true',
  blockTracking: 'true',
  blockBanners: 'true'
});

await fetch(`https://api.domshot.com/shot?${params}`)
  .then(res => res.blob())
  .then(blob => fs.writeFile('screenshot.png', blob));
$params = [
  'key' => 'YOUR_API_KEY',
  'url' => 'https://example.com',
  'blockAds' => 'true',
  'blockTracking' => 'true',
  'blockBanners' => 'true'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.domshot.com/shot?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$result = curl_exec($ch);
file_put_contents('screenshot.png', $result);
curl_close($ch);
package main

import (
    "net/http"
    "net/url"
)

func main() {
    params := url.Values{}
    params.Set("key", "YOUR_API_KEY")
    params.Set("url", "https://example.com")
    params.Set("blockAds", "true")
    params.Set("blockTracking", "true")
    params.Set("blockBanners", "true")

    resp, _ := http.Get("https://api.domshot.com/shot?" + params.Encode())
    defer resp.Body.Close()

    // Save response to file
}
Never expose sensitive authentication data in URLs that might be logged. Consider using environment variables for sensitive data.

Parameters

ParameterTypeDefaultDescription
blockBannersbooleanfalseEnable cookie banner blocking

See also