Code Examples

Get started quickly with these code examples in multiple languages.

Simple Screenshot

curl "https://snagkit.io/api/v1/capture?url=https://example.com&api_key=sk_live_xxx&format=png" \
  --output screenshot.png

Full Page Screenshot

curl -X POST https://snagkit.io/api/v1/capture \
  -H "X-API-Key: sk_live_xxx" \
  -d "url=https://example.com" \
  -d "full_page=true" \
  -d "format=png" \
  --output fullpage.png

Scrolling Animation

curl -X POST https://snagkit.io/api/v1/capture \
  -H "X-API-Key: sk_live_xxx" \
  -d "url=https://example.com" \
  -d "scenario=scroll" \
  -d "format=mp4" \
  -d "duration=10" \
  -d "response_type=json"

With Ad & Cookie Blocking

curl -X POST https://snagkit.io/api/v1/capture \
  -H "X-API-Key: sk_live_xxx" \
  -d "url=https://example.com" \
  -d "format=png" \
  -d "block_ads=true" \
  -d "block_cookies=true" \
  -d "response_type=json"