Skip to main content
POST
/
browser
/
sessions
/
{id}
/
clipboard
/
read
Clipboard Read
curl --request POST \
  --url https://api.example.com/browser/sessions/{id}/clipboard/read
{
  "text": "<string>",
  "bytes": 123,
  "truncated": true
}

Overview

Reads whatever is currently on the sandbox OS clipboard of a browser session. Returns an empty string when the clipboard is empty. Useful for verifying what a page copied, or for chaining clipboard-driven flows. This endpoint uses POST with no body so the action is not cached by intermediaries.

Path Parameters

id
string
required
Browser session ID (UUID).

Example Request

curl -X POST "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/clipboard/read" \
  -H "Authorization: Bearer $SCRAPENGINE_API_KEY"

Response

Success Response (200)

text
string
Current clipboard text. Empty string when the clipboard is empty.
bytes
integer
Number of bytes returned (UTF-8 encoded length of text).
truncated
boolean
True when the clipboard content exceeded the maximum read size and was truncated.
Example Response:
{
  "text": "hello world",
  "bytes": 11,
  "truncated": false
}

Error Responses

StatusDescription
401Unauthorized — invalid or missing API key.
404Session not found or not owned by the caller.