Screenshot Platform

介绍

Screenshot Platform 提供与 ScreenshotOne 兼容的网页截图 API,通过平台边缘网关快速集成。

产品简介

Screenshot Platform 让你用一次 HTTP 请求获取任意网页的像素级截图。传入 URL,返回 PNG、JPEG、WebP 等格式图像,适用于 OG 图、缩略图、归档与可视化回归等场景。

核心能力:

  • ScreenshotOne 兼容 — 参数与认证方式对齐主流截图 API
  • 边缘网关 — 统一入口 https://api.1diff.shop,鉴权、限流与配额在平台层完成
  • Playground — 登录后在控制台可视化调试参数并分享链接

完整参数列表见 截图 API。管理类接口需登录会话,见 API 密钥

快速开始

注册并创建 API Key

控制台 创建密钥。完整密钥仅在创建时显示一次,请妥善保存。

发起第一次截图

curl "http://localhost:3200/take?url=https://example.com&access_key=YOUR_KEY" -o screenshot.png
const base = process.env.PLATFORM_API_URL ?? 'http://localhost:3200';
const res = await fetch(
  `${base}/take?url=${encodeURIComponent('https://example.com')}`,
  { headers: { Authorization: 'Bearer YOUR_KEY' } },
);
const buffer = await res.arrayBuffer();
import requests

resp = requests.get(
    'http://localhost:3200/take',
    params={'url': 'https://example.com', 'access_key': 'YOUR_KEY'},
)
with open('screenshot.png', 'wb') as f:
    f.write(resp.content)

下一步

On this page