Skip to main content
POST
/
v1
/
screenshot
Screenshot a URL (ephemeral browser)
curl --request POST \
  --url https://api.webcompute.dev/v1/screenshot \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "proxy": "<string>",
  "waitFor": "<string>",
  "timeout": 30000,
  "policy": {},
  "fullPage": false,
  "format": "png",
  "quality": 80,
  "selector": "<string>",
  "hideSelectors": [
    "<string>"
  ],
  "maskSelectors": [
    "<string>"
  ],
  "maskColor": "<string>",
  "style": "<string>"
}
'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
url
string
required

Target URL to navigate to

proxy
string

Proxy URL (protocol://user:pass@host:port)

waitFor
string

CSS selector to wait for before action

timeout
number
default:30000

Action timeout in milliseconds (1-60000)

policy
object

Browser navigation policy for this action

fullPage
boolean
default:false

Capture the full scrollable page

format
enum<string>
default:png

Image format

Available options:
png,
jpeg,
webp
quality
number
default:80

Image quality (1-100). Only applies to jpeg/webp.

selector
string

CSS selector of a specific element to capture

hideSelectors
string[]

CSS selectors hidden with visibility:hidden only during capture

maskSelectors
string[]

CSS selectors covered by screenshot masks during capture

maskColor
string

Mask color for maskSelectors

Required string length: 1 - 100
style
string

Advanced temporary screenshot-only CSS

Response

Screenshot result (base64 in JSON)