API文档

将我们的截图服务集成到您的应用程序中

API Overview

Base URL
https://scrollingscreenshot.com/api
Authentication
API Key required for paid plans
Rate Limits
20 requests/minute (free), 1000 requests/minute (paid)

Try the API

Test our API directly in your browser. No signup required!

Enter any website URL to capture

Endpoints

POST /api/screenshot

Capture a screenshot with parameters in the request body

Content-Type: application/json
Response: Base64 encoded image or error message
GET /api/screenshot

Capture a screenshot with parameters as query strings

Parameters: URL query string
Response: Base64 encoded image or error message

Parameters

Parameter Type Required Default Description
url string Yes - The URL of the webpage to capture
width number No 1920 Width of the screenshot in pixels (240-8000)
height number No 1080 Height of the screenshot in pixels (240-8000)
fullPage boolean No false Capture the entire page (scrolling screenshot)
darkMode boolean No false Capture in dark mode
format string No png Image format (png, jpeg, webp)
delay number No 1 Delay before capturing in seconds (1-15)
scale number No 1.0 Scale factor (0.1-1.0)

Code Examples

// Using fetch API
const response = await fetch('https://scrollingscreenshot.com/api/screenshot', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    url: 'https://example.com',
    width: 1920,
    height: 1080,
    fullPage: true,
    format: 'png'
  })
});

const data = await response.json();
if (data.success) {
  // Create image element
  const img = document.createElement('img');
  img.src = data.base64;
  document.body.appendChild(img);
}

Response Examples

Success Response

{
  "success": true,
  "base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
  "filename": "example.com_1920x1080.png",
  "url": "blob:https://scrollingscreenshot.com/..."
}

Error Response

{
  "success": false,
  "error": "URL is required",
  "details": "The url parameter is missing or invalid"
}