# Web Scraper Screenshot API Documentation

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.

- **Documentation:** [https://scrappa.co/docs/web-scraper-api/web_scraper_screenshot](https://scrappa.co/docs/web-scraper-api/web_scraper_screenshot)
- **API group:** Web Scraper API
- **Endpoint:** `GET https://scrappa.co/api/web-scraper/screenshot`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | Yes | Page address. |
| `full_page` | boolean | No | true for a full page shot. Default false. |
| `width` | integer | No | Viewport width, 320-3840. Default 1280. |
| `height` | integer | No | Viewport height, 200-4000. Default 800. |
| `format` | string | No | jpeg (default) or png. |
| `wait_for_selector` | string | No | CSS selector to wait for, up to 10 seconds. |
| `remove_overlays` | boolean | No | true to hide cookie banners and popups. |
| `locale` | string | No | Browser language, for example en-US or de. |
| `response` | string | No | base64 (JSON, default) or image (raw bytes). |

## Example response

```json
{
    "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

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid, or the url points to a private, local or non-public address. Not charged. |
| 503 | Site Unreachable Or Blocked | The site could not be fetched after several tries, or it blocked the request. Not charged. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
