> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-opensw-1782332329-96d87c7.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Browserbase integration

> Integrate with the Browserbase document loader using LangChain Python.

[Browserbase](https://browserbase.com) is a developer platform to reliably run, manage, and monitor headless browsers.

Power your AI data retrievals with:

* [Serverless Infrastructure](https://docs.browserbase.com/under-the-hood) providing reliable browsers to extract data from complex UIs
* [Stealth Mode](https://docs.browserbase.com/features/stealth-mode) with included fingerprinting tactics and automatic captcha solving
* [Session Debugger](https://docs.browserbase.com/features/sessions) to inspect your Browser Session with networks timeline and logs
* [Live Debug](https://docs.browserbase.com/guides/session-debug-connection/browser-remote-control) to quickly debug your automation

## Installation and setup

* Get an API key and Project ID from [browserbase.com](https://browserbase.com) and set it in environment variables (`BROWSERBASE_API_KEY`, `BROWSERBASE_PROJECT_ID`).
* Install the [Browserbase SDK](https://github.com/browserbase/python-sdk):

```bash theme={null}
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.

<Warning>
  The `langchain-community` package is no longer maintained. Examples that import from `langchain_community` may be outdated or broken. Use with caution.
</Warning>

```python theme={null}
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.

***

<div className="source-links">
  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>

  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/oss/python/integrations/document_loaders/browserbase.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
