Examples

Ready-to-run recipes for the most common screenshot automation scenarios.

Replace YOUR_API_KEY with your key from the Dashboard.

Code Examples

# Full-page screenshot
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&full_page=true" -o full.png

# iPhone 14 device preset
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&viewport_device=iphone-14" -o mobile.png

# Dark mode
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&dark_mode=true" -o dark.png

# Capture only the #hero element
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&selector=%23hero" -o hero.png

# Clean page (ads + cookie banners blocked, wait for network idle)
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&block_ads=true&block_cookie_banners=true&wait_until=networkidle" -o clean.png

# A4 PDF with print styles
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&format=pdf&pdf_paper_format=A4&media_type=print&pdf_margin=1cm" -o doc.pdf

# 8-second GIF
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&format=gif&video_duration=8&video_fps=12" -o anim.gif

# Render raw HTML
curl -X POST "https://screenshotcore.com/api/v1/screenshot" \
  -H "Authorization: Bearer KEY" -H "Content-Type: application/json" \
  -d '{"source":"html","html":"<h1 style=\"padding:40px\">Hello</h1>"}' -o html.png

# OG tags + page title without storing an image
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&response_type=json&metadata_open_graph=true&metadata_page_title=true"

# 400px thumbnail
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&image_width=400" -o thumb.png

Response

{
  "url": "https://screenshotcore.com/storage/results/a1b2c3d4-e5f6-7890-abcd-ef1234567890.png",
  "expires_at": "2026-04-28T14:22:00+00:00",
  "mime_type": "image/png",
  "file_size_bytes": 1048576,
  "response_time_ms": 4200,
  "from_cache": false,
  "request_id": 215
}