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
| Name | Type | Required | Description |
|---|---|---|---|
wait_until | string | optional | Navigation event before capture: load (default), domcontentloaded, networkidle0, networkidle2. |
wait_for_selector | string | optional | CSS selector to wait for before capturing (waits up to 10 s). E.g. .hero-image, #chart. |
delay | integer | optional | Extra wait in ms after page load before capture (0–10000). Default: 0. |
navigation_timeout | integer | optional | Maximum 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.pngResponse
(Raw PNG bytes, Content-Type: image/png)