> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-zh.cn/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) 提供可靠的浏览器，从复杂的用户界面中提取数据
* [隐身模式](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](http://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="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/i18n\zh-CN\oss\javascript\integrations\document_loaders\web_loaders\browserbase.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>

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