Skip to main content
GET
/
browser
/
sessions
/
{id}
/
fs
/
zip
Download Zip
curl --request GET \
  --url https://api.example.com/browser/sessions/{id}/fs/zip

Overview

Streams a ZIP archive of a workspace directory. Pass path to archive a subdirectory, or omit it to archive the entire workspace root. The response is application/zip with a Content-Disposition: attachment header; point your HTTP client at a file when calling this endpoint from the CLI.

Path Parameters

id
string
required
Browser session ID (UUID).

Query Parameters

path
string
Workspace-relative directory to archive. When empty/omitted, the full workspace is archived as workspace.zip.

Example Request

curl -G "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/fs/zip" \
  -H "Authorization: Bearer $SCRAPENGINE_API_KEY" \
  -o workspace.zip

Response

Success Response (200)

Binary response with Content-Type: application/zip and a Content-Disposition: attachment; filename="<path>.zip" header. When path is omitted the filename is workspace.zip; otherwise slashes in the path are replaced with dashes (e.g. exports/csv becomes exports-csv.zip).

Error Responses

StatusDescription
400Invalid path.
401Unauthorized — invalid or missing API key.
404Session or path not found.
413Zip archive would exceed the 500 MiB server-side cap (MAX_ZIP_BYTES).