Screenshot
POST /v1/screenshot turns a URL or HTML into a PNG, JPEG or WebP image of the viewport, the full page or one element.
POST https://rendersbolt.com/v1/screenshot
GET https://rendersbolt.com/v1/screenshot?url=...&access_key=...
Returns the image itself with a Content-Type of image/png, image/jpeg or image/webp. Send either url or html.
Example#
curl https://rendersbolt.com/v1/screenshot \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://stripe.com","format":"webp","full_page":true,"block_ads":true,"block_cookie_banners":true}' \
-o stripe.webp
const res = await fetch('https://rendersbolt.com/v1/screenshot', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.API_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ url: 'https://stripe.com', format: 'webp', full_page: true, block_ads: true, block_cookie_banners: true }),
});
const image = Buffer.from(await res.arrayBuffer());
r = requests.post(
"https://rendersbolt.com/v1/screenshot",
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
json={"url": "https://stripe.com", "format": "webp", "full_page": True, "block_ads": True, "block_cookie_banners": True},
)
image = r.content
Parameters#
These are specific to screenshots. Every common option works too: viewport, waiting, blocking, CSS, locale, timeout and cache.
| Parameter | Default | Description |
|---|---|---|
url or html |
The page to capture. html can be up to 5 MB. |
|
format |
png |
png, jpeg (or jpg) or webp |
quality |
80 |
1–100, for jpeg and webp |
full_page |
false |
Capture the whole page. The page is scrolled first so lazy images load. Height is capped at 16,000 px. |
selector |
CSS selector. Capture only the first matching element. | |
omit_background |
false |
Transparent background where the page has none (png only) |
dark_mode |
false |
Sets prefers-color-scheme: dark |
device_scale_factor |
1 |
0.5–3. Use 2 for sharp images on high-density screens. |
response_type |
binary |
binary, url (JSON with a link valid for 24 hours) or base64 (JSON with the image as base64) |
Responses#
With the default response_type, the body is the image. With url or base64 you get JSON:
{
"url": "https://rendersbolt.com/v1/files/....webp",
"expires_at": "2026-10-30T09:12:44.000Z",
"content_type": "image/webp",
"size": 183021,
"width": 1920,
"height": 6412,
"target_status": 200,
"render_ms": 1840
}
base64 returns data instead of url and expires_at. See Responses and headers for the headers on every response.
Good to know#
- Animations and transitions are stopped and the text caret is hidden before the capture.
- Web fonts are loaded before the capture.
- If
selectormatches nothing, you get422 SELECTOR_NOT_FOUNDand the render is not counted. - Pages with an interactive bot challenge can't be captured.
Related guide: Social images and link previews.
Stuck? Write to [email protected] with the request you sent and the error code you got back.