HeadlessX icon

HeadlessX

Anti-detection web scraping with HeadlessX v2 API

Website → Take Screenshot

AI-generated

Summary

Captures a screenshot of a specified website URL and returns the image as binary data along with metadata.

Inputs

  • url (required) — The URL of the web page to capture.
  • screenshotOptions — Optional settings including Full Page toggle, image Format (PNG, JPEG, WebP), Quality rating (1-100), Wait for Selector (CSS selector), Timeout in milliseconds, and custom User Agent.

Output shape

a single item with JSON metadata and binary image data

Returns a JSON object containing the target url, success flag, timestamp, and fileName, alongside binary data under key 'data' containing the screenshot image.

Examples

Example 1: Capture a full-page screenshot of a landing page

Set URL to 'https://example.com'

Example 2: Wait for specific content before taking a screenshot

Set URL to 'https://example.com/dashboard' and under Screenshot Options, set Wait for Selector to '#main-content' and Timeout to 30000

Links

Discussion