Skip to main content

Endpoint

Wait for the page to reach a ready state after navigation or dynamic content loading.

Authentication

Requires userId in the request body to identify the session owner.

Parameters

string
required
The tab ID returned from POST /tabs
string
required
The user ID that owns this tab’s session
number
default:"10000"
Maximum time to wait in milliseconds (default: 10000ms / 10 seconds)
boolean
default:"true"
Whether to wait for network idle (no requests for 500ms). Set to false for faster returns on pages with continuous network activity.

Response

boolean
true if the operation completed
boolean
true if the page became ready within the timeout, false if timeout was reached

Example

Response:

When to use

After navigation

Wait for a page to fully load after calling /navigate:

After dynamic actions

Wait for content to load after clicking a button that triggers an AJAX request:

Skip network wait for streaming content

Some pages have continuous network activity (streaming, polling, live updates). Set waitForNetwork: false to return as soon as DOM is ready:

Wait behavior

The endpoint waits for:
  1. DOM ready - Document has finished parsing
  2. Network idle (if waitForNetwork: true) - No network requests for 500ms
  3. Hydration - JavaScript frameworks have initialized (best-effort detection)
If the timeout is reached before all conditions are met, ready: false is returned but the operation still succeeds (ok: true).

Error responses

Notes

  • /navigate already waits for domcontentloaded by default, so you usually don’t need /wait immediately after navigation
  • Use /wait when you need stricter ready guarantees (network idle + hydration)
  • /wait is non-blocking - if the page never becomes idle, it will return ready: false after timeout
  • Consider using a longer timeout (20-30s) for slow pages or poor network conditions
  • Navigate - Navigate to a URL (includes built-in DOM wait)
  • Get snapshot - Get page content (auto-refreshes refs if stale)