Skip to main content
Navigates the tab to a new URL or search query using macros.

Path parameters

string
required
The unique identifier of the tab

Body parameters

string
required
User identifier for session isolation
string
Direct URL to navigate to (e.g., https://example.com). Either url or macro is required.
string
Search macro name (e.g., @google_search, @youtube_search). Either url or macro is required.
string
Search query to use with macro (required if macro is provided)
string
Session key for grouping tabs (legacy parameter: listItemId also accepted)

Response

boolean
Always true on success
string
The tab identifier
string
The final URL after navigation (may differ from requested URL due to redirects)
boolean
Whether element references were successfully built for the loaded page

Search macros

Macros expand to search URLs for popular websites:

Auto-tab creation

If the specified tabId doesn’t exist, a new tab is automatically created (up to session limits). This allows simplified workflows without separate /tabs POST.
  • Waits for domcontentloaded event (default timeout: 30s)
  • Attempts to wait for network idle (5s timeout, continues if missed)
  • Waits for framework hydration (React/Next.js/Vue detection)
  • Auto-dismisses common consent/privacy dialogs
  • Builds element references after page load
  • Resets cached snapshots and refs

Go back

Navigates to the previous page in the tab’s history.

Path parameters

string
required
The unique identifier of the tab

Body parameters

string
required
User identifier for session isolation

Response

boolean
Always true on success
string
The URL after navigating back

Go forward

Navigates to the next page in the tab’s history.

Path parameters

string
required
The unique identifier of the tab

Body parameters

string
required
User identifier for session isolation

Response

boolean
Always true on success
string
The URL after navigating forward

Refresh page

Reloads the current page.

Path parameters

string
required
The unique identifier of the tab

Body parameters

string
required
User identifier for session isolation

Response

boolean
Always true on success
string
The current URL (unchanged)

Error codes

  • 400 - Missing required parameter or invalid URL scheme (only http/https allowed)
  • 404 - Tab not found
  • 429 - Maximum tabs per session reached (when auto-creating tab)
  • 500 - Navigation failed (timeout, network error)

Examples

Search using macro

Go back in history

Go forward in history

Refresh page

Best practices

  1. Use macros for search: Simpler and more maintainable than manually constructing URLs
  2. Check refsAvailable: If false, the page may still be loading - wait and retry /snapshot
  3. Handle redirects: The returned url may differ from the requested URL
  4. Allow timeout buffer: Complex sites may take 10-20s to fully load
  5. Call /snapshot after navigation: Element refs are rebuilt but not returned in navigate response