Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use cURL to capture screenshots from the command line.
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"}' \ --output screenshot.png
curl "https://api.screenshotly.dev/v1/capture?url=https://example.com&api_key=$SCREENSHOTLY_API_KEY" \ --output screenshot.png
response_type
json
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", "response_type": "json" } }'
{ "success": true, "data": { "id": "67b8a1c2d3e4f5a6b7c8d9e0", "url": "https://example.com", "image_url": "https://cdn.screenshotly.dev/screenshots/67b8a1c2d3e4f5a6b7c8d9e0.png", "status": "completed", "metadata": { "file_size": 245760, "format": "png", "dimensions": { "width": 1280, "height": 1024 } } }, "remaining_credits": 99 }
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": "jpeg", "image_quality": 85, "full_page": true, "viewport_width": 1440, "viewport_height": 900 } }' \ --output screenshot.jpg
curl https://api.screenshotly.dev/v1/screenshots/67b8a1c2d3e4f5a6b7c8d9e0/status \ -H "X-API-Key: $SCREENSHOTLY_API_KEY"
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": { "viewport_width": 390, "viewport_height": 844, "device_scale_factor": 3, "viewport_mobile": true, "viewport_has_touch": true } }' \ --output mobile.png
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": { "dark_mode": true, "block_ads": true, "block_cookie_banners": true } }' \ --output clean-dark.png
#!/bin/bash # screenshot.sh - capture a screenshot of a URL URL="${1:?Usage: screenshot.sh <url> [format]}" FORMAT="${2:-png}" curl -s -X POST https://api.screenshotly.dev/v1/capture \ -H "X-API-Key: $SCREENSHOTLY_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"url\": \"$URL\", \"options\": {\"format\": \"$FORMAT\", \"response_type\": \"json\"}}" | jq .
chmod +x screenshot.sh ./screenshot.sh https://example.com jpeg