Skip to main content
POST
Capture a website screenshot
For server-to-server use, send a Pirehub API key with the screenshot:capture scope in x-pirehub-api-key or as a bearer token. See Authentication for credential handling. See the Website screenshots guide for capture options, examples, caching, and limits. The response contains data.dataUrl (a PNG data URI), the actual image width and height, and a cached flag. Use refreshCache: true to request a fresh capture. Cache hits remain subject to the API key’s limits. This scope grants access to POST /api/v1/screenshot only.

Authorizations

Authorization
string
header
required

OAuth 2.0 Authorization Code with PKCE, issued by Pirehub's Clerk authorization server. Request only the scopes required by the operation.

Body

application/json
url
string<uri>
required

Public HTTP(S) URL without credentials; only ports 80 and 443 are allowed.

Maximum string length: 2048
width
integer
required
Required range: 300 <= x <= 1920
height
integer
required
Required range: 168 <= x <= 4096
fullPage
boolean
required

Capture the full page instead of only the viewport.

device
enum<string>
default:desktop
Available options:
desktop,
mobile
theme
enum<string>
default:light
Available options:
light,
dark
delay
enum<integer>
default:0

Additional capture delay in milliseconds.

Available options:
0,
2000,
5000
refreshCache
boolean
default:false

Bypass the cached screenshot.

Response

PNG screenshot in a JSON success envelope.

success
boolean
required
data
object
required