Fetch the status and results of a browser-agent task submission by id. Works for in-progress and completed submissions. Opt into the full per-step event timeline with includeEvents=true.
GET/api/v1/browser-agents/{id}Authorization: Bearer YOUR_API_KEY as Run a Task| Name | Type | Required | Description |
|---|---|---|---|
id | string | ✅ | Run id returned by POST /api/v1/browser-agents (a 24-char Mongo ObjectId). |
| Name | Type | Default | Description |
|---|---|---|---|
includeEvents | boolean | false | When true, includes the full per-step event timeline on each TaskResult (see events) and adds a top-level liveEvents field for tasks that are still running. Payloads can be large — screenshots inflate them fast. |
BatchResult shape produced by POST /api/v1/browser-agents. See Run a Task → Response Schemas for the field-by-field breakdown.
status === "processing":
results[i] holds a completed task when task i has finished, otherwise a synthesized pending stub with { url, instruction, input, status: "PENDING" } so your UI can always render the task row.completed counts how many tasks have a real result (not stubs).includeEvents=true, liveEvents[i] holds the in-flight event stream for each still-running task. Completed tasks get liveEvents[i] = [].status === "completed" (or "failed"):
results[i] is a real TaskResult.liveEvents is omitted (all timelines live on results[i].events when includeEvents=true).completedAt is populated.TaskResult now carries an events array, and while any task is still running liveEvents is populated too.
events array records every step the agent took. Each event is { type, data, ts? }. Event types you’ll see:
| Type | When | Notable data fields |
|---|---|---|
navigation | Agent loaded a URL | url |
plan | Agent reasoned about next steps | reasoning, steps |
action | Agent performed an interaction | action (click/type/scroll/extract), selector |
screenshot | Frame captured | url (CDN link) |
validation | Output schema / success condition checked | passed, errors |
done | Task finished | status |
error | Task errored | message |
| Code | Meaning |
|---|---|
200 | Run found. Body is the BatchResult. |
400 | Malformed run id. |
401 | Missing or invalid bearer token. |
404 | Run not found, or not owned by this API key. |
API key for authentication. Get your API key from https://pre.dev/projects/playground (Solo) or https://pre.dev/enterprise/dashboard?page=api (Enterprise). Use format: Bearer YOUR_API_KEY
Run id (24-char Mongo ObjectId).
Include per-step event timelines. Payloads can be large — screenshots inflate them fast.
Run result.
Run summary. The schema is named BatchResult for backwards compatibility with older clients.
Run id (24-char Mongo ObjectId).
Total tasks in the run.
Number of tasks that have finished (any status).
Per-task results aligned by taskIndex. In-progress runs return PENDING stubs for tasks that haven't started; the stub has only url, instruction, input, and status: "PENDING".
Sum of credits billed across all tasks in the run.
processing, completed, failed Populated once status !== "processing".
Only present when includeEvents=true on GET /:id. Per-task in-flight event streams for tasks that haven't yet finished. Aligned by index with results; completed tasks get an empty array.
Set only when status === "failed".