Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.screenshotly.dev/llms.txt

Use this file to discover all available pages before exploring further.

Screenshotly supports multiple output formats. Choose the one that best fits your use case.

Supported formats

FormatBest forTransparencyCompression
PNGUI screenshots, pixel-perfect capturesYesLossless
JPEGPhotos, large pages, smaller file sizesNoLossy
WebPWeb delivery, best size-to-quality ratioYesBoth
PDFPrintable documentsN/AN/A

Setting the format

const screenshot = await client.capture({
  url: 'https://example.com',
  format: 'webp'
});
The default format is png.

Quality settings

For JPEG, WebP, and PDF formats, use the image_quality parameter to control compression. The value is an integer between 0 and 100 (default: 80):
const screenshot = await client.capture({
  url: 'https://example.com',
  format: 'jpeg',
  image_quality: 85
});
Quality rangeFile sizeVisual quality
90–100LargeHighest fidelity
70–89MediumGood for most uses
50–69SmallNoticeable artifacts
Below 50SmallestSignificant quality loss
The image_quality parameter has no effect on PNG format since PNG uses lossless compression.

Transparent backgrounds

For PNG and WebP formats, use omit_background to remove the default white background:
curl -X POST https://api.screenshotly.dev/v1/capture \
  -H "X-API-Key: $SCREENSHOTLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "options": {
      "format": "png",
      "omit_background": true
    }
  }' \
  --output screenshot.png

PDF output

Screenshotly supports PDF output by setting format to pdf:
curl -X POST https://api.screenshotly.dev/v1/capture \
  -H "X-API-Key: $SCREENSHOTLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "options": { "format": "pdf" }
  }' \
  --output page.pdf

Choosing a format

  • Use PNG when you need transparency or pixel-perfect accuracy
  • Use JPEG at quality 75–85 for the best balance of size and quality
  • Use WebP for web delivery where browser support is available
  • Use PDF when you need a printable document format