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
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)
Current clipboard text. Empty string when the clipboard is empty.
Number of bytes returned (UTF-8 encoded length of text).
True when the clipboard content exceeded the maximum read size and was truncated.
Example Response:
{
"text": "hello world",
"bytes": 11,
"truncated": false
}
Error Responses
| Status | Description |
|---|
401 | Unauthorized — invalid or missing API key. |
404 | Session not found or not owned by the caller. |