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

# Fetching human review comments via API and BTQL

export const plans_0 = "Any"

export const deployments_0 = "Braintrust-hosted (any version), Self-hosted (requires version 1.1.27+)"

export const data_plane_version_0 = undefined

export const use_case_0 = undefined

<Note>
  **Applies to:**

  * Plan - {plans_0}
  * Deployment - {deployments_0}
  * {data_plane_version_0}
  * {use_case_0}
</Note>

Summary

**Goal:** Fetch human review comments and scores from the UI using the API or BTQL.

**Features:** REST API logs fetch endpoints, BTQL queries, comments field on log events.

## Configuration Steps

### Step 1: Verify version (self-hosted only)

Human review comments in API responses require version 1.1.27 or later for self-hosted deployments.

### Step 2: Fetch comments via REST API

Use the project logs fetch endpoint to retrieve comments left in the UI.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
curl -X POST https://api.braintrust.dev/v1/project_logs/{project_id}/fetch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

```

Each log event includes a `comments` field containing human review feedback.

### Step 3: Query comments using BTQL

Comments are part of the BTQL schema and can be queried directly.

```sql theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
SELECT id, input, output, comments
FROM project_logs
WHERE comments IS NOT NULL

```

### Step 4: Fetch comments from datasets

Dataset fetch responses also include the `comments` field when records have human review feedback.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
curl -X POST https://api.braintrust.dev/v1/dataset/{dataset_id}/fetch \
  -H "Authorization: Bearer YOUR_API_KEY"

```
