Skip to main content
POST /v1/hosted/screenshot, costs 3 credits (browser-render pricing).

Request

Fields on ScreenshotRequest:
FieldTypeDefaultNotes
urlstring,required
full_pagebooltruecapture full scrollable page vs. viewport only
viewport_widthint1280
viewport_heightint800
wait_forstring""selector or delay before capture
use_jsbooltruescreenshots always render with a browser
curl -X POST "$SCOUT_HOSTED_BASE_URL/v1/hosted/screenshot" \
  -H "Authorization: Bearer $SCOUT_HOSTED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.cnn.com/","viewport_width":1280,"viewport_height":800}'

Response

ScreenshotResponse, wrapped in hosted usage metadata:
{
  "success": true,
  "hosted": {
    "tenant_id": "tn_..",
    "key_id": "key_..",
    "credits_charged": 3,
    "credit_type": "standard"
  },
  "screenshot": {
    "success": true,
    "url": "https://www.cnn.com/",
    "screenshot_base64": "iVBORw0KGgoAAAANSUhEUgAA..",
    "width": 1280,
    "height": 800,
    "duration_ms": 2130
  }
}
screenshot_base64 is a base64-encoded PNG. Decode it client-side to render or save the image.