ScreenshotNeo

BlogHow-to

How to Add a Delay Before ScreenshotAPI Captures a Page

Set ScreenshotAPI.net’s `delay` parameter in milliseconds to pause after its page-load wait. Learn when to use a fixed delay, a selector wait, or network idle.

By the ScreenshotNeo team4 October 20264 min read

To make ScreenshotAPI.net wait before capturing a page, add its delay query parameter in milliseconds. For example, delay=2000 adds a two-second pause. The documented default is 0, which adds no pause. This delay comes after the configured page-load wait; it does not select which page-load event to wait for. ScreenshotAPI.net documents the delay and loading options.

1. Add the delay to your request

Include delay in the query parameters sent to ScreenshotAPI.net’s /v3/screenshot endpoint. Set the value to the number of milliseconds to wait:

delay=500

That is half a second. For a two-second pause, use delay=2000. The official documentation also shows delay=10000, or ten seconds, alongside lazy_load=true.

The complete request also needs the API credentials and target URL expected by your ScreenshotAPI.net account. Use the endpoint and authentication format in your account’s documentation; similarly named screenshot services may use different endpoints and parameter names.

2. Choose the right kind of wait

A fixed delay is useful when a page needs a known amount of extra time after its load event—for example, to finish an animation or run a late script. It is less reliable when rendering time varies. If you know what must be ready, wait for that condition instead. ScreenshotAPI.net documents fixed delay, selector waits, and network-idle waits, and says these controls can be combined. See its feature overview.

Need Control How it behaves
Add a known pause after page loading delay Fixed duration in milliseconds; 2000 means two seconds.
Wait until a particular component exists wait_for_selector Waits for a CSS selector that identifies the content needed for the capture.
Wait for asynchronous network requests to settle wait_for_event=networkidle Waits for network activity to become idle, which can suit pages whose data arrives asynchronously.
Trigger content deferred until it is scrolled into view lazy_load=true Scrolls through the page to trigger lazy loading; this is separate from the post-load delay.
Set the pause between lazy-load scroll steps scroll_delay Defaults to 500 ms. A high value on a long page can push total render time beyond the timeout.
Limit how long the render can take timeout The documented default is 100000 ms.

Use a selector wait when a specific element is the readiness signal. Use network idle when readiness depends on asynchronous requests settling. Use a fixed delay when the needed extra time is known and a fixed pause is acceptable. For off-screen content that loads only after scrolling, enable lazy loading; increasing delay alone does not trigger that content to load.

3. Keep total render time in mind

The delay is only one part of the render’s total time. Page loading, any selector or event wait, a fixed pause, and lazy-load scrolling can all contribute. A long delay does not fix a page that never reaches its chosen readiness condition. Likewise, a large scroll_delay can consume the timeout on a long page. Start with the shortest wait that produces the required content, then adjust based on the actual page behavior.

For more repeatable captures, prefer a meaningful selector or readiness event when the page exposes one. If a fixed delay is needed, use the same value in repeatable jobs and allow enough timeout for the page plus the added wait.

4. Troubleshoot missing or late content

Symptom Likely cause What to change
The screenshot still shows a loading state The added delay is shorter than the time the page needs, or the selected load event occurs before the content is ready. Wait for the content’s selector or use wait_for_event=networkidle where appropriate; otherwise increase delay modestly.
Off-screen images or sections are blank The page loads them only after scrolling. Enable lazy_load=true. A post-load delay does not itself scroll the page.
The request times out The page is slow, the chosen wait condition is not reached, or lazy-load scrolling and its pauses consume the timeout. Check the page and readiness condition, reduce unnecessary waits or scroll_delay, and review the documented timeout setting.
A parameter seems to have no effect The request may target a different screenshot product or endpoint, or the value may not be expressed in milliseconds. Confirm the endpoint and parameter syntax against the documentation for the service used. For ScreenshotAPI.net, delay=2000 means two seconds.
Captures are inconsistent A fixed pause can end before variable page work finishes. Use a page-specific selector or network-idle condition if available, optionally combined with a short delay for final visual settling.

5. Or skip the browser setup

ScreenshotNeo offers a one-request screenshot API and supports the parameter names other screenshot APIs use, which can make switching easier. The example below captures a page as WebP; see the ScreenshotNeo API documentation for request options and output formats.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture. Bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Learn more at ScreenshotNeo.

Create a free account and get 1,000 screenshots a month with no card.

6. FAQ

Is delay measured in seconds?

No. It is measured in milliseconds: use 1000 for one second.

Does the default add a pause?

No. The documented default is 0.

Does a delay load lazy images?

No. Use lazy_load=true to scroll the page and trigger off-screen lazy content; scroll_delay sets the pause between those scroll steps.

Should I always use network idle?

No. Choose the readiness signal that fits the page. A selector can be more specific when one component determines whether the screenshot is ready; network idle suits pages whose asynchronous requests need to settle.

Sources