Skip to main content

Endpoint

Scrolls the page viewport in the specified direction by a given pixel amount.

Authentication

No authentication required. All endpoints use userId for session isolation.

Path parameters

string
required
The unique identifier of the tab

Body parameters

string
required
User identifier for session isolation
string
default:"down"
Scroll direction. Valid values: up, down, left, right
integer
default:"500"
Number of pixels to scroll in the specified direction

Response

boolean
Always true on success

Behavior

  • Scrolling is performed using mouse wheel events
  • After scrolling, waits 300ms for scroll animations and lazy-loaded content
  • Does not invalidate element references (use /snapshot if new content appears)
  • Scrolling beyond page bounds is handled gracefully (no error)

Default scroll amounts

If amount is not specified:
  • Default: 500 pixels (approximately half a viewport on typical screens)
Common scroll amounts:
  • Small: 200-300 pixels (peek at more content)
  • Medium: 500 pixels (default, half viewport)
  • Large: 1000+ pixels (jump to new section)
  • Full page: Use viewport height (typically 720-1080)

Error codes

  • 400 - Missing required parameter (userId)
  • 404 - Tab not found
  • 500 - Internal server error

Examples

Scroll down (default)

Scroll down with custom amount

Scroll up

Scroll horizontally

Use cases

Load lazy content

Many modern websites load content as you scroll. After scrolling, call /snapshot to access new elements:
For infinite scroll pages, scroll down multiple times until desired content appears:

Scroll to top

Scroll to bottom

Best practices

  1. Wait after scrolling: The 300ms built-in delay may not be enough for heavy pages - consider waiting 1-2s before snapshot
  2. Scroll incrementally: Multiple small scrolls (500px) are better than one large scroll for triggering lazy loaders
  3. Check for new content: Compare refsCount before/after scrolling to detect loaded content
  4. Avoid excessive scrolling: Scrolling beyond page bounds is safe but wastes time
  • GET /tabs/:tabId/snapshot - Get page snapshot after scrolling to access new elements
  • GET /tabs/:tabId/links - Extract links without scrolling (may miss lazy-loaded links)