NEW AI Studio is now available Try it now
POST /screenshot

Screenshot API

Capture visual snapshots of any web page as it appears in a real browser. Get full-page or viewport-sized screenshots in PNG, JPEG, or WebP format, delivered as base64 strings or raw binary data.

Two Output Modes

Base64 Encoded

Default mode. The screenshot is returned as a base64 string within the JSON response. Convenient for embedding in HTML, storing in databases, or passing to downstream APIs.

{"binary": false} (default)

Raw Binary

Returns the raw image bytes directly. Ideal for saving to disk, uploading to cloud storage, or serving to users. Smaller payload than base64 encoding.

{"binary": true}

Key Capabilities

Full-Page Capture

Capture the entire scrollable page, not just the visible viewport. Enabled by default with full_page: true.

CDP Parameters

Fine-tune screenshots with Chrome DevTools Protocol parameters. Set custom clip regions, output format (PNG/JPEG/WebP), and compression quality.

Transparent Background

Use omit_background to capture pages with a transparent background, useful for compositing or generating clean visuals.

Image Blocking

Speed up captures by blocking images on the page with block_images. Useful when you need the layout but not the visuals.

Anti-Bot Handling

Screenshot protected pages that block headless browsers. Spider's fingerprinting and session management make it look like a real user.

Proxy & Geo-Routing

Capture how pages look from different countries using proxy support with country_code. See geo-specific pricing or content.

Code Examples

Capture a full-page screenshot Python
from spider import Spider
import base64

client = Spider()

result = client.screenshot(
    "https://example.com",
    params={
        "full_page": True,
    }
)

# Decode and save the screenshot
img_data = base64.b64decode(result[0]["content"])
with open("screenshot.png", "wb") as f:
    f.write(img_data)
Binary screenshot with custom quality cURL
curl -X POST https://api.spider.cloud/screenshot \
  -H "Authorization: Bearer $SPIDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "binary": true,
    "full_page": true,
    "cdp_params": {
      "format": "jpeg",
      "quality": 80
    }
  }' --output screenshot.jpg

Popular Screenshot Use Cases

Visual Regression Testing

Capture screenshots of your web app on every deploy and compare them against baselines. Detect unintended visual changes before users do.

Link Previews & Thumbnails

Generate preview images for URLs shared in your application. Build rich link cards like those in social media and messaging apps.

Competitive Monitoring

Periodically screenshot competitor websites to track visual changes, pricing updates, new product launches, and promotional campaigns.

Compliance & Archiving

Create visual records of web content for legal, regulatory, or archival purposes. Capture exactly what a user would see at a point in time.

Related Resources

Capture any web page visually

High-quality screenshots from a simple API. No browser infrastructure to manage.