# @fingerprintjs/botd 中文文档

规范地址：https://npmcn.com/package/%40fingerprintjs/botd/

版本：2\.0\.0
npm 元数据更新时间：2025-11-04T11:02:29.324Z
中文译文更新时间：2026-11-14T18:48:37.917Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40fingerprintjs/botd
原文对照：https://npmcn.com/package/%40fingerprintjs/botd/?lang=original
项目主页：https://fingerprintjs.github.io/BotD/
源码仓库：https://github.com/fingerprintjs/botd

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：81.9 kB，8 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：0 个
- 首次发布：2022-10-20T13:08:56.445Z
- 最新版本发布：2025-11-04T11:02:29.108Z
- 近 30 天下载量：1593988（2026-10-15 至 2026-11-13，npm 官方下载统计）
- 已发布版本数：24（近 12 个月 0 个）

## 中文简介

botd是用于JavaScript bot检测的浏览器库

## 安装

```sh
npm install @fingerprintjs/botd
```

也可以使用：`pnpm add @fingerprintjs/botd`、`yarn add @fingerprintjs/botd`、`bun add @fingerprintjs/botd`

## README

[![FingerprintJS logo](https://raw.githubusercontent.com/fingerprintjs/botd/dev/resources/logo_dark.svg)](https://fingerprint.com/)

 [![Current NPM version](https://img.shields.io/npm/v/@fingerprintjs/botd.svg)](https://www.npmjs.com/package/@fingerprintjs/botd)[![](https://img.shields.io/:license-mit-blue.svg?style=flat) ](https://opensource.org/licenses/MIT)[![Discord server](https://img.shields.io/discord/852099967190433792?style=logo&label=Discord&logo=Discord&logoColor=white) ](https://discord.gg/39EpE2neBg)[![BotD documentation](https://img.shields.io/badge/-Documentation-green)](https://github.com/fingerprintjs/BotD/blob/main/docs/api.md)

## 瓶装

BotD是一个开放源代码库,我们创建这个库是为了让每个开发者都能很容易地检测到他们的网络应用中的基本bots.

它根据允许的麻省理工学院许可证提供,开发商和商业用途将永远免费.

## \* 维持状况

我们保持开源BotD软件包的健康,并及时作出关键修正并尽快解决回归问题。 尽管如此,近期的行进图仅仅是稳定,所以新特征不太可能很快落地. 请做出相应的规划, 如果你依赖于即将到来的增强.

对于要求更高的应用程序,我们创建了一个基于API的专业机器人检测软件,称为 [指纹 Pro Bot 检测](https://fingerprint.com/products/bot-detection/)。 。 。 .

[查看我们的演示](https://fingerprintjs.github.io/BotD)

## 快开始

### 光盘N

```html
<script>
    // Initialize an agent at application startup, once per page/app.
    const botdPromise = import('https://openfpcdn.io/botd/v2').then((Botd) => Botd.load())
    // Get detection results when you need them.
    botdPromise
        .then((botd) => botd.detect())
        .then((result) => console.log(result))
        .catch((error) => console.error(error))
</script>
```

[运行此代码](https://stackblitz.com/edit/botd-v2-cdn?devtoolsheight=100&file=index.html)

### 国家预防机制

```bash
npm i @fingerprintjs/botd
# or
yarn add @fingerprintjs/botd
```

```js
import { load } from '@fingerprintjs/botd'

// Initialize an agent at application startup, once per page/app.
const botdPromise = load()
// Get detection results when you need them.
botdPromise
    .then((botd) => botd.detect())
    .then((result) => console.log(result))
    .catch((error) => console.error(error))
```

[运行此代码](https://stackblitz.com/edit/botd-v2-npm?devtoolsheight=100&file=index.js)

📕 [完整文档](https://npmcn.com/package/%40fingerprintjs/botd/docs/api.md)

## 升级到指纹 Pro Bot 探测器 以自信地探测出精密的bots.

[指纹 Pro Bot 检测](https://fingerprint.com/products/bot-detection/) 是一个专业的bot检测服务,它处理所有信息服务器侧并使用服务器到服务器的API安全传输到您的服务器.

指紋Pro Bot Detection同时提供浏览器和服务器侧API,使bot探测过程快速而安全. 在使用Pro Bot检测时,使用浏览器JavaScript SDK获取请求ID值,然后使用我们的服务器API验证这一值.

Pro产品结合了大量bots泄露的辅助数据(cursor movement,网络覆盖,浏览器更改等),从而能够可靠地使真实用户从自动化软件中去除,从而检测出流行的自动化工具,其衍生工具和插件.

Pro探测器的一大优点是,它能够区分好bots和坏bots,可以阻止恶意交通,而无需阻挡搜索引擎爬行者,监控工人等.

[![Pro BotD screenshot](https://raw.githubusercontent.com/fingerprintjs/botd/dev/resources/pro_botd_screenshot.png)](https://fingerprint.com/products/bot-detection/)

全面产品比较:

|  | 开源 | 赞成 |
| --- | :-: | :-: |
| 
#### 核心特征

 |
| 100%开源 | 对 | 没有1个 |
| **搜索引擎检测**  
_在所有现代浏览器中工作 - 参见我们的全部列表 [支持浏览器](https://dev.fingerprint.com/docs/browser-support/)_ | – 说吧 – | ✓ |
| 自动化网络服务检测 | – 说吧 – | ✓ |
| 自动化浏览器扩展检测 | – 说吧 – | ✓ |
| 

#### 可探测自动化工具和框架

 |
| 无头浏览器( E)[颜色](https://www.google.com/chrome), (中文(简体) ), [火花](https://www.mozilla.org/en-US/firefox/new/)(中文(简体) ) | ✓ | ✓ |
| **[硒HQ/硒](https://github.com/SeleniumHQ/selenium)**  
_将各种工具和库封装起来,使网页浏览器自动化_ | ✓ | ✓ |
| **[微软/游戏](https://github.com/microsoft/playwright)**  
_节点.js 库将 Chromium, Firefox 和 WebKit 自动化, 并使用单一 API_ | ✓ | ✓ |
| **[ariya/幽灵](https://github.com/ariya/phantomjs)**  
_可用 JavaScript 无头 WebKit 脚本_ | ✓ | ✓ |
| **[部门/噩梦](https://github.com/segmentio/nightmare)**  
_高级浏览器自动化库_ | ✓ | ✓ |
| **[电子/电子](https://github.com/electron/electron)**  
_框架允许您使用 JavaScript 、 HTML 和 CSS 编写跨平台桌面应用程序_ | ✓ | ✓ |
| **[劳伦特克/斯利默日](https://github.com/laurentj/slimerjs)**  
_可脚本浏览器_ | ✓ | ✓ |
| 

#### 可探测隐形插件

 |
| **[贝斯特德/普普特尔-外方/包件/普普特尔-外方-外方](https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth)**  
_用于防止被检测的傀儡-外部插件 ._ | \- 说吧 | ✓ |
| **[微链接/ 无浏览器](https://github.com/microlinkhq/browserless)**  
_用于控制顶部所建无头浏览器的高效驱动程序 [木偶师](https://github.com/puppeteer/puppeteer) 为业绩有重大意义的情景_ | \- 说吧 | ✓ |
| **[超funkamsterdam/未检测到的铬化器](https://github.com/ultrafunkamsterdam/undetected-chromedriver)**  
_优化不会触发反机器人服务的Selenium Chromedriver补丁_ | \- 说吧 | ✓ |
| **[MeiK2333/pyppeteer stealth (英语)](https://github.com/MeiK2333/pyppeteer_stealth)**  
_隐形插件 [便便车](https://github.com/miyakogi/pyppeteer)_ | \- 说吧 | ✓ |
| 

#### 其他特征

 |
| **服务器侧精度提高**  
_基于额外的服务器侧数据,如 TLS 加密支持, ipv4/v6 数据等_ | – 说吧 – | ✓ |
| **查询 API**  
_建立灵活的工作流程_ | – 说吧 – | ✓ |
| 

#### 业务

 |
| **数据安全** | 你的基础设施 | 在休息时加密 |
| **存储** | 你的基础设施 | 1年以下无限制 |
| **区域** | 你的基础设施 | 在美国、欧盟和孟买主办 |
| **遵守情况** | 你的基础设施 | GDPR, 符合CCPA2个 |
| **苏丹解放军** | 无苏丹解放军 | 99.9% 时间 |
| **支助** | GitHub 社区 | 在1个工作日内通过电子邮件、聊天和召回等方式支持小组 |

1\. Pro利用开源BotD库以及专有技术提高精度和结果稳定性.

2\. 指纹Pro作为数据处理器符合GDPR和CCPA要求。 您仍然需要遵守数据控制器, 并使用机器人检测来防止合法权益的欺诈, 或者征求用户同意 .

结果实例:

```js
{
    "bot": {
        "result": "bad"
        "type": "selenium"
    }
}
```

🍿 [现场演示](https://fingerprint.com/products/bot-detection/)

📕 [指纹 Pro 文档](https://dev.fingerprint.com/)

## 从 `v0`

-   [移徙指南](https://npmcn.com/package/%40fingerprintjs/botd/docs/migration/v0_v2.md)
-   [V0文档](https://github.com/fingerprintjs/BotD/tree/v0)

## 从 `v1`

-   [移徙指南](https://npmcn.com/package/%40fingerprintjs/botd/docs/migration/v1_v2.md)
-   [V1文档](https://github.com/fingerprintjs/BotD/tree/v1)

## 支持的浏览器

库支持所有受欢迎的浏览器. 查看更多细节并学习如何在旧浏览器中运行库 [浏览器支持指南](https://npmcn.com/package/%40fingerprintjs/botd/docs/browser_support.md)。 。 。 .

## 在哪里获得支持

多亏了我们 [b系列供资](https://fingerprint.com/blog/series-b/)我们很乐意为我们开源的BotD图书馆提供技术支持。 我们建议使用GitHub [问题](https://github.com/fingerprintjs/BotD/issues) 提交错误或 [讨论情况](https://github.com/fingerprintjs/BotD/discussions) 问问题. 公开使用问题和讨论将有助于开源社区和其他有类似问题的用户. 不过,如果你需要私人支援,请发电子邮件给我们 [oss- support@指印.com](mailto:oss-support@fingerprint.com)。 。 。 .

## 捐款

见 [捐款准则](https://npmcn.com/package/%40fingerprintjs/botd/contributing.md) 学习如何为项目作出贡献或在当地管理项目. 在提出拉力请求前请仔细阅读.

## GitHub上的其他产品!

-   [指印JS - 浏览器指纹库,用于查询浏览器属性并计算浏览器的散列标识符](https://github.com/fingerprintjs/fingerprintjs)
-   [指纹 Android -- 本地应用程序中的Android识别和指纹](https://github.com/fingerprintjs/fingerprintjs-android)
-   [指纹 iOS -- iOS 识别和在本地应用程序中的指纹](https://github.com/fingerprintjs/fingerprintjs-ios)

### 许可证

[麻省理工学院](https://npmcn.com/package/%40fingerprintjs/botd/LICENSE)

2025指纹JS公司

## 常见问题

### @fingerprintjs/botd 是什么？

botd是用于JavaScript bot检测的浏览器库

### 如何安装 @fingerprintjs/botd？

在项目目录运行 npm install @fingerprintjs/botd，或使用 pnpm add / yarn add / bun add。

### @fingerprintjs/botd 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @fingerprintjs/botd 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @fingerprintjs/botd 可以商用吗？

@fingerprintjs/botd 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @fingerprintjs/botd 的下载量有多少？

根据 npm 官方下载统计，@fingerprintjs/botd 在 2026/10/15 – 2026/11/13 这 30 天内被下载 1,593,988 次，日均约 53,133 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @fingerprintjs/botd 还在维护吗？

最新版本 2\.0\.0 发布于 2025/11/04（1 年前）；至今共发布 24 个版本，其中过去 12 个月发布了 0 个；首次发布于 2022/10/20。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

