---
title: "Screenshot a URL or HTML"
method: GET
path: "/v1/screenshot"
---

# Screenshot a URL or HTML

`GET /v1/screenshot`

## Request

- Base URL: `https://shotlane.dev`
- URL: `https://shotlane.dev/v1/screenshot`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in query parameter `access_key`

## Query parameters

- `format` 'png' | 'jpeg' | 'webp' | 'avif' | 'pdf' | 'mhtml'
- `url` string
- `html` string
- `markdown` string
- `proxy` string
- `width` integer
- `height` integer
- `full_page` boolean
- `scale` number
- `selector` string
- `dark_mode` boolean
- `hide_cookie_banners` boolean
- `block_ads` boolean
- `delay` integer
- `wait_until` 'load' | 'domcontentloaded' | 'networkidle'
- `quality` integer
- `cache_ttl` integer
- `response_type` 'file' | 'json'
- `storage_bucket` string
- `storage_key` string
- `storage_endpoint` string
- `storage_region` string
- `storage_access_key_id` string
- `storage_secret_access_key` string
- `storage_acl` 'private' | 'public-read'
- `device` 'desktop' | 'desktop_hd' | 'laptop' | 'ipad' | 'iphone' | 'iphone_se' | 'pixel' | 'galaxy'
- `css` string
- `js` string
- `hide_selectors` string
- `click` string
- `wait_for_selector` string
- `headers` string
- `cookies` string
- `timezone` string
- `locale` string
- `latitude` number
- `longitude` number
- `reduced_motion` boolean
- `media_type` 'screen' | 'print'
- `disable_js` boolean
- `hide_popups` boolean
- `block_trackers` boolean
- `block_chats` boolean
- `block_requests` string
- `block_resources` string
- `hover` string
- `scroll_into_view` string
- `wait_to_leave` string
- `basic_auth` string
- `timeout` integer
- `fail_on_status` boolean
- `fail_if_content_contains` string
- `clip_x` integer
- `clip_y` integer
- `clip_width` integer
- `clip_height` integer
- `image_width` integer
- `image_height` integer
- `image_fit` 'cover' | 'contain' | 'fill'

## Response `200`

Rendered file

## Other responses

- `400`: Invalid parameters
- `401`: Invalid API key
- `402`: Out of credits
- `422`: Page could not be rendered

---

[API](https://skmtc.dev/shotlane/apis/shotlane-api.md) · [All operations](https://skmtc.dev/shotlane/apis/shotlane-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shotlane/apis/shotlane-api/revisions/ce3f76e12e11?raw)
