GET
/
tasks
/
{task_id}
JavaScript
import BrowserUse from 'browser-use-sdk';

const client = new BrowserUse({
  apiKey: 'My API Key',
});

const taskView = await client.tasks.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(taskView.id);
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "session": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "active",
    "liveUrl": "<string>",
    "startedAt": "2023-11-07T05:31:56Z",
    "finishedAt": "2023-11-07T05:31:56Z"
  },
  "llm": "<string>",
  "task": "<string>",
  "status": "started",
  "startedAt": "2023-11-07T05:31:56Z",
  "finishedAt": "2023-11-07T05:31:56Z",
  "metadata": {},
  "isScheduled": true,
  "steps": [
    {
      "number": 123,
      "memory": "<string>",
      "evaluationPreviousGoal": "<string>",
      "nextGoal": "<string>",
      "url": "<string>",
      "screenshotUrl": "<string>",
      "actions": [
        "<string>"
      ]
    }
  ],
  "doneOutput": "<string>",
  "userUploadedFiles": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "fileName": "<string>"
    }
  ],
  "outputFiles": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "fileName": "<string>"
    }
  ],
  "browserUseVersion": "<string>",
  "isSuccess": true
}

Authorizations

X-Browser-Use-API-Key
string
header
required

Path Parameters

task_id
string<uuid>
required

Response

200
application/json

Successful Response

View model for representing a task with its execution details

Attributes: id: Unique identifier for the task session_id: ID of the session this task belongs to session: The session this task belongs to llm: The LLM model used for this task represented as a string task: The task prompt/instruction given to the agent status: Current status of the task execution started_at: Naive UTC timestamp when the task was started finished_at: Naive UTC timestamp when the task completed (None if still running) metadata: Optional additional metadata associated with the task set by the user is_scheduled: Whether this task was created as a scheduled task steps: List of execution steps done_output: Final output/result of the task user_uploaded_files: List of files uploaded by user for this task output_files: List of files generated as output by this task browser_use_version: Version of browser-use used for this task (older tasks may not have this set) is_success: Whether the task was successful (self-reported by the agent)