Take a screenshot
Endpoints
GET /screenshot
Capture a webpage screenshot and get a public URL to the image. Costs 2 credits.
GET
Take a screenshot
Overview
/screenshot opens a URL in a headless Chrome browser and captures a screenshot. The image is stored in cloud storage and a public URL is returned. You can configure:
- Viewport size — width and height of the browser window
- Full page — capture the entire scrollable content instead of just the viewport
- Format — JPEG (smaller), PNG (lossless), or WebP (best compression)
Example requests
Example response
Format comparison
| Format | Best for | Notes |
|---|---|---|
jpeg | General use, thumbnails | Smallest file size, lossy compression |
png | Logos, UI elements, transparency | Lossless, larger files |
webp | Web display | Best compression-to-quality ratio |
Parameter limits
| Parameter | Default | Min | Max |
|---|---|---|---|
width | 1440 | 320 | 5000 |
height | 900 | 320 | 5000 |
format | jpeg | — | — |
full_page | false | — | — |
Authorizations
Your Prefetch API key. Obtain one from the dashboard.
Query Parameters
The website URL to process. https:// is prepended automatically if no protocol is provided.
Example:
"https://stripe.com"
Viewport width in pixels. Range: 320–2560. Default: 1440.
Required range:
320 <= x <= 2560Viewport height in pixels. Range: 240–5000. Default: 900.
Required range:
240 <= x <= 5000Image format. Default: jpeg.
Available options:
jpeg, png, webp Capture full scrollable page height. Default: false.