Screenshots
Capture clean, reliable page images with cookie cleanup, lazy loading, and tall-page stitching.
Use POST /screenshot when the image itself is the result. It is a standalone API: send one webpage URL and receive a CDN URL or base64 data URL.
curl https://api.berrycrawl.com/api/v1/screenshot \
-H "Authorization: Bearer $BERRYCRAWL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://berrycrawl.com",
"fullPage": true,
"format": "png"
}'By default, Berrycrawl removes cookie banners, blocking overlays, and chat widgets; scrolls the page to load lazy content; and chooses a safe full-page capture method. A normal request usually needs only url.
Cookie-banner control
Cookie cleanup is on by default. The cleanup flow accepts known consent managers, handles consent iframes and open shadow roots, tries multilingual accept buttons, removes leftover banners and backdrops, and restores page scrolling.
Keep the original cookie banner when it is part of the screenshot you need:
{
"url": "https://example.com",
"removeCookieBanners": false
}removeCookieBanners controls cookie and consent UI only. Use removeOverlays and removeChatWidgets to control the other cleanup passes separately.
Common controls
| Parameter | Default | Simple meaning |
|---|---|---|
fullPage | true | Capture the whole page. Set false for the visible viewport. |
format | png | Return png, jpeg, or webp. |
responseFormat | url | Return a CDN url or an inline base64 data URL. |
device | desktop | Use desktop, desktop-hd, tablet, iphone-15, or pixel-8. |
removeCookieBanners | true | Remove cookie and consent prompts. Set false to keep them. |
removeOverlays | true | Remove newsletter gates and blocking overlays. |
removeChatWidgets | true | Remove common chat and support bubbles. |
blockAds | true | Block common ad and analytics requests. |
scrollPage | true | Scroll first so lazy images and sections load. |
fullPageAlgorithm | auto | Use native capture for normal pages and stitching for very tall pages. |
maxHeight | 30000 | Stop an infinite or extremely tall page at this pixel height. |
waitForSelector | — | Wait for an element before capture. |
clickSelector | — | Click an element before capture. |
hideSelectors | [] | Hide matching elements. |
maskSelectors | [] | Cover private elements with a solid color. |
The OpenAPI reference contains the complete request schema, including custom viewports, clips, headers, cookies, CSS, location, timing, and proxy controls.
Tall and lazy pages
The default fullPageAlgorithm: "auto" uses native browser capture for ordinary pages. It switches to stitched viewport slices for very tall pages. During stitching, fixed and sticky elements are shown once instead of repeating in every slice, overlaps are removed, and maxHeight prevents endless capture on infinite-scroll pages.
{
"url": "https://example.com/catalog",
"fullPage": true,
"scrollPage": true,
"fullPageAlgorithm": "stitch",
"maxHeight": 20000,
"format": "webp",
"quality": 85
}Capture one element
{
"url": "https://example.com",
"selector": "#pricing",
"fullPage": false
}Use either selector or clip, not both.
Hide and mask content
{
"url": "https://example.com/account",
"hideSelectors": [".announcement-bar"],
"maskSelectors": [".email", "[data-private]"],
"maskColor": "#111111"
}Production images can be served from https://cdn.berrycrawl.com. Use the returned URL directly; do not derive an internal storage key.