Taking screenshots is a balance between being as fast as possible, and, making sure a page has fully loaded. We have a variety of techniques or queries that allow you to tweak the way we wait for a page to load to assist with that.
By default, we will wait until 500ms passes with less than 2 requests in it. This attempts to have a page fully load by tracking the number of requests it makes and waiting for it to quieten down.
Once a screenshot is taken, you benefit from the cache.
You can add a custom amount of delay in milliseconds to the screenshot, which will cause screendot to wait an extra amount of time for the page to load. Add the &delay=X parameter with up to 10,000 ms of delay to sleep for 10 seconds.
The below example will wait 1 second (1000ms) before screenshotting google.com.
curl -H "Accept: application/json" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ "https://screendot.io/api/standard?url=https://www.google.com&delay=1000"