Skip to content
Scrappa Get API key
Web Scraper API 1 credit/request

Web Scraper Screenshot API Documentation

GET https://scrappa.co/api/web-scraper/screenshot

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.

Web Scraper Screenshot API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/web-scraper/screenshot
Auth header
x-api-key
Cost
1 credit/request
url = https://example.com
Response preview
200 OK
{
    "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
    },
...

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.

url string Required
Open example

Page address.

Example value https://example.com
full_page boolean Optional

true for a full page shot. Default false.

Example value true
width integer Optional

Viewport width, 320-3840. Default 1280.

Example value 10
height integer Optional

Viewport height, 200-4000. Default 800.

Example value 10
format string Optional

jpeg (default) or png.

Example value jpeg
wait_for_selector string Optional

CSS selector to wait for, up to 10 seconds.

Example value example
remove_overlays boolean Optional

true to hide cookie banners and popups.

Example value true
locale string Optional

Browser language, for example en-US or de.

Example value en-US
response string Optional

base64 (JSON, default) or image (raw bytes).

Example value example

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "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.

422

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
}
503

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.