Screenshots & Actions
Screenshots
Capture PNG or JPEG screenshots of a page, full-page or viewport.
The screenshot action captures an image of the page. The simplest form is the screenshot: true shorthand, which
navigates to the URL and captures a default screenshot.
curl https://request.usestring.ai/v1/fetch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com", "screenshot": true }'Options
For more control, use a screenshot action inside an actions array:
| Option | Type | Description |
|---|---|---|
full_page | boolean | Capture the entire scrollable page instead of just the viewport. |
quality | integer (1–100) | Compression quality for the captured image. |
{
"url": "https://example.com",
"actions": [{ "type": "screenshot", "full_page": true, "quality": 80 }]
}At most one screenshot action is allowed per request.
Response
The screenshot is returned as base64 in the JSON body, alongside the final page HTML:
{
"finalUrl": "https://example.com",
"data": "<!doctype html>…",
"screenshot": {
"format": "png",
"base64": "iVBORw0KGgoAAAANSUhEUgAA…"
}
}Decode screenshot.base64 to get the image bytes. format is png or jpeg.
Need to interact first?
Combine the screenshot with other browser actions — for example dismiss a cookie
banner or expand a section — and place the screenshot action last to capture the result.