Capture Screenshot Online

Website Screenshot API

生成网站截图

GET /api/screenshot

请求参数

参数 类型 必需 默认值 说明
url string - 要截图的网站 URL
format string webp 图片格式 (webp, png)
width number 1920 视窗宽度 (100-3840)
height number 1080 视窗高度 (100-2160)

使用示例

基础 Website Screenshot

GET /api/screenshot?url=https://example.com

自定义格式和尺寸

GET /api/screenshot?url=https://example.com&format=png&width=1920&height=1080

JavaScript 调用 Screenshot API

// 使用 API 捕获网站截图
const response = await fetch(
  'https://screenshotsnap.com/api/screenshot?url=https://example.com&format=webp'
);
const imageBlob = await response.blob();

// 显示网站截图
const img = document.createElement('img');
img.src = URL.createObjectURL(imageBlob);
document.body.appendChild(img);
                    

核心特性

高性能架构

全球边缘计算,website screenshot generator 响应速度快,稳定可靠

智能缓存系统

R2 存储桶缓存,支持 7 天缓存,大幅提升 screenshot API 访问速度

多格式支持

支持 WebP 和 PNG 格式,灵活满足各种 website screenshot 需求

自定义尺寸

支持自定义视窗宽度和高度,capture screenshot online 更灵活