Capture a screenshot of a website

Takes a screenshot of any URL and returns it as a binary image or JSON with base64 data URI. Set response_type=json for AI agent integrations. Supports device emulation, dark mode, ad blocking, cookie banner removal, and caching.

get/v1/screenshot

Request

  • Base URL: https://app.snap-render.com
  • URL: https://app.snap-render.com/v1/screenshot
  • Auth: API key in header X-API-Key

Query parameters

urlstring uri required

The URL to capture (must be http or https)

format'png' | 'jpeg' | 'webp' | 'pdf'

Output image format. Use png for lossless quality, jpeg/webp for smaller files, pdf for documents.

widthinteger

Viewport width in pixels (320-3840)

heightinteger

Viewport height in pixels (200-10000)

full_page'true' | 'false'

Capture the entire scrollable page instead of just the viewport

qualityinteger

Image quality for JPEG and WebP (1-100). Ignored for PNG and PDF.

delayinteger

Milliseconds to wait after page load before capturing. Useful for pages with animations or lazy-loaded content.

dark_mode'true' | 'false'

Emulate prefers-color-scheme: dark CSS media feature

block_ads'true' | 'false'

Block advertisements and trackers for cleaner screenshots

block_cookie_banners'true' | 'false'

Remove cookie consent banners and GDPR overlays

device'iphone_14' | 'iphone_15_pro' | 'pixel_7' | 'ipad_pro' | 'macbook_pro'

Device preset for mobile/tablet emulation. Sets viewport size, user agent, and device scale factor.

hide_selectorsstring

Comma-separated CSS selectors to hide before capturing (e.g., '.banner,.popup')

click_selectorstring

CSS selector to click before capturing (e.g., to dismiss a modal or expand content)

user_agentstring

Custom user agent string to use for the request

cache'true' | 'false'

Return cached result if available. OFF by default: set true to enable caching. Cached hits are free but may be up to 24h old.

cache_ttlinteger

Cache lifetime in seconds (default 24h). Cached screenshots older than this are recaptured. Max depends on plan.

response_type'binary' | 'json'

Response format. 'binary' returns raw image bytes with Content-Type header (default). 'json' returns a JSON object with a base64 data URI in the 'image' field — recommended for AI agents, ChatGPT Actions, and programmatic integrations.

Response

Screenshot captured successfully

urlstring

The captured URL

formatstring

Image format used

widthinteger

Viewport width

heightinteger

Viewport height

imagestring

Base64 data URI of the screenshot (e.g., data:image/png;base64,...)

sizeinteger

Image size in bytes

cache'HIT' | 'MISS'

Cache status

responseTimestring

Render time (e.g., '1234ms')

remainingCreditsinteger

Remaining screenshots this billing period

Changes

No recorded changes to this operation across all 1 revision of this API.