← 返回 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 放进公开代码。
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
requestId | string | 必填 | 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 |
target | string | 必填 | 最短 1 字符;最长 2048 字符 例如: https://example.com |
group | china | oversea | 必填 | 默认 china 例如: china |
返回字段与完整结构
| 字段 | 类型 | 必返 | 说明 |
|---|---|---|---|
taskId | string | 是 | 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)$ |
state | processing | ready | succeeded | failed | expired | 是 | — |
expiresAt | string | 是 | 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))$ |
retryAfterSeconds | integer | 是 | 最小 0;最大 9007199254740991 |
statusUrl | string | 是 | uri |
resultUrl | string | 是 | uri |
errorCode | string | 否 | — |
{
"$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 | 错误码 | 含义与处理 |
|---|