## Execute `client.computers.execute(stringid, ComputerExecuteParamsbody, RequestOptionsoptions?): ActionResult` **post** `/computers/{id}/execute` Execute a single action such as screenshot, click, type, navigate, scroll, debug, set_viewport, get_html_content or other computer use actions ### Parameters - `id: string` - `body: ComputerExecuteParams` - `action?: ComputerAction` - `auto_detect_encoding?: boolean` For get_html_content - `base64?: boolean` For screenshot - `button?: string` - `debug?: Debug` - `command?: string` - `cwd?: string` - `env?: Record` - `max_output_length?: number` - `request_id?: string` - `stream?: boolean` - `timeout_seconds?: number` - `dx?: number` For scrolling - `dy?: number` - `height?: number` - `include_context?: boolean` Include page context in response - `key?: string` For key_down/key_up - `keys?: Array` - `ms?: number` - `proxy_url?: string` - `request_id?: string` RequestId is used for correlating streaming output to the originating request. Set on ActionRequest, not individual action types. - `scale_factor?: number` - `tab_id?: string` For tab management (browser sessions only) - `text?: string` - `type?: string` click|double_click|right_click|drag|type|keypress|scroll|wait|screenshot|go_to_url|debug|get_html_content|set_viewport|list_tabs|new_tab|switch_tab|close_tab|key_down|key_up|mouse_down|mouse_up - `url?: string` - `width?: number` For set_viewport - `x?: number` - `x1?: number` For dragging/scrolling - `x2?: number` For dragging - `y?: number` - `y1?: number` - `y2?: number` ### Returns - `ActionResult` - `error_message?: string` - `executed_tab_id?: string` - `page_context?: V2GoBackendInternalTypesPageContext` - `device_scale_factor?: number` - `is_main_tab?: boolean` - `page_height?: number` - `page_width?: number` - `scroll_x?: number` - `scroll_y?: number` - `tab_id?: string` - `title?: string` - `url?: string` - `viewport_height?: number` - `viewport_width?: number` - `request_id?: string` - `result?: Record` - `status?: string` - `timestamp?: string` ### Example ```typescript import Lightcone from '@tzafon/lightcone'; const client = new Lightcone({ apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted }); const actionResult = await client.computers.execute('id'); console.log(actionResult.executed_tab_id); ```