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
CURL
POST `/api/execute/browser_mouse_move`
curl -X POST \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"context_id": "ctx_000001",
"start_x": 0,
"start_y": 0,
"end_x": 0,
"end_y": 0
}' \
http://localhost:8080/api/execute/browser_mouse_move
Python SDK
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
)
Node.js SDK
import { OwlBrowser } from '@olib-ai/owl-browser-sdk';
// Async usage
const ctx = await browser.createContext();
const contextId = ctx.context_id;
await browser.mouseMove({
context_id: contextId,
start_x: 0,
start_y: 0,
end_x: 0,
end_y: 0
});
Parameters
Required
context_idstring required
The unique identifier of the browser context (e.g., 'ctx_000001')start_xnumber required
Starting X coordinate (in pixels) - typically the current mouse positionstart_ynumber required
Starting Y coordinate (in pixels) - typically the current mouse positionend_xnumber required
Target X coordinate (in pixels) where the mouse should move toend_ynumber required
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 customstop_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>
}