Skip to main content
POST
/
browser
/
v1
/
snapshot
Capture an HTML + screenshot snapshot
curl --request POST \
  --url https://api.voyant.travel/browser/v1/snapshot \
  --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
}
'
{
  "content": "<string>",
  "screenshot": "<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

Response

200 - application/json

Snapshot

content
string
required

Rendered page HTML.

screenshot
string
required

Base64-encoded screenshot.