# 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

```bash
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

```python
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

```javascript
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_id` string required  
  The unique identifier of the browser context (e.g., 'ctx_000001')
- `start_x` number required  
  Starting X coordinate (in pixels) - typically the current mouse position
- `start_y` number required  
  Starting Y coordinate (in pixels) - typically the current mouse position
- `end_x` number required  
  Target X coordinate (in pixels) where the mouse should move to
- `end_y` number required  
  Target Y coordinate (in pixels) where the mouse should move to

### Optional

- `steps` number  
  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_points` string  
  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>
}
```
