Generate Visual Reports & Thumbnails from Web Content

Building a link directory, content aggregator, or dashboard? You need thumbnail previews of web pages. Rather than relying on unreliable meta images or building your own headless browser infrastructure, use SnapAPI to generate accurate website thumbnails on demand.

Common Use Cases

Code Example

Generate a Website Thumbnail

Node.js
async function getThumbnail(url) {
  const res = await fetch('https://snapapi.eu/v1/screenshot', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-API-Key': process.env.SNAPAPI_KEY
    },
    body: JSON.stringify({
      url,
      width: 1280,
      height: 800,
      format: 'webp',    // Smaller file size
      quality: 80
    })
  });

  return Buffer.from(await res.arrayBuffer());
}

// Generate thumbnails for a list of URLs
const urls = ['https://github.com', 'https://news.ycombinator.com'];
for (const url of urls) {
  const img = await getThumbnail(url);
  // Store in database, upload to CDN, etc.
}

Batch Processing with Caching

For high-volume use, cache thumbnails and refresh them periodically:

Bash
# Quick thumbnail via cURL
curl -X POST https://snapapi.eu/v1/screenshot \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $SNAPAPI_KEY" \
  -d '{"url":"https://example.com","width":1280,"height":800,"format":"webp"}' \
  --output thumbnail.webp

# Resize locally for smaller thumbnails
convert thumbnail.webp -resize 400x250 thumbnail-sm.webp

Why SnapAPI for Thumbnails?

Start Generating Thumbnails

Try it free in the playground β€” no signup needed.

Get Your API Key β†’