Skip to main content
POST
/
browser
/
v1
/
screenshot
Capture a screenshot
curl --request POST \
  --url https://api.voyant.travel/browser/v1/screenshot \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://example.com",
  "html": "<string>",
  "cookies": [
    {
      "name": "<string>",
      "value": "<string>",
      "url": "<string>",
      "domain": "<string>",
      "path": "<string>",
      "expires": 123,
      "httpOnly": true,
      "secure": true
    }
  ],
  "userAgent": "<string>",
  "setExtraHTTPHeaders": {},
  "rejectResourceTypes": [
    "<string>"
  ],
  "rejectRequestPattern": [
    "<string>"
  ],
  "allowResourceTypes": [
    "<string>"
  ],
  "allowRequestPattern": [
    "<string>"
  ],
  "bestAttempt": true,
  "gotoOptions": {
    "timeout": 123,
    "referer": "<string>"
  },
  "waitForTimeout": 123,
  "selector": "<string>",
  "screenshotOptions": {
    "fullPage": true,
    "omitBackground": true,
    "quality": 123
  }
}
'
"<string>"

Authorizations

Authorization
string
header
required

Voyant Cloud API token, passed as Authorization: Bearer <token>. Each token carries a fixed set of scopes; an operation rejects tokens missing its required scope.

Body

application/json

Common fields accepted by every browser render endpoint. Forwarded to Cloudflare Browser Rendering, so additional CF-supported fields are also accepted. Provide exactly one of url or html.

url
string<uri>
Example:

"https://example.com"

html
string
cookies
object[]
viewport
object
userAgent
string
setExtraHTTPHeaders
object
authenticate
object
rejectResourceTypes
string[]
rejectRequestPattern
string[]
allowResourceTypes
string[]
allowRequestPattern
string[]
bestAttempt
boolean
emulateMediaType
enum<string>
Available options:
screen,
print
gotoOptions
object
waitForSelector
object
waitForTimeout
integer
selector
string
screenshotOptions
object

Response

200 - image/png

Screenshot image bytes

The response is of type file.