# Screenshot API reference: PNG, JPEG and WebP | Spider

Capture high-quality screenshots of any web page with the Spider Screenshot API. Full-page or viewport capture in PNG, JPEG, or WebP format.

Canonical: https://spider.cloud/docs/api/screenshot/

POST /screenshot · PNG · JPEG · WebP

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":  ,
  "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,
    "cdp_params": { "format": "png" }
  }' \
  | jq -r '.[0].content' | tr '_-' '/+' | base64 --decode > screenshot.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 in JSON

  The image comes back as URL-safe base64 in the content field.

- 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

`url` string required

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

`fast` boolean default 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.

`binary` boolean optional

Has no effect. The response is always JSON with the image as URL-safe base64 in content.

`full_page` boolean default true

Take a screenshot of the full page.

`block_images` boolean default false

Block the images from loading to speed up the screenshot.

`omit_background` boolean default 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 ](/docs/api/#common-parameters)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 URL-safe base64 string in the `content` field, with - and \_ in place of + and /. A strict standard decoder fails on it. Use `base64.urlsafe_b64decode` in Python or `Buffer.from(content, "base64url")` in JavaScript.

application/json

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

This endpoint is also available via [Proxy](/docs/api/proxy/). Pass an array of objects for the request body to batch captures.
