Skip to main content
POST
/
v1
/
sessions
/
{sessionId}
/
scroll
JavaScript
import Anchorbrowser from 'anchorbrowser';

const client = new Anchorbrowser({
  apiKey: 'Your API Key',
});

const response = await client.sessions.scroll('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
  deltaY: 100,
  x: 0,
  y: 0,
});

console.log(response.status);
{
  "status": "success"
}

Authorizations

anchor-api-key
string
header
required

API key passed in the header

Path Parameters

sessionId
string<uuid>
required

The ID of the browser session

Body

application/json
x
integer
required

X coordinate

y
integer
required

Y coordinate

deltaY
integer
required

Vertical scroll amount (positive is down, negative is up)

Example:

100

deltaX
integer
default:0

Horizontal scroll amount (positive is right, negative is left)

Example:

0

steps
integer
default:1

Number of steps to break the scroll into for smoother scrolling

Example:

10

useOs
boolean
default:true

Whether to use the OS scroll or the Playwright scroll

Example:

false

Response

Scroll performed successfully

status
string
Example:

"success"

I