Live
Free tier included
Capture Screenshots of Any URL
Take pixel-perfect screenshots of any webpage using headless Chrome. Full-page captures, custom viewports, dark mode, delay options — all via a simple API call.
Headless Chrome
Full Page
Dark Mode
PNG / JPEG / WebP
Interactive Playground
Try it Free
Enter any URL and capture a screenshot with custom viewport settings.
Try Free
Result
Enter a URL and click Capture
API Documentation
Capture pixel-perfect screenshots of any URL using headless Chrome. Full-page captures, custom viewports, dark mode, multiple formats. Powered by Puppeteer.
Endpoint
POSThttps://www.mahmoudalhabash.com/api/v1/screenshot
Send a URL with viewport and format options. The API launches headless Chrome, captures the page, and returns a base64-encoded image.
Request Parameters
Response Fields
status "success" or "error"url The URL that was capturedformat Output image formatwidth / height Viewport dimensionssize_bytes / size_human Image file sizetook_ms Total capture time in msimage Base64 data URI of the screenshotCode Examples
cURL
curl -X POST https://www.mahmoudalhabash.com/api/v1/screenshot \
-H "Content-Type: application/json" \
-d '{
"url": "https://github.com",
"width": 1280,
"height": 800,
"format": "png",
"full_page": false
}'
Response 200JSON
{
"status": "success",
"url": "https://github.com",
"format": "png",
"width": 1280,
"height": 800,
"size_bytes": 456789,
"size_human": "446.1 KB",
"took_ms": 3200,
"image": "data:image/png;base64,iVBOR..."
}
Error Codes
422 Validation failed — URL required, invalid dimensions
429 Rate limit exceeded
500 Chrome/Puppeteer failed to capture the page
Rate Limits
Unlimited — Free during beta
Powered by headless Chromium via Puppeteer. Typical capture takes 2-5 seconds. Max viewport 3840×2160.