Skip to main content
Docs API Ref

POST /screenshot · PNG · JPEG · WebP

Screenshot

Render any web page in a real browser and capture a screenshot. Choose between viewport-only or full-page capture, pick your image format, and set the viewport dimensions. Useful for visual monitoring, generating thumbnails, archiving pages, or QA testing across different screen sizes.

Request

POST api.spider.cloud/screenshot
{
  "url": "https://example.com",
  "full_page": ,
  "fast": ,
  "binary": ,
  "cdp_params": { "format":  }
}

Click a value to change the request. Changed values are highlighted, and Copy curl grabs the matching command.

curl -X POST https://api.spider.cloud/screenshot \
  -H "Authorization: Bearer $SPIDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "full_page": true,
    "fast": true,
    "binary": false,
    "cdp_params": { "format": "png" }
  }'

Key capabilities

  • Full page or viewport

    Capture the whole scrollable page or just the visible area.

  • Three formats

    PNG, JPEG, and WebP output via cdp_params.

  • Base64 or binary

    JSON-embedded base64 by default, raw bytes with binary: true.

  • Viewport control

    Configurable width, height, clip and scale.

  • Wait conditions

    Wait for page load or specific selectors before capture.

  • Proxy and geo

    Route captures through proxies with geo-location support.

  • Fast mode

    Speed-optimized rendering by default, high fidelity when you need iframes and complex PDFs.

Parameters

urlstringrequired

The URI resource to crawl. This can be a comma split list for multiple URLs.

fastbooleandefault true

Use fast screenshot mode for speed-optimized rendering. Set to false for high-fidelity rendering that supports iframes, complex PDFs, and accurate visual output.

binarybooleanoptional

Return the image as binary instead of base64.

full_pagebooleandefault true

Take a screenshot of the full page.

block_imagesbooleandefault false

Block the images from loading to speed up the screenshot.

omit_backgroundbooleandefault false

Omit the background from loading.

cdp_params object default null

The settings to use to adjust clip, format, quality, and more.

{
  "format": "jpeg",
  "quality": 90,
  "clip": { "x": 10, "y": 20, "width": 500, "height": 400, "scale": 1.5 },
  "fromSurface": false,
  "captureBeyondViewport": true
}
Tip

All common request parameters from the Parameters reference also apply, including proxy and geo-location options. Batch multiple URLs into a single call to reduce latency and save on rate limits.

Response

The screenshot comes back as a base64 string in the content field. With binary: true the raw image bytes stream back instead, ready to pipe straight to a file.

application/json
[
  {
    "url": "https://example.com",
    "content": "iVBORw0KGgoAAAANSUhEUgAA...",
    "status": 200
  }
]

This endpoint is also available via Proxy. Pass an array of objects for the request body to batch captures.