Skip to the content
Docs Back to the site Dashboard

Screenshots

Run in the background

By default a request waits for its screenshot. Add async=true to get an id right away and read the result later. Use it for long pages, for batches, or when your own request must answer fast.

Start a screenshot

Send the same request as usual, with async=true. The answer is 202 with the screenshot in its first state.

Read the result

Read the address given in Location until status is succeeded or failed. Wait the number of seconds in Retry-After between two reads.

Status What it means
queued Waiting for a free browser.
running The page is being loaded.
succeeded Done. image holds the link.
failed Done, without an image. error says why.

Reading a screenshot answers 200 whatever its status: look at status and error, not at the HTTP code.

When a normal request also answers 202

A request without async waits up to 50 seconds. If the screenshot is not finished by then, the answer is the same 202, with the same Location. The work is not lost: read it the same way.

Credits

No webhooks yet. We do not call your server when a screenshot is done. Read the screenshot until it is finished.