Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.langchain.com/llms.txt

Use this file to discover all available pages before exploring further.

Browserbase is a developer platform to reliably run, manage, and monitor headless browsers. Power your AI data retrievals with:

Installation and setup

  • Get an API key and Project ID from browserbase.com and set it in environment variables (BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID).
  • Install the Browserbase SDK:
pip install browserbase

Load documents

Load webpages into LangChain with BrowserbaseLoader. The loader reads BROWSERBASE_API_KEY and BROWSERBASE_PROJECT_ID from the environment when the arguments are omitted. Set text_content=True to return text-only content instead of full HTML.
from langchain_community.document_loaders import BrowserbaseLoader

loader = BrowserbaseLoader(
    urls=["https://example.com"],
    text_content=False,
)

docs = loader.load()
print(docs[0].page_content[:61])

Loader options

  • urls Required. A list of URLs to fetch.
  • text_content Retrieve only text content. Default is False.
  • api_key Browserbase API key. Default is BROWSERBASE_API_KEY env variable.
  • project_id Browserbase Project ID. Default is BROWSERBASE_PROJECT_ID env variable.
  • session_id Optional. Provide an existing Session ID.
  • proxy Optional. Enable/Disable Proxies.