Scrappa's GET /api/web-scraper/screenshot opens a public page in a real browser and returns an image.
Options
full_page=true captures the whole page (height is capped at 12000 px). width and height set the viewport. format is jpeg (default, smaller) or png. wait_for_selector waits up to 10 seconds for a CSS selector. remove_overlays=true hides cookie banners and popups. locale sets the browser language, for example de or en-US.
Output
response=base64 (default) returns JSON with image_base64, mime_type, title, final_url and the site status. response=image returns the raw image with its image content type.
Credits
5 credits per successful screenshot. A page that blocks the browser answers 503 and costs nothing.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
1 required parameter needed before sending a request.
8 optional filters available.
boolean
Optional
true for a full page shot. Default false.
true
integer
Optional
Viewport width, 320-3840. Default 1280.
10
integer
Optional
Viewport height, 200-4000. Default 800.
10
string
Optional
jpeg (default) or png.
jpeg
string
Optional
CSS selector to wait for, up to 10 seconds.
example
boolean
Optional
true to hide cookie banners and popups.
true
string
Optional
Browser language, for example en-US or de.
en-US
string
Optional
base64 (JSON, default) or image (raw bytes).
example
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"data": {
"url": "https://example.com",
"bytes": 48210,
"title": "Example Domain",
"width": 1280,
"format": "jpeg",
"height": 800,
"final_url": "https://example.com/",
"full_page": false,
"mime_type": "image/jpeg",
"image_base64": "/9j/4AAQSkZJRg...",
"site_status_code": 200
},
"meta": {
"tries": 1,
"credits": 5
},
"success": true
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
A parameter is missing or invalid, or the url points to a private, local or non-public address. Not charged.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The request validation failed"
},
"success": false
}Site Unreachable Or Blocked
The site could not be fetched after several tries, or it blocked the request. Not charged.
{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The site could not be reached. Please retry shortly."
},
"success": false
}Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Try It Live
Test this endpoint in our interactive playground with real data.