Camoufox icon

Camoufox

Scrape websites with a stealth anti-detect browser

Screenshot

AI-generated

Summary

Navigate to a specified URL, optionally wait for page load and specific elements, perform user-defined pre-actions, then capture a screenshot of the full page, viewport, or a specific element as a binary image.

Inputs

  • URL (required) — The URL to navigate to.
  • Wait Until — When to consider navigation succeeded; options include DOM Content Loaded, Load event, Network Idle, or Commit.
  • Wait for Selector — Optional CSS selector to wait for after navigation to ensure dynamic content has loaded.
  • Timeout (Ms) — Maximum time in milliseconds to wait for navigation and selectors.
  • Actions Before Extract — Optional list of actions to perform after page load but before screenshot, such as clicking elements, filling inputs, typing text, waiting for selectors, scrolling, or delays.
  • Capture (required) — Defines what portion to capture in the screenshot: full page, viewport only, or a specific element.
  • Element Selector — If capturing an element, the CSS selector of that element to screenshot.
  • Image Format (required) — The image format of the screenshot; either PNG or JPEG.
  • Quality — JPEG quality from 0 to 100; relevant only when the image format is JPEG.
  • Binary Property (required) — The name of the binary data property to store the screenshot in.

Output shape

a single item with binary data containing the screenshot image and JSON metadata

The output includes a JSON object with page URL, page title, and HTTP status code, plus a binary property holding the screenshot image file. If capturing an element, throws an error if the element is not found. Supports full page, viewport, or element capture with configurable image format and quality.

Examples

Example 1: Capture a full-page PNG screenshot of a webpage.

Set 'URL' to the target page, 'Capture' to 'Full Page', 'Image Format' to 'PNG', and specify the 'Binary Property' to store the screenshot.

Example 2: Capture a JPEG screenshot of a specific page element.

Set 'URL' to the target page, 'Capture' to 'Element', provide the element's CSS selector, set 'Image Format' to 'JPEG', define 'Quality' (e.g., 80), and specify the 'Binary Property'.

Links

Discussion