Run code in a browser session
execute_browser_sessionExecute JavaScript in an existing account-owned browser page, optionally navigating first. Code can click, type, submit forms or change a website: review the exact code and URL. Omit confirm to inspect the session and proposed parameters without running code. Execution is charged separately from session creation: read its current price with get_endpoint web/sessions/execute. Requires confirm=true, an idempotency key and max_credits. Use call_endpoint web/sessions/get for status. This controls a hosted browser, not a local shell.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes | Endpoint parameters from get_endpoint, using string values. Omit dry_run: confirm controls preview versus execution. | |
| confirm | No | Omit or false for a free preview. Only boolean true authorizes execution. | |
| session_id | Yes | ||
| max_credits | No | Maximum credits this action may reserve. Required when confirming job/session creation or browser-code execution. Does not change a previous charge or guarantee a refund. | |
| idempotency_key | No | Required for execution (or supply Idempotency-Key header). Reuse the same key after a lost response; use a new key for a new action. Previews do not consume it. |