🚀 快速安装
复制以下命令并运行,立即安装此 Skill:
npx skills add https://skills.sh/antibrow/anti-detect-browser-skills/anti-detect-browser
💡 提示:需要 Node.js 和 NPM
反检测浏览器 SDK
通过标准的 Playwright API 启动带有真实设备指纹的 Chromium 实例。每个浏览器都拥有独特、一致的数字身份——使反机器人系统无法检测。
- npm 包:
anti-detect-browser - 控制台:
https://antibrow.com - REST API 基础地址:
https://antibrow.com/api/v1/ - 文档:
https://antibrow.com/docs
适用场景
- 多账号管理 – 在同一台机器上运行数十个社交媒体、电商或广告账号而不被关联。每个浏览器配置文件都有自己的指纹、Cookie 和存储空间。
- 网页爬虫与数据采集 – 在不同抓取会话之间轮换指纹,以避免被检测和指纹-IP关联封禁。
- 广告验证与竞争情报 – 以不同用户身份查看不同地区和设备类型下的广告和内容。
- 社交媒体自动化 – 使用持久化配置管理多个账号,配置信息在浏览器重启后依然保留。
- 电商运营 – 使用完全隔离的浏览器环境运营多个卖家/买家账号。
- AI 智能体浏览器控制 – 作为 MCP 服务器运行,让 AI 智能体(Claude、GPT 等)能够通过工具调用启动、导航和与反检测浏览器交互。
- 质量保证与跨环境测试 – 测试您的网站在不同浏览器指纹、屏幕尺寸和设备配置下的行为表现。
快速开始
npm install anti-detect-browser
import { AntiDetectBrowser } from 'anti-detect-browser'
// 在 https://antibrow.com 获取您的 API 密钥
const ab = new AntiDetectBrowser({ key: 'your-api-key' })
const { browser, page } = await ab.launch({
fingerprint: { tags: ['Windows 10', 'Chrome'] },
profile: 'my-account-01',
proxy: 'http://user:pass@host:port',
})
// 从这里开始使用标准的 Playwright API——零学习成本
await page.goto('https://example.com')
await browser.close()
核心概念
配置文件——持久的浏览器身份
配置文件在多次启动之间保存 Cookie、localStorage 和会话数据。使用相同的配置文件名,下次启动时状态也会相同。
// 第一次启动——全新会话
const { page } = await ab.launch({ profile: 'shop-01' })
await page.goto('https://shop.example.com/login')
// ... 登录 ...
await browser.close()
// 稍后——会话恢复,已自动登录
const { page: p2 } = await ab.launch({ profile: 'shop-01' })
await p2.goto('https://shop.example.com/dashboard') // 无需再次登录
指纹——来自云端的真实设备数据
每次启动都会获取从真实设备采集的指纹。涵盖 30 多个类别(Canvas、WebGL、音频、字体、WebRTC、WebGPU 等),包含 500 多个独立参数。
// Windows Chrome,版本 130+
await ab.launch({
fingerprint: { tags: ['Windows 10', 'Chrome'], minBrowserVersion: 130 },
})
// Mac Safari
await ab.launch({
fingerprint: { tags: ['Apple Mac', 'Safari'] },
})
// 移动端 Android
await ab.launch({
fingerprint: { tags: ['Android', 'Mobile', 'Chrome'] },
})
可用的筛选标签:Microsoft Windows、Apple Mac、Android、Linux、iPad、iPhone、Edge、Chrome、Safari、Firefox、Desktop、Mobile、Windows 7、Windows 8、Windows 10
视觉识别——一眼区分不同窗口
当同时运行多个浏览器时,每个窗口都会有一个浮动标签、标题前缀和独特的主题颜色。
await ab.launch({
profile: 'twitter-main',
label: '@myhandle', // 浮动标签 + 窗口标题
color: '#e74c3c', // 独特的窗口边框颜色
})
代理集成
为每个浏览器设置不同的代理,用于地理定位或 IP 轮换。
await ab.launch({
proxy: 'socks5://user:pass@us-proxy.example.com:1080',
fingerprint: { tags: ['Windows 10', 'Chrome'] },
profile: 'us-account',
})
实时视图——实时监控无头浏览器
在 https://antibrow.com 控制台中监控无头会话。对调试 AI 智能体操作或让团队成员观察很有用。
const { liveView } = await ab.launch({
headless: true,
liveView: true,
})
console.log('观看实时画面:', liveView.viewUrl)
// 分享此 URL——任何有权限的人都能看到浏览器屏幕
注入到现有 Playwright 设置中
已经有 Playwright 脚本了?在不改变工作流程的情况下添加指纹。
import { chromium } from 'playwright'
import { applyFingerprint } from 'anti-detect-browser'
const browser = await chromium.launch()
const context = await browser.newContext()
await applyFingerprint(context, {
key: 'your-api-key',
fingerprint: { tags: ['Windows 10', 'Chrome'] },
profile: 'my-profile',
})
const page = await context.newPage()
await page.goto('https://example.com')
MCP 服务器模式——适用于 AI 智能体
作为 MCP 服务器运行,让 AI 智能体能够通过工具调用启动和控制指纹浏览器。
{
"mcpServers": {
"anti-detect-browser": {
"command": "npx",
"args": ["anti-detect-browser", "--mcp"],
"env": { "ANTI_DETECT_BROWSER_KEY": "your-api-key" }
}
}
}
可用工具:
| 工具 | 功能 |
|---|---|
launch_browser |
启动一个新的指纹浏览器会话 |
close_browser |
关闭一个正在运行的会话 |
navigate |
跳转到指定 URL |
screenshot |
截取当前屏幕 |
click / fill |
与页面元素交互 |
evaluate |
在页面上运行 JavaScript |
get_content |
从页面或特定元素提取文本 |
start_live_view |
将浏览器屏幕流式传输到 https://antibrow.com 控制台 |
stop_live_view |
停止实时流式传输 |
list_sessions |
列出所有正在运行的浏览器实例 |
list_profiles |
列出所有已保存的配置文件 |
工作流示例
多账号社交媒体
const accounts = [
{ profile: 'twitter-1', label: '@brand_main', color: '#1DA1F2' },
{ profile: 'twitter-2', label: '@support', color: '#FF6B35' },
{ profile: 'twitter-3', label: '@personal', color: '#6C5CE7' },
]
for (const acct of accounts) {
const { page } = await ab.launch({
fingerprint: { tags: ['Windows 10', 'Chrome'] },
proxy: getNextProxy(),
...acct,
})
await page.goto('https://twitter.com')
}
带指纹轮换的数据抓取
for (const url of urlsToScrape) {
const { browser, page } = await ab.launch({
fingerprint: { tags: ['Desktop', 'Chrome'], minBrowserVersion: 125 },
proxy: rotateProxy(),
})
await page.goto(url)
const data = await page.evaluate(() => document.body.innerText)
saveData(url, data)
await browser.close()
}
带实时视图的无头监控
const { page, liveView } = await ab.launch({
headless: true,
liveView: true,
profile: 'price-monitor',
fingerprint: { tags: ['Windows 10', 'Chrome'] },
})
// 与您的团队分享实时视图 URL
console.log('控制台:', liveView.viewUrl)
while (true) {
await page.goto('https://shop.example.com/product/123')
const price = await page.textContent('.price')
if (parseFloat(price) < targetPrice) notify(price)
await page.waitForTimeout(60_000)
}
REST API
基础地址:https://antibrow.com/api/v1/ — 所有端点都需要 Authorization: Bearer <api-key> 头部。
指纹
| 方法 | 端点 | 描述 |
|---|---|---|
GET |
/fingerprints/fetch |
获取符合筛选条件的指纹。返回 { dataUrl } — 下载该预签名 URL 以获取完整的指纹数据。 |
GET |
/fingerprints/versions |
列出可用的浏览器版本 |
/fingerprints/fetch 的查询参数:tags、id、minBrowserVersion、maxBrowserVersion、minWidth、maxWidth、minHeight、maxHeight
配置文件
| 方法 | 端点 | 描述 |
|---|---|---|
GET |
/profiles |
列出所有配置文件 |
POST |
/profiles |
创建新的配置文件(服务器会分配一个随机指纹)。返回配置信息,包含用于立即下载指纹数据的 dataUrl。 |
GET |
/profiles/:name |
获取配置详情,包含用于下载指纹数据的 dataUrl |
DELETE |
/profiles/:name |
删除一个配置文件 |
POST /profiles 请求体:
{ "name": "my-profile", "tags": ["Windows 10", "Chrome"] }
POST /profiles 响应 (201):
{
"name": "my-profile",
"tags": ["Windows 10", "Chrome"],
"ua": "Mozilla/5.0 ...",
"browserVersion": 131,
"width": 1920,
"height": 1080,
"createdAt": "2025-01-01T00:00:00.000Z",
"dataUrl": "https://r2.example.com/fingerprints/..."
}
dataUrl 是一个预签名的 R2 URL(有效期 10 分钟),指向完整的指纹 JSON 数据(约 9MB)。直接下载即可——无需额外的 API 调用。
开始使用
- 在
https://antibrow.com注册(免费套餐:2 个浏览器配置文件) - 从控制台获取您的 API 密钥
npm install anti-detect-browser- 启动您的第一个反检测浏览器
完整文档:https://antibrow.com/docs
📄 原始文档
完整文档(英文):
https://skills.sh/antibrow/anti-detect-browser-skills/anti-detect-browser
💡 提示:点击上方链接查看 skills.sh 原始英文文档,方便对照翻译。

评论(0)