Control when the screenshot is taken

Wait for network idle, a specific element, or a fixed delay before the capture fires.

By default the browser captures after the load event. Use wait_until, wait_for_selector, and delay to ensure the page is fully ready before the capture fires.

Parameters

NameTypeRequiredDescription
wait_untilstringoptionalNavigation event before capture: load (default), domcontentloaded, networkidle0, networkidle2.
wait_for_selectorstringoptionalCSS selector to wait for before capturing (waits up to 10 s). E.g. .hero-image, #chart.
delayintegeroptionalExtra wait in ms after page load before capture (0–10000). Default: 0.
navigation_timeoutintegeroptionalMaximum page load timeout in ms (5000–120000). Default: 60000.

Code Examples

# Wait for network to be completely idle
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&wait_until=networkidle" -o out.png

# Wait for a specific element, then add 500 ms buffer
curl "https://screenshotcore.com/api/v1/screenshot?access_key=KEY&url=https://example.com&wait_for_selector=.hero-image&delay=500" -o out.png

Response

(Raw PNG bytes, Content-Type: image/png)