> For the complete documentation index, see [llms.txt](https://dev-docs.tasknet.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-docs.tasknet.co/reference/api-reference/page.md).

# Page

## POST /{mode}/v1/page/goToPage

> goToPage

```json
{"openapi":"3.0.1","info":{"title":"tasknet-api","version":"1.0.0"},"tags":[{"name":"Page","description":"Endpoints for controlling browser page interactions. Handles navigation, command execution, and automated browsing operations within active sessions."}],"servers":[{"url":"https://api.tasknet.co"}],"security":[{"ApiKey":[],"ApiKeyUUID":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-Api-Key"}},"schemas":{"BaseError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string"},"code":{"type":"string"},"details":{}}}}},"paths":{"/{mode}/v1/page/goToPage":{"post":{"tags":["Page"],"summary":"goToPage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionUUID":{"type":"string"},"url":{"type":"string"}},"required":["sessionUUID","url"]}}}},"parameters":[{"name":"mode","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseError"}}}}}}}}}
```

## Execute browser commands

> Executes a sequence of browser automation commands within an active session. Supports various actions like clicking, typing, hovering, and more.

```json
{"openapi":"3.0.1","info":{"title":"tasknet-api","version":"1.0.0"},"tags":[{"name":"Page","description":"Endpoints for controlling browser page interactions. Handles navigation, command execution, and automated browsing operations within active sessions."}],"servers":[{"url":"https://api.tasknet.co"}],"security":[{"ApiKey":[],"ApiKeyUUID":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-Api-Key"}},"schemas":{"ClickCommand":{"type":"object","required":["action","x","y"],"properties":{"action":{"type":"string","enum":["Click"]},"x":{"type":"number"},"y":{"type":"number"},"clickCount":{"type":"integer","default":1},"button":{"type":"string","enum":["left","right","middle"],"default":"left"}}},"HoverCommand":{"type":"object","required":["action","x","y"],"properties":{"action":{"type":"string","enum":["Hover"]},"x":{"type":"number"},"y":{"type":"number"}}},"TypeInputCommand":{"type":"object","required":["action","x","y","input"],"properties":{"action":{"type":"string","enum":["TypeInput"]},"x":{"type":"number"},"y":{"type":"number"},"input":{"type":"string"}}},"SelectCommand":{"type":"object","required":["action","x","y","value"],"properties":{"action":{"type":"string","enum":["Select"]},"x":{"type":"number"},"y":{"type":"number"},"value":{"type":"string"}}},"DelayCommand":{"type":"object","required":["action","delay"],"properties":{"action":{"type":"string","enum":["Delay"]},"delay":{"type":"number","description":"Delay in milliseconds"}}},"ScreenShotCommand":{"type":"object","required":["action","x","y","width","height"],"properties":{"action":{"type":"string","enum":["ScreenShot"]},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}}},"ScrollToCommand":{"type":"object","required":["action","x","y"],"properties":{"action":{"type":"string","enum":["ScrollTo"]},"x":{"type":"number"},"y":{"type":"number"}}},"KeyPressCommand":{"type":"object","required":["action","key"],"properties":{"action":{"type":"string","enum":["KeyPress"]},"key":{"type":"string","description":"Key to press (e.g., \"Enter\", \"Tab\", \"a\", etc.)"}}},"ScrollNextCommand":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["ScrollNext"]}}},"ScrollBottomCommand":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["ScrollBottom"]}}},"ScrollTopCommand":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["ScrollTop"]}}},"FullScreenshotCommand":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["FullScreenshot"]}}},"ScrollAtPositionCommand":{"type":"object","required":["action","x","y","factor","axis"],"properties":{"action":{"type":"string","enum":["ScrollAtPosition"]},"x":{"type":"number"},"y":{"type":"number"},"factor":{"type":"number"},"axis":{"type":"string"}}},"GetElmsCommand":{"type":"object","required":["action","selector"],"properties":{"action":{"type":"string","enum":["GetElms"]},"selector":{"type":"string","description":"CSS selector to find elements"}}},"GetRepeatedElmsByXpathCommand":{"type":"object","required":["action","xpath"],"properties":{"action":{"type":"string","enum":["GetRepeatedElmsByXpath"]},"xpath":{"type":"string","description":"XPath selector to find repeated elements"}}},"GetRepeatedElmsCommand":{"type":"object","required":["action","selector"],"properties":{"action":{"type":"string","enum":["GetRepeatedElms"]},"selector":{"type":"string","description":"CSS selector to find repeated elements"}}},"UnknownCommand":{"type":"object","required":["action"],"properties":{"action":{"type":"string","description":"Any action type not covered by specific commands"}},"additionalProperties":true,"description":"Fallback command type for unknown or custom actions"},"BaseError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string"},"code":{"type":"string"},"details":{}}}}},"paths":{"/{mode}/v1/page/executeCommands":{"post":{"tags":["Page"],"summary":"Execute browser commands","description":"Executes a sequence of browser automation commands within an active session. Supports various actions like clicking, typing, hovering, and more.","parameters":[{"name":"mode","in":"path","schema":{"type":"string"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sessionUUID","commands"],"properties":{"sessionUUID":{"type":"string","format":"uuid"},"commands":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/ClickCommand"},{"$ref":"#/components/schemas/HoverCommand"},{"$ref":"#/components/schemas/TypeInputCommand"},{"$ref":"#/components/schemas/SelectCommand"},{"$ref":"#/components/schemas/DelayCommand"},{"$ref":"#/components/schemas/ScreenShotCommand"},{"$ref":"#/components/schemas/ScrollToCommand"},{"$ref":"#/components/schemas/KeyPressCommand"},{"$ref":"#/components/schemas/ScrollNextCommand"},{"$ref":"#/components/schemas/ScrollBottomCommand"},{"$ref":"#/components/schemas/ScrollTopCommand"},{"$ref":"#/components/schemas/FullScreenshotCommand"},{"$ref":"#/components/schemas/ScrollAtPositionCommand"},{"$ref":"#/components/schemas/GetElmsCommand"},{"$ref":"#/components/schemas/GetRepeatedElmsByXpathCommand"},{"$ref":"#/components/schemas/GetRepeatedElmsCommand"},{"$ref":"#/components/schemas/UnknownCommand"}]}}}}}}},"responses":{"200":{"description":"Commands executed successfully","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseError"}}}}}}}}}
```
