Skip to main content
A recording and a replay are two ways to look back at a closed session. A recording is a video of every tab, made when you ask for it. A replay is a list of the pages the session visited, with a screenshot and the steps run on each. Both are free.

Record a session

Get an API key in the Quickstart. Send recording: true when you open the session.
The answer has recordingStatus set to recording and recordingAvailable set to true. Use the session as usual, then close it. The video is made after the session stops. The close answer has recordingStatus set to processing.

Read the recording

GET /v1/browser/{session_id}/recording returns the status and, when it is ready, a link to the video.
A real session that ran for 27 seconds had a ready video seconds after it closed. The signature is cut.
recordingUrl needs no API key and works for 15 minutes, so you can open it in a browser or a player. It answered 200 with video/mp4, 168,664 bytes. Read the recording again for a new link. recordingTruncated is true when the video ends early because the session showed more than a recording can hold. A ready video is kept 7 days.

Delete the recording

DELETE /v1/browser/{session_id}/recording removes the video at once.
Reading the recording after that returns 404 notFound with This browser session has no recording. Deleting the video does not remove the replay.

Read the replay

A closed session keeps a replay for 24 hours. GET /v1/browser/{session_id}/replay lists the pages it visited, in order, with the steps run on each. You do not need recording for it.
at is when the page was shown, in milliseconds since 1970. steps are the calls your code made on that page. GET /v1/browser/{session_id}/replay/{page_id} reads one page and adds its screenshot, a Base64 JPEG. This real answer is cut.

Options

Limits and errors

  • recording with zeroDataRetention returns 400 invalidRequest: zeroDataRetention keeps nothing from the session, so it cannot be recorded. Send one of them. A session with zeroDataRetention has no replay.
  • Reading a recording of a session that was not recorded returns 404 notFound.
  • Deleting a video that is still being made returns 409 invalidRequest: The video is not ready yet. Delete it when recordingStatus is ready or failed. Deleting when there is none returns 404 notFound.
  • A replay page id that does not exist returns 404 notFound with No replay page with that id.