POST https://screenshotly.app/api/screenshot with your key in the x-api-key
header. Options marked Basic, Growth, or Scale need that plan or
higher; see the request reference for every field and bound.
Basic capture
Viewport and devices
Use adevice preset or set width and height together:
devicetakes precedence: if it is set,widthandheightare ignored.width(320–3,840) andheight(240–3,840) only apply when both are present.- Presets change the viewport size only, so sites see a narrow window rather
than a mobile browser. Set
userAgentas well if a site serves different markup to mobile user agents. deviceScaleFactor(1–3) renders at higher pixel density. At2, a 1440 × 900 viewport produces a 2880 × 1800 image.
Output formats
fullPage has no effect on it. For many PDFs, or PDFs of slow pages, use an
async job instead of holding the request open.
Full-page and partial captures
fullPagecaptures the whole scrollable height at the viewport’s width.selectorcaptures the first matching element’s bounding box. If nothing matches, the request fails with400 Invalid screenshot options.clipcaptures a fixed rectangle in CSS pixels; it wins if you also sendselector.
Wait for dynamic content
By default the capture starts when the HTML document has loaded (DOMContentLoaded). Single-page apps, charts, and lazy images often need more
time:
scroll scrolls the page in steps before capturing (distance 100–50,000 px,
default 5,000; speed 100–5,000 px per second, default 500), then returns to the
top. Scrolling adds roughly distance ÷ speed seconds to the capture, so keep it
short for synchronous requests or use an async job.
Clean up the page
Ads and known elements
blockAds (all plans) blocks common ad networks and hides common ad
containers. hideSelectors (Growth) hides up to 100 elements you name:
AI element removal
aiRemoval (Growth) finds overlays you have not named. Screenshotly lists
fixed and sticky elements, plus elements whose ID, class, role, or label
suggests a banner or widget, asks an AI model to classify them, and removes the
matches before capturing.
- Omit
types, or send an empty list, to consider all five. confidence(0–1, default0.8) is the minimum score for removal. Raise it to remove less and avoid false positives; lower it to remove more.- The model is instructed not to select the page’s
html,body, main content, navigation, or ordinary controls, but check results on pages you capture often. When you know the selector,hideSelectorsis faster and deterministic.
Appearance and locale
darkModeemulatesprefers-color-scheme: dark. It only changes sites that support a dark theme.timezonetakes an IANA name such asEurope/Berlin.geolocation(Growth) sets the browser’s reported location:{ "latitude": 51.5072, "longitude": -0.1276 }. Sites that locate visitors by IP address are not affected; regional IPs are available withproxyRegion(Scale).headersandcookiesare Basic features.
Pages behind a login
Pass a session withcookies or headers (Basic):
domain must be the target host or a parent domain of it. Use a
dedicated, low-privilege account; see Security.
Custom JavaScript
javascript (Growth) runs up to 5,000 characters of code in the page after
it loads and before the capture, for example to open a tab or remove an element:
Handle errors and retries
Retry only when a retry can succeed:Node.js
Next steps
- Using mockups to frame captures in device templates
- Async and batch jobs for queued, retryable captures
- Webhooks to receive results without polling