Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/webhood-io/webhood/llms.txt

Use this file to discover all available pages before exploring further.

The Screenshot endpoint serves the PNG image captured by the headless browser during a completed scan. The image shows the visual state of the target page at the time scanning finished, after all page resources were loaded. This endpoint reads the first entry of the scan record’s screenshots array and streams the file directly to the client with appropriate image content-type headers.

Request

GET /api/v1/scans/:id/screenshot

Authentication

All requests require a valid Bearer token in the Authorization header.
Authorization: Bearer <token>

Path Parameters

id
string
required
The unique identifier of the scan record whose screenshot you want to download. Must correspond to a scan with status of done.

Response

Returns a binary PNG image. The response Content-Type is set to image/png. The image dimensions depend on the screenshotSize option used when the scan was created — either full-page height or the specified viewport dimensions. The screenshots array on the parent scan record contains the file ID(s) for all captured images. This endpoint always serves the first screenshot (screenshots[0]).

Examples

Download and Save the Screenshot

curl http://localhost:8000/api/v1/scans/a1b2c3d4e5f6g7h8/screenshot \
  -H 'Authorization: Bearer <token>' \
  --output screenshot.png

Display Inline (Browser / HTML)

If you are building a web interface, you can fetch the screenshot and display it as a data URL or proxy the request from your backend. The endpoint requires authentication, so the image cannot be embedded directly as a public <img src> URL without a proxy.
# Verify the file was written correctly
curl http://localhost:8000/api/v1/scans/a1b2c3d4e5f6g7h8/screenshot \
  -H 'Authorization: Bearer <token>' \
  --output screenshot.png \
  --write-out "HTTP %{http_code} — %{size_download} bytes\n"
Expected output when successful:
HTTP 200 — 284672 bytes
This endpoint returns HTTP 404 if no screenshot was captured for the scan. This can happen when the scan reached an error status before the browser could take a screenshot, or if the scan is still pending or running. Check the scan’s status and screenshots array before calling this endpoint.

Build docs developers (and LLMs) love