Skip to content

Run a Browser Use browsing task

POST
/api/v1/browser/tasks
curl --request POST \
--url https://digize.com/api/v1/browser/tasks \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "instructions": "example", "startUrl": "example", "fields": { "additionalProperty": "example" }, "country": "example", "maxMinutes": 10, "maxCostUsd": 1 }'

Gives Browser Use’s AI agent a task to do in a cloud browser, such as finding a price or checking a listing, and waits for it to finish (up to maxMinutes, when it’s stopped), answering with what it found: its answer in words and, with fields, each field as text. The agent can click, type and fill in forms, so say where it should stop. Charged to the workspace’s Browser Use credits: the agent’s model up to maxCostUsd, plus the browser’s minutes.

Needs the automations: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
instructions
required
string
>= 1 characters <= 4000 characters
startUrl

A page to open first. Left out, the agent finds its own way.

string
>= 1 characters <= 2000 characters
fields

The fields to bring back, each with what it is, such as { price: “the cheapest plan’s monthly price” }. The answer then has each, as text.

object
key
additional properties
string
<= 300 characters
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
maxMinutes

When the task is stopped if it hasn’t finished.

integer
default: 10 >= 1 <= 15
maxCostUsd

The most the agent’s model and searches may spend, in US dollars.

number
default: 1 >= 0.1 <= 25

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"
}
}