Screenshot API
Capture a screenshot of any URL with a simple GET or POST request.
/v1/screenshot/v1/screenshotUse GET for simple requests. Use POST when you have long URLs, complex headers, or JSON cookies.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
url* | string | — | The URL to screenshot. Must be http:// or https://. Bare domains (e.g. example.com) are auto-prefixed with https://. |
width | number | 1280 | Viewport width in pixels. Min 100, max 3840. |
height | number | 720 | Viewport height in pixels. Min 100, max 2160. |
format | enum | png | Output format: png, jpeg, or webp. WebP requires Starter+ plan. |
quality | number | 80 | Compression quality for jpeg/webp. 1–100. |
full_page | boolean | false | Capture full scrollable page height. Starter+ plan. |
retina | boolean | false | Use 2× device pixel ratio (HiDPI). Starter+ plan. |
delay | number | 0 | Wait N milliseconds after page load before capture. Max 10000. |
wait_for | string | — | CSS selector to wait for before capture. |
wait_until | enum | networkidle | When to consider page loaded: load, domcontentloaded, networkidle. |
dark_mode | boolean | false | Emulate prefers-color-scheme: dark. |
block_ads | boolean | false | Block known ad networks, cookie banners, trackers. Starter+ plan. |
device | string | — | Device preset name (e.g. 'iPhone 14', 'Pixel 7'). See presets table below. |
css | string | — | Custom CSS to inject before capture. Starter+ plan. |
js | string | — | JavaScript to execute before capture. Growth+ plan. |
hide_selectors | string | — | Comma-separated CSS selectors to hide (display: none). |
click | string | — | CSS selector to click before capture. |
clip | string | — | JSON: {x, y, width, height} — capture specific region. |
headers | string | — | JSON object of extra HTTP headers to send with the page request. |
cookies | string | — | JSON array of cookies to set before loading. |
user_agent | string | — | Override the User-Agent header. |
cache | boolean | true | Use Redis cache for this request. |
cache_ttl | number | 3600 | Cache TTL in seconds. Max 86400 (24h). |
bypass_csp | boolean | false | Disable Content Security Policy for the page. Useful when the target page blocks cross-origin resources. |
stealth | boolean | false | Bypass bot detection fingerprinting. Patches navigator.webdriver, plugins, WebGL, and more. Growth+ plan. |
proxy | string | — | Route 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:
| Feature | Min. plan | Free plan behavior |
|---|---|---|
format: webp | Starter | Returns 403 plan_required |
full_page | Starter | Returns 403 plan_required |
retina | Starter | Returns 403 plan_required |
block_ads | Starter | Returns 403 plan_required |
css injection | Starter | Returns 403 plan_required |
js injection | Growth | Returns 403 plan_required |
stealth | Growth | Returns 403 plan_required |
proxy | Growth | Returns 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: 27Device presets
The device parameter accepts these built-in presets:
| Device | Width | Height | DPR |
|---|---|---|---|
| iPhone 14 | 390 | 844 | 3 |
| iPhone 14 Pro | 393 | 852 | 3 |
| iPhone 15 Pro Max | 430 | 932 | 3 |
| Pixel 7 | 412 | 915 | 2.625 |
| Galaxy S23 | 360 | 780 | 3 |
| iPad Pro 12.9 | 1024 | 1366 | 2 |
| MacBook Pro 14 | 1512 | 982 | 2 |
| Desktop 1080p | 1920 | 1080 | 1 |
| Desktop 1440p | 2560 | 1440 | 1 |
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.jpegMobile 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.pngPOST 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.pngStealth 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.pngStealth mode patches common fingerprint markers used by bot detectors:
| Patch | What it fixes |
|---|---|
navigator.webdriver | Removed (normally true in headless Chrome) |
window.chrome | Faked with realistic runtime object |
navigator.plugins | Non-empty list (headless has 0 plugins) |
navigator.languages | Set to ['en-US', 'en'] |
permissions.query | Returns default for notifications |
| WebGL vendor/renderer | Spoofed 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.pngSupported protocols: http://, https://, socks5://.
Bring Your Own Proxy. SnapSharp does not provide proxy servers. Use services like:
- Bright Data — residential & datacenter proxies
- Oxylabs — datacenter & ISP proxies
- Smartproxy — rotating residential proxies
Combine proxy with stealth=true for maximum bypass capability. Available on Growth plan and above.