Reference
Website Screenshot Engine
Overview
Heavstal Screenshot uses a headless Chromium browser to capture high-quality screenshots of websites. It supports full-page captures and mobile device emulation.
> Note: Due to Vercel's IP reputation, some sites (like Cloudflare-protected pages) may block the request.
Endpoint
POST /screenshot
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | Required | The URL to capture. |
| type | string | Optional | 'desktop' (default) or 'mobile'. |
| fullPage | boolean | Optional | Set to `true` to capture the entire scrollable height. |
Example Usage
javascript
const res = await fetch('https://heavstal-tech.vercel.app/api/v1/screenshot', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
url: 'https://example.com',
fullPage: true
})
});Successful Response
Returns a JSON object containing the direct image URL (Base64 or hosted link).
json
{
"status": "success",
"creator": "HEAVSTAL TECH",
"data": {
"title": "Example Domain",
"image": "data:image/png;base64,iVBORw0KGgo..."
}
}