Every API here is available over the APIs.io API and to AI agents over MCP.
{
"openapi": "3.1.0",
"info": {
"title": "Browser Use Public API v2",
"summary": "Browser Use API for running web agents (v2)",
"version": "2.0.0"
},
"servers": [
{
"url": "https://api.browser-use.com/api/v2",
"description": "Production server"
}
],
"paths": {
"/billing/account": {
"get": {
"tags": [
"Billing"
],
"summary": "Get Account Billing",
"description": "Get authenticated account information including credit balance and account details.",
"operationId": "get_account_billing_billing_account_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountView"
}
}
}
},
"404": {
"description": "Project for a given API key not found!",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountNotFoundError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"APIKeyHeader": []
}
]
}
},
"/tasks": {
"get": {
"tags": [
"Tasks"
],
"summary": "List Tasks",
"description": "Get paginated list of AI agent tasks with optional filtering by session and status.",
"operationId": "list_tasks_tasks_get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "pageSize",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 10,
"title": "Pagesize"
}
},
{
"name": "pageNumber",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"default": 1,
"title": "Pagenumber"
}
},
{
"name": "sessionId",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Sessionid"
}
},
{
"name": "filterBy",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/TaskStatus"
},
{
"type": "null"
}
],
"title": "Filterby"
}
},
{
"name": "after",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "After"
}
},
{
"name": "before",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Before"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskListResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"Tasks"
],
"summary": "Create Task",
"description": "Create and start a new task.\n\nYou can either:\n1. Start a new task without a sessionId (auto-creates a session with US proxy by default).\n Note: Tasks without a sessionId are one-off tasks that automatically close the session\n upon completion (keep_alive=false). Use sessionSettings to configure the auto-created\n session (e.g. proxyCountryCode, profileId, screen dimensions).\n2. Start a new task in an existing session (reuse for follow-up tasks or custom configuration)\n\nNote: Without sessionSettings, a US proxy is enabled by default. Providing sessionSettings\noverrides defaults \u2014 proxy is only enabled if proxyCountryCode is set. For full control over\nsession configuration (e.g. keep_alive), create a session first via POST /sessions with your\ndesired settings, then pass that sessionId when creating tasks.",
"operationId": "create_task_tasks_post",
"security": [
{
"APIKeyHeader": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateTaskRequest"
}
}
}
},
"responses": {
"202": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskCreatedResponse"
}
}
}
},
"400": {
"description": "Session is stopped or has running task",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/SessionStoppedError"
},
{
"$ref": "#/components/schemas/SessionHasRunningTaskError"
}
],
"title": "Response 400 Create Task Tasks Post"
}
}
}
},
"404": {
"description": "Session not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionNotFoundError"
}
}
}
},
"422": {
"description": "Request validation failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
},
"429": {
"description": "Too many concurrent active sessions",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyConcurrentActiveSessionsError"
}
}
}
}
}
}
},
"/tasks/{task_id}": {
"get": {
"tags": [
"Tasks"
],
"summary": "Get Task",
"description": "Get detailed task information including status, progress, steps, and file outputs.",
"operationId": "get_task_tasks__task_id__get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Task Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskView"
}
}
}
},
"404": {
"description": "Task not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskNotFoundError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"patch": {
"tags": [
"Tasks"
],
"summary": "Update Task",
"description": "Control task execution with stop, pause, resume, or stop task and session actions.",
"operationId": "update_task_tasks__task_id__patch",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Task Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateTaskRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskView"
}
}
}
},
"404": {
"description": "Task not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskNotFoundError"
}
}
}
},
"422": {
"description": "Request validation failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
}
}
}
},
"/tasks/{task_id}/status": {
"get": {
"tags": [
"Tasks"
],
"summary": "Get Task Status",
"description": "Lightweight endpoint optimized for polling task status.\n\nReturns only the task status, output, and cost without loading steps,\nfiles, or session details. Use this endpoint for efficient polling\ninstead of GET /tasks/{task_id}.\n\nRecommended polling pattern:\n1. POST /tasks to create a task\n2. Poll GET /tasks/{task_id}/status until status is 'finished' or 'stopped'\n3. GET /tasks/{task_id} once at the end for full details including steps",
"operationId": "get_task_status_tasks__task_id__status_get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Task Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskStatusView"
}
}
}
},
"404": {
"description": "Task not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskNotFoundError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/tasks/{task_id}/logs": {
"get": {
"tags": [
"Tasks"
],
"summary": "Get Task Logs",
"description": "Get secure download URL for task execution logs with step-by-step details.",
"operationId": "get_task_logs_tasks__task_id__logs_get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Task Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskLogFileResponse"
}
}
}
},
"404": {
"description": "Task not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TaskNotFoundError"
}
}
}
},
"500": {
"description": "Failed to generate download URL",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DownloadUrlGenerationError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/sessions": {
"get": {
"tags": [
"Sessions"
],
"summary": "List Sessions",
"description": "Get paginated list of AI agent sessions with optional status filtering.",
"operationId": "list_sessions_sessions_get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "pageSize",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"default": 10,
"title": "Pagesize"
}
},
{
"name": "pageNumber",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"default": 1,
"title": "Pagenumber"
}
},
{
"name": "filterBy",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/SessionStatus"
},
{
"type": "null"
}
],
"title": "Filterby"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionListResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"Sessions"
],
"summary": "Create Session",
"description": "Create a new session with a new task.",
"operationId": "create_session_sessions_post",
"security": [
{
"APIKeyHeader": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateSessionRequest",
"default": {
"proxyCountryCode": "us",
"persistMemory": true,
"keepAlive": true,
"enableRecording": false
}
}
}
}
},
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionItemView"
}
}
}
},
"402": {
"description": "Insufficient credits to start a session"
},
"404": {
"description": "Profile not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProfileNotFoundError"
}
}
}
},
"422": {
"description": "Request validation failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
},
"429": {
"description": "Too many concurrent active sessions",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TooManyConcurrentActiveSessionsError"
}
}
}
}
}
}
},
"/sessions/{session_id}": {
"get": {
"tags": [
"Sessions"
],
"summary": "Get Session",
"description": "Get detailed session information including status, URLs, and task details.",
"operationId": "get_session_sessions__session_id__get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Session Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionView"
}
}
}
},
"404": {
"description": "Session not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionNotFoundError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"patch": {
"tags": [
"Sessions"
],
"summary": "Update Session",
"description": "Stop a session and all its running tasks.",
"operationId": "update_session_sessions__session_id__patch",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Session Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateSessionRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionView"
}
}
}
},
"404": {
"description": "Session not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionNotFoundError"
}
}
}
},
"422": {
"description": "Request validation failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"Sessions"
],
"summary": "Delete Session",
"description": "Delete a session with all its tasks.",
"operationId": "delete_session_sessions__session_id__delete",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Session Id"
}
}
],
"responses": {
"204": {
"description": "Successful Response"
},
"404": {
"description": "Session not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionNotFoundError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/sessions/{session_id}/purge": {
"post": {
"tags": [
"Sessions"
],
"summary": "Purge Session",
"description": "Immediately purge all data for a session (ZDR projects only).\n\nRedacts PII from database records and deletes all S3 objects (screenshots,\noutput files, uploaded files, logs, history, downloads, agent state) for the\ngiven session. This is the same cleanup the ZDR cron performs, but on-demand\nand scoped to a single session with no grace period.",
"operationId": "purge_session_sessions__session_id__purge_post",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Session Id"
}
}
],
"responses": {
"204": {
"description": "Successful Response"
},
"403": {
"description": "Project is not ZDR-enabled"
},
"404": {
"description": "Session not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionNotFoundError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/sessions/{session_id}/public-share": {
"get": {
"tags": [
"Sessions"
],
"summary": "Get Session Public Share",
"description": "Get public share information including URL and usage statistics.",
"operationId": "get_session_public_share_sessions__session_id__public_share_get",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Session Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ShareView"
}
}
}
},
"404": {
"description": "Session or share not found",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/SessionNotFoundError"
},
{
"$ref": "#/components/schemas/ShareNotFoundError"
}
],
"title": "Response 404 Get Session Public Share Sessions Session Id Public Share Get"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"Sessions"
],
"summary": "Create Session Public Share",
"description": "Create or return existing public share for a session.",
"operationId": "create_session_public_share_sessions__session_id__public_share_post",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Session Id"
}
}
],
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ShareView"
}
}
}
},
"404": {
"description": "Session not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionNotFoundError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"Sessions"
],
"summary": "Delete Session Public Share",
"description": "Remove public share for a session.",
"operationId": "delete_session_public_share_sessions__session_id__public_share_delete",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Session Id"
}
}
],
"responses": {
"204": {
"description": "Successful Response"
},
"404": {
"description": "Session not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionNotFoundError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/files/sessions/{session_id}/presigned-url": {
"post": {
"tags": [
"Files"
],
"summary": "Agent Session Upload File Presigned Url",
"description": "Generate a secure presigned URL for uploading files to an agent session.",
"operationId": "agent_session_upload_file_presigned_url_files_sessions__session_id__presigned_url_post",
"security": [
{
"APIKeyHeader": []
}
],
"parameters": [
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"title": "Session Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadFileRequest"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadFilePresignedUrlResponse"
}
}
}
},
"400": {
"description": "Unsupported content type",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnsupportedContentTypeError"
}
}
}
},
"404": {
"description": "Session not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionNotFoundError"
}
}
}
},
"500": {
"description": "Failed to generate upload URL",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerError"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
# --- truncated at 32 KB (204 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/browser-use/refs/heads/main/openapi/browser-use-api-v2-openapi.json