BMM API

GET /test-url

检测目标 URL 是否可访问,向目标发起 HEAD 请求(模拟 Chrome 浏览器),10s 超时。

参数说明
url 可选完整 URL,如 https://example.com
host 可选域名,自动拼接 https://,如 baidu.com

url 与 host 二选一,优先 url。

// 2xx 成功
{
  "ok": true,
  "status": 200,
  "statusText": "OK"
}

// 非 2xx 响应(服务器有响应,状态码异常)
{
  "ok": false,
  "status": 403,
  "statusText": "Forbidden"
}

// 网络错误(超时、DNS 失败等,无 HTTP 响应)
{
  "ok": false,
  "error": "Timeout"
}

GET /fetch-html

获取目标 URL 的 HTML 内容,向目标发起 GET 请求(模拟 Chrome 浏览器),返回响应体原文。

参数说明
url 必填完整 URL
// 成功:返回 text/plain 原文
<!DOCTYPE html>...

// 缺少参数:400
Missing url parameter

// 请求失败:502
Fetch failed: ...

GET /proxy

代理请求目标 URL,从海外节点获取内容,保留原始响应状态码和 Content-Type。

参数说明
url 必填目标 URL
// 成功:透传目标响应(状态码、Content-Type、响应体均保持原样)
GET /proxy?url=https://api.example.com/data

// 缺少参数:400
Missing url parameter

// 请求失败:502
Proxy failed: ...