Web Browser AI-Control API

API documentation for AI-powered browser control

Browser

Browser | Clear Logs

Clears all logs for the specified session.

post
http://localhost:3000/api/browser/clear-logs/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Success 200

Field Type Description
success Boolean

Operation success status

Error 500

Name Type Description
error Object

Error object with message

Browser | Extract Data

Extracts structured data from the current page using a Zod schema.

post
http://localhost:3000/api/browser/extract/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Request Body

Field Type Description
instruction String

Natural language instruction for extraction

schema Object

Zod schema definition

modelName optional String

Optional AI model name to use

Success 200

Field Type Description
result Object

Extracted data matching schema

Error 500

Name Type Description
error Object

Error object with message

Browser | Get Console Logs

Retrieves filtered console logs from the browser session.

get
http://localhost:3000/api/browser/console-logs/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Query Parameter(s)

Field Type Description
levels.error optional Boolean

Include error logs

Default value: true

levels.warning optional Boolean

Include warning logs

Default value: false

levels.info optional Boolean

Include info logs

Default value: false

levels.trace optional Boolean

Include trace logs

Default value: false

includeStringFilters optional String[]

Array of strings to include (matches message, path, type)

excludeStringFilters optional String[]

Array of strings to exclude (matches message, path, type)

startTime optional String

Filter logs after this ISO timestamp

endTime optional String

Filter logs before this ISO timestamp

truncateLength optional Number

Maximum length for log messages before truncation

Default value: 500

Success 200

Field Type Description
logs Object[]

Filtered console logs

Error 500

Name Type Description
error Object

Error object with message

Browser | Get DOM State

Retrieves the current DOM state as HTML.

get
http://localhost:3000/api/browser/dom-state/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Success 200

Field Type Description
state Object

Current page HTML

Error 500

Name Type Description
error Object

Error object with message

Browser | Get Network Logs

Retrieves filtered network request/response logs.

get
http://localhost:3000/api/browser/network-logs/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Query Parameter(s)

Field Type Description
includeHeaders optional Boolean

Include request/response headers

Default value: false

includeBody optional Boolean

Include request/response bodies

Default value: true

includeInfo optional Boolean

Include informational responses (100-199)

Default value: true

includeSuccess optional Boolean

Include successful responses (200-299)

Default value: true

includeRedirect optional Boolean

Include redirection responses (300-399)

Default value: true

includeClientError optional Boolean

Include client error responses (400-499)

Default value: true

includeServerError optional Boolean

Include server error responses (500-599)

Default value: true

includeStringFilters optional String[]

Array of strings to include (matches URL, method, or headers)

excludeStringFilters optional String[]

Array of strings to exclude (matches URL, method, or headers)

startTime optional String

Filter logs after this ISO timestamp

endTime optional String

Filter logs before this ISO timestamp

truncateLength optional Number

Maximum length for request/response bodies before truncation

Default value: 500

Success 200

Field Type Description
logs Object[]

Filtered network logs

Browser | Navigate Browser

Navigates the browser to a specified URL with network idle waiting.

post
http://localhost:3000/api/browser/navigate/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Request Body

Field Type Description
url String

URL to navigate to

Success 200

Field Type Description
success Boolean

Indicates if operation was successful

url String

Current browser URL after navigation

Error 400

Name Type Description
error Object

URL is required

Error 500

Name Type Description
error Object

Error object with message and optional stack trace

Browser | Observe Page

Analyzes the page and returns possible actions based on content.

post
http://localhost:3000/api/browser/observe/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Request Body

Field Type Description
instruction optional String

Optional instruction to guide observation

useVision optional String

Vision mode: 'fallback'

Default value: fallback

modelName optional String

Optional AI model name to use

Success 200

Field Type Description
actions Object

List of possible actions and observations

Error 500

Name Type Description
error Object

Error object with message

Browser | Perform Browser Action

Performs a natural language action in the browser with optional vision capabilities.

post
http://localhost:3000/api/browser/act/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Request Body

Field Type Description
action String

Natural language action to perform

useVision optional String

Vision mode: 'fallback'

Default value: fallback

modelName optional String

Optional AI model name to use

includeLogs optional Boolean

Include logs from the action execution

logFilters optional Object

Filters for included logs

  console optional Object

Console log filters

    includeErrors optional Boolean

Include error logs

Default value: true

    includeWarnings optional Boolean

Include warning logs

Default value: false

    includeInfo optional Boolean

Include info logs

Default value: false

    includeTrace optional Boolean

Include trace logs

Default value: false

    includeStringFilters optional String[]

Strings to include in console logs

    excludeStringFilters optional String[]

Strings to exclude from console logs

    truncateLength optional Number

Maximum length for console messages

Default value: 500

  network optional Object

Network log filters

    statusCodes optional Object

Status code filters

      info optional Boolean

Include 1xx responses

Default value: true

      success optional Boolean

Include 2xx responses

Default value: true

      redirect optional Boolean

Include 3xx responses

Default value: true

      clientError optional Boolean

Include 4xx responses

Default value: true

      serverError optional Boolean

Include 5xx responses

Default value: true

    includeHeaders optional Boolean

Include headers

Default value: false

    includeBody optional Boolean

Include bodies

Default value: true

    includeQueryParams optional Boolean

Include query parameters

Default value: true

    includeStringFilters optional String[]

Strings to include in network logs

    excludeStringFilters optional String[]

Strings to exclude from network logs

    truncateLength optional Number

Maximum length for bodies

Default value: 500

Success 200

Field Type Description
result Object

Action execution result

logs optional Object

Filtered logs if requested

Error 500

Name Type Description
error Object

Error object with message

Browser | Take Screenshot

Captures a screenshot of the current page state.

post
http://localhost:3000/api/browser/screenshot/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Success 200

Field Type Description
image Binary

JPEG image data

Error 500

Name Type Description
error Object

Error object with message

Sessions

Sessions | Create Browser Session

Creates a new browser session in the cloud.

post
http://localhost:3000/api/sessions/create-session

Success 200

Field Type Description
success Boolean

Indicates if operation was successful

sessionId String

Unique identifier for the created session

Error 500

Name Type Description
error Object

Error object with message

Sessions | Get Session Debug URLs

Retrieves debug URLs for a specific Browserbase session.

get
http://localhost:3000/api/sessions/debug/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Success 200

Field Type Description
debugUrls Object

Debug URLs object containing debuggerUrl, debuggerFullscreenUrl, wsUrl, and pages

success Boolean

Operation success status

Error 500

Name Type Description
error Object

Error object with message

Sessions | Get Session Details

Retrieves details for a specific Browserbase session.

get
http://localhost:3000/api/sessions/session/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Success 200

Field Type Description
session Object

Session details

success Boolean

Operation success status

Error 500

Name Type Description
error Object

Error object with message

Sessions | List Running Sessions

Retrieves a list of all running browser sessions.

get
http://localhost:3000/api/sessions/running-sessions

Success 200

Field Type Description
success Boolean

Indicates if operation was successful

sessions Object[]

List of session objects

Error 500

Name Type Description
error Object

Error object with message

Sessions | Stop Browser Session

Stops and cleans up an existing browser session.

post
http://localhost:3000/api/sessions/stop-session/:sessionId

Parameter

Field Type Description
sessionId String

Session's unique identifier

Success 200

Field Type Description
success Boolean

Indicates if operation was successful

Error 500

Name Type Description
error Object

Error object with message

Generated with apidoc 1.2.0 - Sat Nov 09 2024 19:43:27 GMT+0100 (Central European Standard Time)