> ## Documentation Index
> Fetch the complete documentation index at: https://cndoc-langchain.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Browserbase 加载器集成

> 使用 LangChain JavaScript 集成 Browserbase 加载器文档加载器。

## 描述

[Browserbase](https://browserbase.com) 是一个开发者平台，用于可靠地运行、管理和监控无头浏览器。

通过以下功能为您的 AI 数据检索提供支持：

* [无服务器基础设施](https://docs.browserbase.com/under-the-hood)，提供可靠的浏览器以从复杂 UI 中提取数据
* [隐身模式](https://docs.browserbase.com/features/stealth-mode)，包含指纹识别策略和自动验证码解决功能
* [会话调试器](https://docs.browserbase.com/features/sessions)，用于检查您的浏览器会话，包含网络时间线和日志
* [实时调试](https://docs.browserbase.com/guides/session-debug-connection/browser-remote-control)，用于快速调试您的自动化流程

## 安装

* 从 [browserbase.com](https://browserbase.com) 获取 API 密钥和项目 ID，并将其设置在环境变量中（`BROWSERBASE_API_KEY`、`BROWSERBASE_PROJECT_ID`）。
* 安装 [Browserbase SDK](https://github.com/browserbase/js-sdk)：

```bash npm theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
npm i @langchain/community @langchain/core @browserbasehq/sdk
```

## 示例

按如下方式使用 `BrowserbaseLoader`，以允许您的代理加载网站：

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { BrowserbaseLoader } from "@langchain/community/document_loaders/web/browserbase";

const loader = new BrowserbaseLoader(["https://example.com"], {
  textContent: true,
});
const docs = await loader.load();
```

## 参数

* `urls`：必需。要加载的 URL 列表。

## 选项

* `textContent` 仅检索文本内容。默认为 `false`。
* `sessionId` 可选。提供现有的会话 ID。
* `proxy` 可选。启用/禁用代理。

***

<div className="source-links">
  <Callout icon="terminal-2">
    [将这些文档连接](/use-these-docs)到 Claude、VSCode 等，通过 MCP 获取实时答案。
  </Callout>

  <Callout icon="edit">
    [在 GitHub 上编辑此页面](https://github.com/langchain-ai/docs/edit/main/src/oss/javascript/integrations/document_loaders/web_loaders/browserbase.mdx) 或 [提交问题](https://github.com/langchain-ai/docs/issues/new/choose)。
  </Callout>
</div>
