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

Plan requirements

Some parameters require a paid plan:

FeatureMin. planFree plan behavior
format: webpStarterReturns 403 plan_required
format: pdfGrowthReturns 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
countryGrowthReturns 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: 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

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.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

Clean 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.png

Screenshot 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.png

Mid-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.png

Hover 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.png

Print 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.pdf

Thumbnail 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.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:[email protected]: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.

Screenshot API