Menu
Docs/Batch Screenshots

Batch Screenshots

Capture screenshots of multiple URLs in one request. Returns base64-encoded images with per-URL success/error status.

POST/v1/batch/screenshot

Batch screenshots require a Growth+ plan. Max URLs per request depends on your plan.

Parameters

ParameterTypeDefaultDescription
urls*string[]Array of URLs to screenshot. Min 1, max depends on plan.
widthnumber1280Viewport width in pixels. Min 320, max 3840.
heightnumber720Viewport height in pixels. Min 240, max 2160.
formatenumpngOutput format: png, jpeg, or webp.
qualitynumber80Compression quality for jpeg/webp. 1–100.
full_pagebooleanfalseCapture full scrollable page height.
dark_modebooleanfalseEmulate prefers-color-scheme: dark.
block_adsbooleanfalseBlock ads, cookie banners, and trackers.
delaynumber0Wait N ms after load before capture. Max 10000.
wait_untilenumloadWhen to consider page loaded: load, domcontentloaded, networkidle.
devicestringDevice preset (e.g. 'iPhone 14'). See device presets.

Plan limits

PlanMax URLs per request
Free❌ Not available
Starter❌ Not available
Growth10
Business25
Enterprise50

Response

{
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "total": 3,
  "succeeded": 2,
  "failed": 1,
  "results": [
    {
      "url": "https://example.com",
      "success": true,
      "image_base64": "iVBORw0KGgo...",
      "content_type": "image/png",
      "size_bytes": 145230
    },
    {
      "url": "https://another.com",
      "success": true,
      "image_base64": "iVBORw0KGgo...",
      "content_type": "image/png",
      "size_bytes": 89400
    },
    {
      "url": "https://blocked-site.com",
      "success": false,
      "error": "Navigation timeout after 30000ms"
    }
  ]
}

Example

curl -X POST https://api.snapsharp.dev/v1/batch/screenshot \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://github.com",
      "https://linear.app",
      "https://vercel.com"
    ],
    "width": 1280,
    "format": "png",
    "dark_mode": true
  }'
// Each result is independent — one failing URL won't stop the others
const res = await fetch('https://api.snapsharp.dev/v1/batch/screenshot', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk_live_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    urls: ['https://github.com', 'https://linear.app'],
    width: 1280,
    dark_mode: true,
  }),
});

const data = await res.json();
for (const result of data.results) {
  if (result.success) {
    const buffer = Buffer.from(result.image_base64, 'base64');
    // save or process the image
  }
}

Errors

CodeErrorDescription
400validation_errorInvalid parameters or empty urls array
401unauthorizedMissing or invalid API key
403plan_requiredGrowth+ plan required
429rate_limitedRate limit exceeded
500Internal server error