Cookie Banner Blocking
Block cookie consent banners and popups from appearing in your screenshots.
Basic usage
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
| Type | Examples |
|---|
| Cookie consent banners | GDPR/CCPA popups |
| Cookie notices | ”We use cookies” messages |
| Consent dialogs | ”Accept all” buttons |
| Cookie settings | Preference panels |
Combining with other blocking
Cookie banner blocking works alongside ad and tracking blocking:
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
| Parameter | Type | Default | Description |
|---|
blockBanners | boolean | false | Enable cookie banner blocking |
See also