MarkUDown

Screenshot API — MarkUDown 网站截图 API 文档

POST/api/screenshot

Screenshot

为任意 URL 截取整页截图,以 base64 编码的 PNG 返回。如果截图显示的是拦截页或空白页而非实际内容,响应中的 blocked 会标明。

参数类型必填默认值描述
urlarray<string>必填—要截图的 URL,以单元素数组传入。
timeoutinteger可选60页面加载超时时间(秒)。

请求

{
  "url": ["https://example.com"],
  "timeout": 60
}

响应

{
  "url": "https://example.com",
  "screenshot": "iVBORw0KGgo...",
  "type": "image/png",
  "engine": "playwright",
  "blocked": false
}

// When the capture is a block page or an empty page:
// "blocked": true, "block_reason": "challenge" | "empty_page"