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

# Fetching human review comments via API and BTQL

> [!NOTE]
>
> **Applies to:**
>
> * Plan - Any
> * Deployment - Braintrust-hosted (any version), Self-hosted (requires version 1.1.27+)
> *
> *

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"

```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.