> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapengine.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Clipboard Read

> Read the current clipboard contents from the session's sandbox OS clipboard.

## 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

<ParamField path="id" type="string" required={true}>
  Browser session ID (UUID).
</ParamField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/clipboard/read" \
    -H "Authorization: Bearer $SCRAPENGINE_API_KEY"
  ```

  ```python Python theme={null}
  import os, requests

  response = requests.post(
      "https://api.scrapengine.io/api/v1/browser/sessions/baa3f390-fa6e-4a24-b84a-a575a5f3a9c7/clipboard/read",
      headers={"Authorization": f"Bearer {os.environ['SCRAPENGINE_API_KEY']}"},
  )
  data = response.json()
  ```
</CodeGroup>

## Response

### Success Response (200)

<ResponseField name="text" type="string">
  Current clipboard text. Empty string when the clipboard is empty.
</ResponseField>

<ResponseField name="bytes" type="integer">
  Number of bytes returned (UTF-8 encoded length of `text`).
</ResponseField>

<ResponseField name="truncated" type="boolean">
  True when the clipboard content exceeded the maximum read size and was truncated.
</ResponseField>

**Example Response:**

```json theme={null}
{
  "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. |
