360 Secure SkillHub
360 安全技能中心

Website Capture - AllScreenshots

调用 Allscreenshots 云端截图 API,按 URL 生成桌面或移动端整页/视口截图,支持暗色模式、广告与 Cookie 弹窗拦截、反检测模式和 PDF 导出,可返回图片字节、base64 或 CDN 链接。需配置 API 密钥并用 curl/jq 调用。

panilya
panilya
热度 56.84
最近更新 2026-05-11 17:31:05
分类:效率依赖:代码执行 / 第三方 API应用场景:文件转换 / 工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add website-capture
Metadata
name
allscreenshots
description
Take website screenshots, capture full pages, generate PDFs. Handles desktop, mobile, dark mode, stealth mode, cookie banner blocking, and batch URLs via the Allscreenshots cloud API.
version
1.0.0
metadata
{"openclaw":{"emoji":"📸","requires":{"bins":["curl","jq"],"env":["ALLSCREENSHOTS_API_KEY"]},"primaryEnv":"ALLSCREENSHOTS_API_KEY"}}

Allscreenshots – Website Screenshot Capture

Capture pixel-perfect website screenshots via the Allscreenshots cloud API. No local browser needed.

Setup

  1. Get an API key at https://dashboard.allscreenshots.com
  2. Add to ~/.openclaw/workspace/.env:
    ALLSCREENSHOTS_API_KEY=your_api_key_here
    

API Base

Endpoint: https://api.allscreenshots.com/v1/screenshots Auth header: Bearer $ALLSCREENSHOTS_API_KEY

Operations

Desktop screenshot (default)

curl -s -X POST \
  -H "Authorization: Bearer $ALLSCREENSHOTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"TARGET_URL","fullPage":true,"viewport":{"width":1280,"height":800},"blockAds":true,"blockCookieBanners":true,"stealth":true,"responseType":"url"}' \
  "https://api.allscreenshots.com/v1/screenshots" | jq

Mobile screenshot

curl -s -X POST \
  -H "Authorization: Bearer $ALLSCREENSHOTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"TARGET_URL","fullPage":true,"viewport":{"width":375,"height":812},"deviceScaleFactor":3,"blockAds":true,"blockCookieBanners":true,"stealth":true,"responseType":"url"}' \
  "https://api.allscreenshots.com/v1/screenshots" | jq

Dark mode

Add "darkMode": true to any request body above.

PDF export

Add "format": "pdf" to any request body above.

Viewport-only screenshot

Set "fullPage": false to capture only the visible viewport.

Parameter Reference

  • fullPage: true captures the entire scrollable page
  • blockAds: true removes ads and trackers
  • blockCookieBanners: true hides cookie consent popups
  • stealth: true uses anti-detection mode for bot-protected sites
  • darkMode: true injects prefers-color-scheme: dark
  • format: "pdf" returns a PDF instead of PNG
  • responseType: controls what the API returns
    • "binary" (default) – raw image bytes
    • "base64" – JSON with base64-encoded image data
    • "url" – JSON with a CDN link to the stored image

Response

When responseType is "url" (recommended for OpenClaw):

{ "storageUrl": "https://storage.allscreenshots.com/abc.png" }

Send the storageUrl back to the user as an image.

When responseType is "binary" (default): Raw image bytes. Pipe to a file with curl -o output.png.

When responseType is "base64":

{ "data": "iVBORw0KGgo..." }

Base64 payload, useful for embedding in HTML or emails.