---
title: "Screenshot Capture"
method: POST
path: "/screenshot"
tags: ["Pages"]
---

# Screenshot Capture

`POST /screenshot`

## Request

- Base URL: `https://api.weblens.dev`
- URL: `https://api.weblens.dev/screenshot`
- Auth: API key in header `Payment-Signature`

Capture high-quality screenshots of any webpage using headless browser. Price: $0.008.

## Request body

- object
  - `url` string, uri, required: The URL to process
  - `width` number: Viewport width in pixels
  - `height` number: Viewport height in pixels
  - `fullPage` boolean: Capture the whole scrollable page, not just the viewport
  - `selector` string: CSS selector to capture
  - `timeout` number: Request timeout in milliseconds

## Response `200`

PNG screenshot of a page, base64-encoded.

- object
  - `url` string: Screenshotted URL
  - `image` string: Base64-encoded PNG image
  - `capturedAt` string: ISO timestamp
  - `dimensions` object
  - `requestId` string

## Other responses

- `400`: The body failed validation
- `402`: Payment required — x402 v2 protocol. Parse the PAYMENT-REQUIRED response header (base64-encoded JSON), sign the payment with your wallet, then retry the request with the Payment-Signature request header.

---

[API](https://skmtc.dev/weblens/apis/weblens-api.md) · [All operations](https://skmtc.dev/weblens/apis/weblens-api/llms.txt) · [OpenAPI document](https://skmtc.dev/weblens/apis/weblens-api/revisions/63a7e81b6921?raw)
