Skip to content
Docs
GitHub

Browserless

Headless browser automation through Browserless for screenshots, DOM reading, scraping, page interaction, and persistent sessions for login-protected pages.

6 min readEdit on GitHub

Applies toFrameworkSelf-hostedEverruns Demo

Enable the browserless Cargo feature and bind application-owned services with .browserless(credentials). See Framework services for credentials, persistence and a complete real-model example. The remaining setup sections describe the hosted Platform.

IDbrowserless
CategoryBrowser
FeaturesNone
Dependenciessession_storage

Cloud browser automation powered by Browserless. Agents can navigate pages, take screenshots, read rendered DOM content, scrape structured data, and interact with pages using click, type, keyboard, mouse, and touch events.

  1. In the Browserless Dashboard, open API Keys in your account settings and copy your API token.
  2. In Everruns, open Settings > Connections, find Browserless, select Connect, and paste the token.

Once connected, agents with the Browserless capability can use the tools below.

Stateless (default). Each tool call opens a fresh browser that is destroyed after the response. Nothing persists between calls, and no cleanup is needed. Use it for one-shot screenshots or scraping.

Persistent session (CDP). browserless_open_browser creates a browser over the Chrome DevTools Protocol that stays alive between tool calls, keeping login state, cookies, and navigation history. Tools use the persistent browser automatically when one is active. A persistent browser expires after 60 seconds of inactivity by default; call browserless_close_browser when done for immediate cleanup.

Both modes connect over the Chrome DevTools Protocol, so the Browserless token needs WebSocket (CDP) access. A Browserless cloud token without it falls back to the Browserless REST API for the stateless tools; see Security.

A typical flow for a login-protected page:

  1. browserless_open_browser with the login page URL.
  2. browserless_interact to fill credentials and submit the form.
  3. browserless_navigate to browse authenticated pages.
  4. browserless_screenshot to capture the authenticated page state.
  5. browserless_close_browser to release resources.

Open a persistent browser session via CDP.

ParameterTypeRequiredDescription
urlstringnoInitial URL to navigate to
timeout_msintegernoHow long the browser stays alive between calls (default: 60000)

Close the persistent browser session and release resources. Takes no parameters.

Navigate to a URL and return page metadata (title, links, headings, meta tags).

ParameterTypeRequiredDescription
urlstringyesThe URL to navigate to
wait_for_selectorstringnoWait for this CSS selector to appear
wait_for_timeoutintegernoWait this many milliseconds after page load

Take a PNG screenshot of a page. Returns base64-encoded image data.

ParameterTypeRequiredDescription
urlstringyesThe URL to screenshot
full_pagebooleannoCapture the full scrollable page (default: true)
selectorstringnoCSS selector to screenshot a specific element
wait_for_selectorstringnoWait for this CSS selector before taking screenshot
wait_for_timeoutintegernoWait this many milliseconds before taking screenshot

Get the fully rendered HTML content (DOM) of a page, including JavaScript-rendered content.

ParameterTypeRequiredDescription
urlstringyesThe URL to read
wait_for_selectorstringnoWait for this CSS selector before reading content
wait_for_timeoutintegernoWait this many milliseconds before reading content
best_attemptbooleannoContinue even if async events fail or time out (default: false)

Extract structured data from a page using CSS selectors. Returns JSON with matched elements.

ParameterTypeRequiredDescription
urlstringyesThe URL to scrape
elementsarrayyesArray of {selector} objects to extract
wait_for_selectorstringnoWait for this CSS selector before scraping
wait_for_timeoutintegernoWait this many milliseconds before scraping

Navigate to a URL, then perform a sequence of actions.

ParameterTypeRequiredDescription
urlstringyesThe initial URL to navigate to
stepsarrayyesOrdered list of interaction steps
return_screenshotbooleannoReturn a base64 screenshot after all steps (default: false)
return_contentbooleannoReturn DOM content after all steps (default: false). With both flags true, both are returned; with neither, DOM content is returned

Supported step actions:

ActionKey ParametersDescription
clickselector or x,yClick element or coordinates
typeselector, valueType text into input field
keyboardkeyPress a key (Enter, Tab, Escape, etc.)
mouse_movex, yMove mouse to coordinates
touchselectorTap element (mobile touch simulation)
scrollvalueScroll page by pixel amount
waitwait_msWait for milliseconds
wait_for_selectorselector, wait_msWait for element to appear
navigatevalueNavigate to a different URL
  • Accessibility testing: navigate pages, read the DOM, check ARIA attributes and heading structure.
  • Regression testing and visual QA: take before and after screenshots and verify content after changes.
  • Login flows: authenticate in a persistent session and test protected pages.
  • Web scraping: extract structured data from a website.
  • API tokens are encrypted at rest (AES-256-GCM envelope encryption).
  • Browser sessions are isolated on Browserless servers.
  • The browser has no network access of its own. Everruns makes every request the page makes, including each redirect hop, scripts, and images. Private, loopback, link-local, and cloud metadata addresses are refused, both as URLs and as DNS answers, and the session’s network access list applies to every request. A blocked page load returns an error, never the page.
  • WebSockets and other connections a page opens outside HTTP requests are refused.
  • A relayed response is limited to 10 MB.
  • The REST fallback for Browserless cloud tokens without CDP access runs in Browserless’ network and checks only the URL you pass. A self-hosted Browserless never falls back.
  • CDP session state stores only the WebSocket endpoint (no secrets), scoped per session.
  • Large DOM responses are truncated to 100KB to prevent context flooding.