Website Screenshotting Guide

This guide covers capturing one-time screenshots for any website.

Note: Screenshotting is an asynchronous operation. See the Ascyn Operations & Jobs guide

Core Endpoints

  • POST /v1/ops/screenshot: Initiate a one-time screenshot capture.
  • GET /v1/ops/jobs/{jobId}: Poll to get the status and result of a capture.

Example: Capturing a Screenshot

Step 1: Initiate the Capture

Make a POST request with the url to capture. You can also include an options object to specify viewport, format, etc.

curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"url": "https://example.com", "options": {"width": 1920, "height": 1080}}' \
     "https://api.whisper.security/v1/ops/screenshot"

This will return a 202 Accepted response with a job ID.

Step 2: Retrieve the Screenshot

Poll the GET /v1/ops/jobs/{jobId} endpoint. When status is COMPLETED, the result block will contain the screenshot data.

Completed Job Response (result block):

{
  "url": "https://example.com",
  "status": "completed",
  "metadata": {
    "url": "https://example.com",
    "probedAt": "2025-11-06T11:24:42.042013119Z",
    "finalUrl": "https://example.com/",
    "responseCode": 200,
    "responseReason": "",
    "protocol": "h2",
    "contentLength": 184,
    "html": "<html...</html>",
    "title": "Example Domain",
    "perceptionHash": "p:bc3c3cc1c3c3c3c3"
  },
  "screenshot": "/9j/4AAQSkZJRgABAQ... (truncated base64 string) ...",
  "network": [
    {
      "url": "https://example.com/",
      "remoteIp": "23.215.0.136",
      ...
    }
  ],
  "technologies": [
    {"id": 0, "resultId": 0, "value": "HTTP/3"}
  ],
  "id": "448522c6-aa24-47df-92f5-62f4bb441e98"
}

Understanding the Screenshot Result

  • screenshot: A base64-encoded string of the screenshot image (e.g., PNG, JPEG).
  • metadata: Rich data about the page, including the finalUrl (after redirects), responseCode, title, and html content.
  • network: A log of network requests made, including the remoteIp of the server.
  • technologies: A list of technologies detected during the page load.

API Reference

For full details on the endpoint see the API Reference: