Screenshot

PNG or JPEG of any URL. Fast where it can be, stealthy where it has to be.

POST /v1/scrape/screenshot 15 / 25 / 35 credits Utilities

Choose viewport (default 1280 x 720) or capture the entire scrollable page height. Pick PNG for lossless or JPEG with quality control for half the size. Sites that block normal headless browsers (anti-bot challenges, fingerprint walls) are automatically retried through our stealth engine: same endpoint, same response shape, you don't have to know which engine ran.

The hard part

Running a headless browser in production is its own job: keeping the browser up, refreshing fingerprints, recovering from bot challenges, capturing the screenshot at exactly the right moment of the page lifecycle. And then doing it again on the next site that blocks your fingerprint. You ask for an image and get one. We handle which engine, which proxy, and how long to wait.

What it does

  • Viewport capture in ~2–3 s; full-page in ~2–4 s on typical sites.
  • Hostile sites (heavy anti-bot) auto-fall-back to stealth in ~8–12 s.
  • PNG or JPEG with 1–100 quality; JPEG is roughly half the byte size at q=70+.
  • Full-page mode auto-detects scrollable height up to the rendered page.
  • Base64 returned inline (no S3 round-trip, no presigned-URL dance).
  • Failures and timeouts don't bill.
  • `cookies`, `headers`, `render`, `selector`, `session_id`, and `include_usage` supported: screenshot authenticated pages, target a single element, or reuse a sticky exit IP.

Send a call

curl -X POST https://scrapenest.dev/v1/scrape/screenshot \
  -H "Authorization: Bearer sn_••••" \
  -H "Content-Type: application/json" \
  -d '{
        "url": "https://news.ycombinator.com",
        "viewport_width": 1280,
        "viewport_height": 720,
        "full_page": false,
        "format": "png"
      }' \
  | jq -r .image_base64 | base64 -d > screenshot.png

Request body

{
  "url": "https://news.ycombinator.com",
  "viewport_width": 1280,
  "viewport_height": 720,
  "full_page": false,
  "format": "png",
  "wait_extra_ms": 0
}

Response shape

{
  "url": "https://news.ycombinator.com",
  "final_url": "https://news.ycombinator.com/",
  "status_code": 200,
  "method": "browser",
  "proxy_used": null,
  "elapsed_ms": 2470,
  "width": 1280,
  "height": 720,
  "bytes": 159284,
  "format": "png",
  "image_base64": "iVBORw0KGgoAAAANSUhEUgAA…",
  "cache_hit": false,
  "credits_charged": 15
}

What it costs

15 credits for a viewport capture, 25 credits for full-page, 35 credits when the target site only renders through our stealth backend. A `selector`-targeted capture bills 15 (or 35 if the site forces our stealth backend), even with `full_page=true`. Cache hits bill at 1 credit. Failures don't bill.

  • Set `wait_extra_ms` for sites with late-loading content (SPAs that fade in after window.load, lazy-loaded images, charts that mount on idle).
  • Hostile sites trigger our stealth backend automatically. You'll see `"method": "stealth"` in the response and the 35-credit charge, no flag to flip.
  • Full-page captures of long pages (1080+ rows of content) can produce 1 MB+ PNGs. JPEG with quality 75–85 typically halves that.