跳到主要内容
← 返回 API 目录

网站测速

网站

网站诊断与 IP 查询,支持异步任务与幂等重试。

POST https://api.wanmi.net/open/v1/website-speed

每天 10 次免费,超出 ¥0.15/次 · 同一账号多个 key 共用

用多少付多少。云工具 API 无免费次数,创建时预留余额,成功交付才结算(异步 PDF 在领取时结算);失败释放或补偿。主动开通按量付费后,免费次数用完按接口单价从钱包扣费;余额不足或每日扣费上限已到时拒绝,不欠费。仅成功交付收费,符合接口契约的降级成功照常收费;失败和未交付不收费。每次扣费及补偿可在控制台账单查看,单价以各接口当前配置及调用准入快照为准。

每客户每接口每日免费 10 次,国内/海外及 HTTP/MCP 共用。缓存完整成功计次;失败不扣费。首次领取完整结果时结算,重复领取不重复扣费。请按 retryAfterSeconds 轮询。

返回示例

"完整结果或任务状态"

任务创建示例

云工具按次收费。请在服务器提交任务,并按接口规范上传文件或领取结果。

{
  "requestId": "019a8b20-0000-7000-8000-000000000001",
  "target": "https://example.com",
  "group": "china"
}
查看完整接口规范与任务流程

代码示例

curl --max-time 125 -X POST 'https://api.wanmi.net/open/v1/website-speed' \
  -H "Authorization: Bearer $WANMI_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{"requestId":"019a8b20-0000-7000-8000-000000000001","target":"https://example.com","group":"china"}'

将 WANMI_API_KEY 设为环境变量。请在自己的服务器中运行,勿将 key 放进公开代码。

请求参数

参数类型必填说明
requestIdstring必填UUIDv7 generated within the last 24 hours; at most 5 minutes in the future. Reuse for retries across HTTP and MCP. Old missing receipts return 410, never execute again.;uuid;格式 ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
例如:019a8b20-0000-7000-8000-000000000001
targetstring必填最短 1 字符;最长 2048 字符
例如:https://example.com
groupchina | oversea必填默认 china
例如:china
返回字段与完整结构
字段类型必返说明
taskIdstring是uuid;格式 ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
stateprocessing | ready | succeeded | failed | expired是—
expiresAtstring是date-time;格式 ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
retryAfterSecondsinteger是最小 0;最大 9007199254740991
statusUrlstring是uri
resultUrlstring是uri
errorCodestring否—
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "taskId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "state": {
      "type": "string",
      "enum": [
        "processing",
        "ready",
        "succeeded",
        "failed",
        "expired"
      ]
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    },
    "retryAfterSeconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "statusUrl": {
      "type": "string",
      "format": "uri"
    },
    "resultUrl": {
      "type": "string",
      "format": "uri"
    },
    "errorCode": {
      "type": "string"
    }
  },
  "required": [
    "taskId",
    "state",
    "expiresAt",
    "retryAfterSeconds",
    "statusUrl",
    "resultUrl"
  ],
  "additionalProperties": false
}

错误码

HTTP错误码含义与处理