Skip to main content
Ssnap Docs
API Reference

Device emulation

131 device presets, explicit viewport overrides, and how the two interact.

Ssnap ships 131 device presets mirroring Puppeteer's device list: phones, tablets and their landscape variants, each with a user agent and a screen size. Captures emulate the selected device.

Choosing a device

Pass device_id:

curl -G https://ssnap.cc/api/v1/screenshot \
  -H "Authorization: Bearer $SSNAP_API_KEY" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "device_id=42"

The ids are assigned when the preset catalogue is imported. The current list, with names and dimensions, is shown in the device picker on the Screenshots page of your dashboard. Use it to find the id you want.

Omitting device_id uses the server's configured default preset. An unknown id is rejected with 422 and code invalid_device.

Preset families

FamilyExamples
iPhoneiPhone 4 through iPhone 15 Pro Max, each with a landscape variant
iPadiPad, iPad Mini, iPad Pro, iPad Pro 11, gen 6 / gen 7
GalaxyGalaxy S III, S5, S8, S9+, Note II, Note 3, Tab S4
Pixel / NexusPixel 2, Pixel 2 XL, Nexus 4/5/5X/6/6P/7/10
OtherKindle Fire HDX, Nokia Lumia, Microsoft Lumia, BlackBerry, JioPhone 2, LG Optimus

Each preset carries its own type (mobile or tablet), user agent and screen size.

Overriding the viewport

width and height are applied after the preset, so they override its dimensions:

curl -G https://ssnap.cc/api/v1/screenshot \
  -H "Authorization: Bearer $SSNAP_API_KEY" \
  --data-urlencode "url=https://example.com" \
  --data-urlencode "width=1920" \
  --data-urlencode "height=1080"

Pass both width and height. A lone dimension is ignored and the preset's size is used instead. Both accept 1–5000.

The device's user agent still applies after a viewport override, so you get the preset UA plus custom dimensions. To capture a desktop-sized page, set an explicit width/height.

Full page and devices

full_page=true captures the entire scroll height at the selected width, so the device preset controls the width and the page controls the height. See Full page and element captures.

Rendering environment

Every capture runs in headless Chromium with:

  • locale en-GB,
  • a 30-second render timeout,
  • dialogs auto-dismissed, so alert() or cookie confirm() popups cannot hang a render,
  • ad, analytics and Google Fonts requests blocked (googlesyndication.com, google-analytics.com, fonts.googleapis.com) to cut render time and noise.

Because Google Fonts is blocked at request level, a page relying solely on it renders in fallback fonts. Self-hosted fonts are unaffected.

Next