DocsAdvanced Mousebrowser_mouse_move

browser_mouse_move

Browser Mouse Move

Move the mouse cursor along a natural curved path from start to end position. Uses bezier curves with random variation, micro-jitter, and easing for human-like movement. Essential for avoiding bot detection on sites that track mouse movement patterns.

Usage Example

123456789101112131415
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.mouse_move(
context_id=context_id,
start_x=0,
start_y=0,
end_x=0,
end_y=0
)

Parameters

Required

context_idstringrequired

The unique identifier of the browser context (e.g., 'ctx_000001')

start_xnumberrequired

Starting X coordinate (in pixels) - typically the current mouse position

start_ynumberrequired

Starting Y coordinate (in pixels) - typically the current mouse position

end_xnumberrequired

Target X coordinate (in pixels) where the mouse should move to

end_ynumberrequired

Target Y coordinate (in pixels) where the mouse should move to

Optional

stepsnumber

Number of intermediate points along the path. More steps = smoother movement. Default: auto-calculated based on distance. Recommended: 0 for auto, or 10-50 for custom

stop_pointsstring

Optional array of [x, y] coordinates where the cursor pauses briefly (50-150ms). Useful for simulating human hesitation or visual scanning behavior. Format: [[x1, y1], [x2, y2], ...]. Example: [[200, 150], [350, 250]]

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}