Docs
Scraping workflows

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 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

ParameterDefaultSimple meaning
fullPagetrueCapture the whole page. Set false for the visible viewport.
formatpngReturn png, jpeg, or webp.
responseFormaturlReturn a CDN url or an inline base64 data URL.
devicedesktopUse desktop, desktop-hd, tablet, iphone-15, or pixel-8.
removeCookieBannerstrueRemove cookie and consent prompts. Set false to keep them.
removeOverlaystrueRemove newsletter gates and blocking overlays.
removeChatWidgetstrueRemove common chat and support bubbles.
blockAdstrueBlock common ad and analytics requests.
scrollPagetrueScroll first so lazy images and sections load.
fullPageAlgorithmautoUse native capture for normal pages and stitching for very tall pages.
maxHeight30000Stop an infinite or extremely tall page at this pixel height.
waitForSelectorWait for an element before capture.
clickSelectorClick 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.