Run a Browser Use browsing task
const url = 'https://digize.com/api/v1/browser/tasks';const options = { method: 'POST', headers: { 'Idempotency-Key': '5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69', 'x-api-key': '<x-api-key>', 'Content-Type': 'application/json' }, body: '{"instructions":"example","startUrl":"example","fields":{"additionalProperty":"example"},"country":"example","maxMinutes":10,"maxCostUsd":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”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-1f2d3c4b5a69Request Bodyrequired
Section titled “Request Bodyrequired”object
A page to open first. Left out, the agent finds its own way.
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
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.
When the task is stopped if it hasn’t finished.
The most the agent’s model and searches may spend, in US dollars.
Responses
Section titled “Responses”Done
object
Who ran it: a member, an API key, the agent.
A screenshot’s page, or a task’s instructions.
A screenshot’s picture, a link that works for an hour.
A task’s answer in words.
A task’s fields, as it brought them back.
object
The browser’s minutes, as Browser Use bills them.
What Browser Use charged, in US dollars: the browser, its proxy and a task’s model.
Example
{ "kind": "screenshot", "status": "running", "source": "page"}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}A request with the same Idempotency-Key is still running (conflict).
object
object
object
Example
{ "error": { "code": "invalid" }}The Idempotency-Key was used with a different request.
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}