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 |
|---|
Plan requirements
Some parameters require a paid plan:
| Feature | Min. plan | Free plan behavior |
|---|---|---|
format: webp | Starter | Returns 403 plan_required |
format: pdf | Growth | 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 |
country | Growth | Returns 403 plan_required |
All other parameters (block_cookie_banners, block_chats, block_trackers, hover, selector, omit_background, image_width, image_height, full_page_max_height, scroll_y, reduced_motion, media_type, viewport_landscape, device_scale_factor) are available on all plans including Free.
Free plan screenshots include a small SnapSharp watermark. Upgrade to Starter to remove it. View plans →
Response
On success, returns a binary image (or PDF document) 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
Node.js
import { SnapSharp } from '@snapsharp/sdk';
const snap = new SnapSharp('sk_live_...');
// Basic screenshot
const image = await snap.screenshot({ url: 'https://github.com' });
require('fs').writeFileSync('github.png', image);
// Full-page dark mode
const dark = await snap.screenshot({
url: 'https://github.com',
full_page: true,
dark_mode: true,
format: 'jpeg',
quality: 85,
});
require('fs').writeFileSync('github-dark.jpeg', dark);
// Mobile screenshot
const mobile = await snap.screenshot({
url: 'https://twitter.com',
device: 'iPhone 14',
});
require('fs').writeFileSync('twitter-mobile.png', mobile);Python
from snapsharp import SnapSharp
snap = SnapSharp("sk_live_...")
# Basic screenshot
image = snap.screenshot(url="https://github.com")
with open("github.png", "wb") as f:
f.write(image)
# Full-page dark mode
dark = snap.screenshot(
url="https://github.com",
full_page=True,
dark_mode=True,
format="jpeg",
quality=85,
)
with open("github-dark.jpeg", "wb") as f:
f.write(dark)
# Authenticated page with cookies
auth = snap.screenshot(
url="https://app.example.com/dashboard",
cookies=[{"name": "session", "value": "abc123", "domain": "app.example.com"}],
width=1440,
)
with open("dashboard.png", "wb") as f:
f.write(auth)curl
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.pngClean screenshot — no banners, no chats, no ads:
curl "https://api.snapsharp.dev/v1/screenshot\
?url=https://news-site.com\
&block_cookie_banners=true\
&block_chats=true\
&block_ads=true\
&block_trackers=true" \
-H "Authorization: Bearer sk_live_..." \
-o clean.pngScreenshot of a specific element:
curl "https://api.snapsharp.dev/v1/screenshot\
?url=https://example.com\
&selector=.hero-section\
&omit_background=true\
&format=png" \
-H "Authorization: Bearer sk_live_..." \
-o hero.pngMid-page capture (scroll to Y offset):
curl "https://api.snapsharp.dev/v1/screenshot\
?url=https://example.com\
&scroll_y=800\
&width=1280\
&height=900" \
-H "Authorization: Bearer sk_live_..." \
-o mid-page.pngHover to reveal dropdown:
curl "https://api.snapsharp.dev/v1/screenshot\
?url=https://example.com\
&hover=.nav-menu-item\
&full_page=false" \
-H "Authorization: Bearer sk_live_..." \
-o dropdown.pngPrint media emulation (for print-styled pages):
curl "https://api.snapsharp.dev/v1/screenshot\
?url=https://example.com/invoice\
&media_type=print\
&format=pdf" \
-H "Authorization: Bearer sk_live_..." \
-o invoice.pdfThumbnail resize — output 600px wide:
curl "https://api.snapsharp.dev/v1/screenshot\
?url=https://example.com\
&image_width=600" \
-H "Authorization: Bearer sk_live_..." \
-o thumb.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:[email protected]: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.