scrapfly.captureScreenshot renders a page and returns its screenshot as a Blob.
Returns
{ image, metadata }. image is a typed Blob; metadata includes extensionName, upstreamStatusCode, and upstreamUrl.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Capture a viewport, full page, or selected page element as an image.
scrapfly.captureScreenshot renders a page and returns its screenshot as a Blob.
import { automation, onInvocation } from "automate.ax"
import { scrapfly } from "automate.ax/scrapfly"
export default automation("Capture pricing", () => {
onInvocation()
scrapfly.captureScreenshot({
url: "https://example.com/pricing",
capture: "fullpage",
format: "png",
resolution: "1440x900",
})
})
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | — | Complete page URL. |
capture | string | No | Viewport | Viewport, full-page, vertical, CSS, or XPath capture target. |
format | 'jpg' | 'png' | 'webp' | 'gif' | No | JPEG | Image format. |
resolution | `${number}x${number}` | No | Provider default | Browser viewport. |
waitForSelector, renderingWait, javascript, autoScroll | Render controls | No | Provider defaults | Prepare the page before capture. |
country, visionDeficiency, options, timeout, cache, cacheClear, cacheTtl, webhookName | Advanced controls | No | Provider defaults | Configure network, accessibility simulation, rendering, cache, timeout, or callback behavior. |
{ image, metadata }. image is a typed Blob; metadata includes extensionName, upstreamStatusCode, and upstreamUrl.