Skip to content

Take a screenshot with Browser Use

POST
/api/v1/browser/screenshots
curl --request POST \
--url https://digize.com/api/v1/browser/screenshots \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "url": "example", "width": 1280, "fullPage": false, "country": "example", "waitFor": 2 }'

Opens the page in a Browser Use cloud browser, through a residential proxy in the country given, and screenshots it: what the window shows as a PNG, or the whole page (down to about 10,000 pixels) as a JPEG. For sites that turn other browsers away. The browser is stopped as soon as it’s taken; Browser Use charges the workspace’s credits for its minutes (one at least) and the proxy’s traffic.

Needs the analytics:write permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
url
required

The page’s address.

string
>= 1 characters <= 2000 characters
width

How wide the window is, in pixels: 1280 for a laptop, 390 for a phone.

integer
default: 1280 >= 320 <= 1920
fullPage

The whole page rather than what the window shows.

boolean
country

Where the browser goes out from: a two-letter country code for a residential proxy there (us, uk, de, …; Browser Use writes the United Kingdom as uk), or none for no proxy. us when left out.

string
waitFor

Seconds to wait once the page has loaded.

number
default: 2 <= 30

Done

Media typeapplication/json
object
id
required
string
kind
required
string
Allowed values: screenshot task
status
required
string
Allowed values: running done failed cancelled
source
required
string
Allowed values: page api agent automation module
by
required

Who ran it: a member, an API key, the agent.

string
target
required

A screenshot’s page, or a task’s instructions.

string
startUrl
required
string | null
country
required
string | null
imageUrl
required

A screenshot’s picture, a link that works for an hour.

string | null
width
required
number | null
height
required
number | null
title
required
string | null
result
required

A task’s answer in words.

string | null
output
required

A task’s fields, as it brought them back.

steps
required
Array<object>
object
at
required
string
type
required
string
text
required
string
error
required
string | null
minutes
required

The browser’s minutes, as Browser Use bills them.

number | null
costUsd
required

What Browser Use charged, in US dollars: the browser, its proxy and a task’s model.

number | null
startedAt
required
string format: date-time
finishedAt
required
Any of:
string format: date-time

Example

{
"kind": "screenshot",
"status": "running",
"source": "page"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}