Skip to main content

Screenshot

Base URL: https://drain.lat/api/v1/screenshot
Take a screenshot of any public webpage and return it as a PNG image.
GET /api/v1/screenshot
url
string
required
The full URL to screenshot. Must start with https://.
width
number
Viewport width in pixels. Max 2560. Default 1440.
height
number
Viewport height in pixels. Max 1440. Default 900.
fullPage
boolean
Capture the full scrollable page instead of just the viewport. Default false.
format
string
Output format. png or jpeg. JPEG is faster and smaller. Default png.
curl "https://drain.lat/api/v1/screenshot?url=https://github.com" \
  -H "x-api-key: YOUR_API_KEY" \
  --output screenshot.png
Returns a raw image binary. Content type is image/png or image/jpeg depending on the format param.
Content-Type: image/png
Content-Type: image/jpeg
Examples
# Default (1440x900, PNG)
GET /api/v1/screenshot?url=https://example.com

# Full HD JPEG (faster)
GET /api/v1/screenshot?url=https://example.com&width=1920&height=1080&format=jpeg

# Full page
GET /api/v1/screenshot?url=https://example.com&fullPage=true

# Max resolution
GET /api/v1/screenshot?url=https://example.com&width=2560&height=1440
Requests to localhost, 127.0.0.1, and private IP ranges are blocked. Only public URLs are supported.