API 文档
通过 API 接口实现自动化操作,将比特浏览器集成到您的工作流程中
快速示例
使用 Python 启动浏览器配置
import requests
# API 配置
API_URL = "http://127.0.0.1:54345"
API_KEY = "your_api_key"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
# 启动浏览器配置
def start_browser(profile_id):
response = requests.post(
f"{API_URL}/browser/start",
headers=headers,
json={"profileId": profile_id}
)
return response.json()
# 获取调试地址用于 Selenium/Puppeteer
result = start_browser("your_profile_id")
debug_port = result["data"]["debugPort"]
print(f"浏览器已启动,调试端口: {debug_port}")