Menu
Docs/Screenshot API

Screenshot API

Capture a screenshot of any URL with a simple GET or POST request.

GET/v1/screenshot
POST/v1/screenshot

Use GET for simple requests. Use POST when you have long URLs, complex headers, or JSON cookies.

Parameters

ParameterTypeDefaultDescription
url*stringThe URL to screenshot. Must be http:// or https://. Bare domains (e.g. example.com) are auto-prefixed with https://.
widthnumber1280Viewport width in pixels. Min 100, max 3840.
heightnumber720Viewport height in pixels. Min 100, max 2160.
formatenumpngOutput format: png, jpeg, or webp. WebP requires Starter+ plan.
qualitynumber80Compression quality for jpeg/webp. 1–100.
full_pagebooleanfalseCapture full scrollable page height. Starter+ plan.
retinabooleanfalseUse 2× device pixel ratio (HiDPI). Starter+ plan.
delaynumber0Wait N milliseconds after page load before capture. Max 10000.
wait_forstringCSS selector to wait for before capture.
wait_untilenumnetworkidleWhen to consider page loaded: load, domcontentloaded, networkidle.
dark_modebooleanfalseEmulate prefers-color-scheme: dark.
block_adsbooleanfalseBlock known ad networks, cookie banners, trackers. Starter+ plan.
devicestringDevice preset name (e.g. 'iPhone 14', 'Pixel 7'). See presets table below.
cssstringCustom CSS to inject before capture. Starter+ plan.
jsstringJavaScript to execute before capture. Growth+ plan.
hide_selectorsstringComma-separated CSS selectors to hide (display: none).
clickstringCSS selector to click before capture.
clipstringJSON: {x, y, width, height} — capture specific region.
headersstringJSON object of extra HTTP headers to send with the page request.
cookiesstringJSON array of cookies to set before loading.
user_agentstringOverride the User-Agent header.
cachebooleantrueUse Redis cache for this request.
cache_ttlnumber3600Cache TTL in seconds. Max 86400 (24h).
bypass_cspbooleanfalseDisable Content Security Policy for the page. Useful when the target page blocks cross-origin resources.
stealthbooleanfalseBypass bot detection fingerprinting. Patches navigator.webdriver, plugins, WebGL, and more. Growth+ plan.
proxystringRoute the request through a proxy. Format: http://user:pass@host:port or socks5://host:port. Growth+ plan.

Plan requirements

Some parameters require a paid plan:

FeatureMin. planFree plan behavior
format: webpStarterReturns 403 plan_required
full_pageStarterReturns 403 plan_required
retinaStarterReturns 403 plan_required
block_adsStarterReturns 403 plan_required
css injectionStarterReturns 403 plan_required
js injectionGrowthReturns 403 plan_required
stealthGrowthReturns 403 plan_required
proxyGrowthReturns 403 plan_required

Free plan screenshots include a small SnapSharp watermark. Upgrade to Starter to remove it. View plans →

Response

On success, returns a binary image with the appropriate Content-Type header.

Response headers:

Content-Type: image/png
X-Request-Id: 550e8400-e29b-41d4-a716-446655440000
X-Response-Time: 1247
X-Cache: MISS
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 27

Device presets

The device parameter accepts these built-in presets:

DeviceWidthHeightDPR
iPhone 143908443
iPhone 14 Pro3938523
iPhone 15 Pro Max4309323
Pixel 74129152.625
Galaxy S233607803
iPad Pro 12.9102413662
MacBook Pro 1415129822
Desktop 1080p192010801
Desktop 1440p256014401

Examples

Full-page dark mode screenshot:

curl "https://api.snapsharp.dev/v1/screenshot\
?url=https://github.com\
&full_page=true\
&dark_mode=true\
&format=jpeg&quality=85" \
  -H "Authorization: Bearer sk_live_..." \
  -o github-dark.jpeg

Mobile screenshot with device preset:

curl "https://api.snapsharp.dev/v1/screenshot\
?url=https://twitter.com\
&device=iPhone+14" \
  -H "Authorization: Bearer sk_live_..." \
  -o twitter-mobile.png

POST with cookies (for authenticated pages):

curl -X POST "https://api.snapsharp.dev/v1/screenshot" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://app.example.com/dashboard",
    "cookies": [{"name": "session", "value": "abc123", "domain": "app.example.com"}],
    "width": 1440
  }' -o dashboard.png
Try in Playground →

Stealth Mode

Some websites detect and block headless browsers. Enable stealth mode to bypass basic bot detection:

curl "https://api.snapsharp.dev/v1/screenshot?url=https://protected-site.com&stealth=true" \
  -H "Authorization: Bearer YOUR_KEY" \
  -o screenshot.png

Stealth mode patches common fingerprint markers used by bot detectors:

PatchWhat it fixes
navigator.webdriverRemoved (normally true in headless Chrome)
window.chromeFaked with realistic runtime object
navigator.pluginsNon-empty list (headless has 0 plugins)
navigator.languagesSet to ['en-US', 'en']
permissions.queryReturns default for notifications
WebGL vendor/rendererSpoofed to Intel GPU strings

Bypasses ~70% of bot detectors including basic Cloudflare, DataDome, and fingerprint.js checks.

Stealth mode does not bypass IP-based blocking (WAF, geo-restrictions). For that, combine with the proxy parameter. Available on Growth plan and above.

Proxy

Route your screenshot request through a proxy server. Useful for accessing geo-restricted content, bypassing IP-based rate limits on target sites, or capturing region-specific versions of websites.

curl "https://api.snapsharp.dev/v1/screenshot\
  ?url=https://geo-restricted-site.com\
  &proxy=socks5://user:pass@proxy.example.com:1080" \
  -H "Authorization: Bearer YOUR_KEY" \
  -o screenshot.png

Supported protocols: http://, https://, socks5://.

Bring Your Own Proxy. SnapSharp does not provide proxy servers. Use services like:

Combine proxy with stealth=true for maximum bypass capability. Available on Growth plan and above.