Parameters

All parameters are sent as JSON in the request body via POST /screenshot.

Required

Parameter Type Description
url string The URL to capture. Must be a valid HTTP or HTTPS URL with a host.

Output Options

Parameter Type Default Description
format string "png" Output format: png, jpeg, webp, or pdf
quality integer 80 Image quality from 1-100. Only applies to JPEG and WebP formats. Sending 0 or omitting this field uses the default.
fullPage boolean false Capture the full scrollable page instead of just the viewport.

Viewport Options

Parameter Type Default Description
device string "desktop" Device profile preset. See Device Profiles.
width integer 1920 Viewport width in pixels (1-4096). Overrides device preset.
height integer 1080 Viewport height in pixels (1-4096). Overrides device preset.
scale integer 1 Device scale factor (1-3). Use 2 or 3 for retina/high-DPI screenshots.

Element Selector

Target a specific element on the page instead of capturing the full viewport.

Parameter Type Default Description
selector string CSS selector to capture a specific element (e.g. "#hero", ".pricing-table").
scrollIntoView boolean true Scroll the element into view before capture. Only used when selector is set.
scrollIntoViewSelector string Alternative CSS selector to scroll to before capture. Useful for triggering lazy-loaded content.
adjustTop integer 0 Adjust the vertical scroll position in pixels after scrolling to the element. Negative values scroll up.

Content Blocking

Parameter Type Default Description
hideCookieBanners boolean true Automatically hide cookie consent banners.
hidePopups boolean false Hide popup dialogs, modals, and chat widgets.
aggressivePopupRemoval boolean false More aggressive popup and overlay removal. May affect some page layouts.
blockAds boolean false Block advertisements and ad network scripts.
blockRequests string[] [] Array of URL patterns to block. Supports wildcards (e.g. "*google-analytics*").

Custom Headers & Cookies

Send custom HTTP headers or set cookies before the page loads. Useful for authenticated pages or A/B testing.

Parameter Type Description
headers object Custom HTTP headers as key-value pairs. Example: {"Authorization": "Bearer xxx"}
cookies array Cookies to set before page load. Each cookie is an object (see below).

Cookie Object

Field Type Required Description
name string Yes Cookie name
value string Yes Cookie value
domain string No Cookie domain (e.g. ".example.com")
path string No Cookie path (defaults to "/")
expires integer No Unix timestamp for cookie expiry
httpOnly boolean No HTTP-only flag
secure boolean No Secure flag (HTTPS only)
sameSite string No SameSite policy: "Strict", "Lax", or "None"

R2 Storage

Upload screenshots directly to Cloudflare R2 instead of receiving the binary response. See R2 Storage for setup instructions.

Parameter Type Default Description
storage string "" Set to "r2" to upload the screenshot to Cloudflare R2.
r2CredentialId string ID of the R2 credentials configured in your dashboard. If omitted, the default credential is used.

Full Example

{
  "url": "https://example.com",
  "format": "webp",
  "quality": 90,
  "fullPage": true,
  "device": "iphone-15-pro",
  "scale": 2,
  "hideCookieBanners": true,
  "blockAds": true,
  "blockRequests": ["*google-analytics*"],
  "selector": "#main-content",
  "headers": {
    "Authorization": "Bearer token123"
  },
  "cookies": [
    { "name": "session", "value": "abc123", "domain": ".example.com" }
  ]
}

Tip: Use the Playground to build requests visually — select any combination of parameters and get the generated API request automatically.