Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:CrewAIInc CrewAI Browserbase Load Tool

From Leeroopedia
Knowledge Sources
Domains Tools, Web_Scraping, Browser_Automation
Last Updated 2026-02-11 00:00 GMT

Overview

Concrete tool for loading webpages in a headless browser using Browserbase's serverless infrastructure provided by CrewAI.

Description

The BrowserbaseLoadTool class extends BaseTool to wrap Browserbase's Python SDK for reliable content extraction from complex web applications. During initialization, it validates the BROWSERBASE_API_KEY environment variable and includes interactive package installation prompting via the click library if the browserbase package is missing (with automatic installation via uv add browserbase). The _run method delegates to the Browserbase client's load_url method, passing configuration for text-only content extraction (text_content), session reuse (session_id), and proxy settings (proxy). The tool optionally uses BROWSERBASE_PROJECT_ID for project-scoped operations.

Usage

Use this tool when CrewAI agents need to reliably load and extract content from JavaScript-heavy websites and single-page applications that cannot be scraped with simple HTTP requests.

Code Reference

Source Location

  • Repository: CrewAI
  • File: lib/crewai-tools/src/crewai_tools/tools/browserbase_load_tool/browserbase_load_tool.py
  • Lines: 1-77

Signature

class BrowserbaseLoadTool(BaseTool):
    name: str = "Browserbase web load tool"
    description: str = "Load webpages url in a headless browser using Browserbase..."
    args_schema: type[BaseModel] = BrowserbaseLoadToolSchema
    api_key: str | None = os.getenv("BROWSERBASE_API_KEY")
    project_id: str | None = os.getenv("BROWSERBASE_PROJECT_ID")
    text_content: bool | None = False
    session_id: str | None = None
    proxy: bool | None = None

    def __init__(self, api_key=None, project_id=None, text_content=False, ...): ...
    def _run(self, url: str): ...

Import

from crewai_tools import BrowserbaseLoadTool

I/O Contract

Inputs

Name Type Required Description
url str Yes Website URL to load in the headless browser
api_key str or None No Browserbase API key (constructor; falls back to BROWSERBASE_API_KEY env var)
project_id str or None No Browserbase project ID (constructor; falls back to BROWSERBASE_PROJECT_ID env var)
text_content bool or None No Extract text-only content (constructor, default False)
session_id str or None No Reuse an existing browser session (constructor)
proxy bool or None No Enable proxy routing (constructor)

Outputs

Name Type Description
_run() returns str Loaded webpage contents from the headless browser

Usage Examples

Basic Usage

from crewai_tools import BrowserbaseLoadTool

tool = BrowserbaseLoadTool(text_content=True)
content = tool.run(url="https://example.com")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment