screenshot
Capture high-quality screenshots in multiple formats (PNG/JPEG/WebP) with viewport control and full-page capture. Perfect for visual regression testing, page monitoring, documentation, and social media previews.
Use Cases
Visual Regression Testing
Compare screenshots over time to detect UI changes and visual bugs
Page Monitoring
Monitor website changes by capturing periodic screenshots for comparison
Documentation
Create visual documentation and tutorials with webpage screenshots
Social Media Previews
Generate Open Graph images and social media preview cards
Quality Assurance
Verify page rendering across different viewport sizes and devices
Archival
Archive webpage appearances for legal, compliance, or historical purposes
Endpoint
/api/v1/tools/screenshot
Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
url | string | Required | - | The URL of the webpage to screenshot Example: https://example.com |
format | string | Optional | png | Image format: "png", "jpeg", or "webp" Example: png |
viewport | object | Optional | - | Browser viewport dimensions Example: {"width": 1920, "height": 1080} |
fullPage | boolean | Optional | false | Capture the full page height (not just viewport) Example: true |
selector | string | Optional | - | CSS selector of specific element to screenshot Example: #main-content |
quality | number | Optional | 80 | Image quality 0-100 (JPEG/WebP only, PNG always lossless) Example: 90 |
Request Examples
Response Example
{ "success": true, "data": { "screenshot": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA...", "format": "png", "dimensions": { "width": 1920, "height": 3540 }, "fileSize": 1245678, "url": "https://example.com", "capturedAt": "2024-01-15T14:30:22Z" }, "credits_used": 2, "credits_remaining": 998, "processing_time": 2150}
data.screenshot
Base64-encoded screenshot (data URI format, ready for <img> tag)data.format
Image format used (png, jpeg, or webp)data.dimensions
Screenshot dimensions in pixelsdata.fileSize
File size in bytesdata.capturedAt
Timestamp when screenshot was captured (ISO 8601)credits_used
Credits deducted for this request (2 per screenshot)processing_time
Time to capture screenshot in millisecondsError Handling
Invalid URL (400 Bad Request)
The URL format is invalid. Ensure it includes the protocol (http:// or https://)
Invalid Format (400 Bad Request)
Format must be one of: png, jpeg, or webp
Element Not Found (404 Not Found)
The CSS selector didn't match any element on the page. Verify the selector is correct.
Insufficient Credits (402 Payment Required)
Your account doesn't have enough credits (need 2). Purchase more credits or upgrade your plan.
Rate Limit Exceeded (429 Too Many Requests)
You've exceeded your plan's rate limit. Wait a moment or upgrade your plan for higher limits.
Credit Cost
Free Plan: 1,000 credits/month = 500 screenshots
Hobby Plan: 5,000 credits/month = 2,500 screenshots ($19/mo)
Professional Plan: 50,000 credits/month = 25,000 screenshots ($99/mo)
Business Plan: 250,000 credits/month = 125,000 screenshots ($399/mo)