# Search comments (https://notert.io/docs/api/reference/search-comments)

`GET /api/v1/comments`

Finds what was said in the comments and internal notes on the workspace's requests, as the app's search box finds a comment: every word asked for, in its text or in a document posted with it, optionally only public comments or only notes, only the team's or only contacts', on one request or within a stretch of time, newest or oldest first, a page at a time. None a moderator removed, and none on a request merged into another or removed.

Access: A token with requests:read.

## Query parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | No | Words every comment found holds, such as pricing or SSO. Empty lists them all. At most 200 characters. |
| `visibility` | string | No | all, the default; public, for comments the board shows; or notes, for internal notes the team alone reads. One of: `all`, `public`, `notes`. Default "all". |
| `authors` | string | No | Whose comments: everyone, the default; teammates, for members of the team and those it banned from it; or contacts, for customers and others outside the team. One of: `everyone`, `teammates`, `contacts`. Default "everyone". |
| `requestId` | string | No | Only the comments on this request. At most 64 characters. |
| `createdAfter` | date-time | No | Only comments posted at or after this moment, ISO 8601 with its offset. |
| `createdBefore` | date-time | No | Only comments posted before this moment, ISO 8601 with its offset. |
| `sort` | string | No | newest first, the default, or oldest first. One of: `newest`, `oldest`. Default "newest". |
| `limit` | integer | No | How many comments the page holds. 1 to 100. Default 50. |
| `cursor` | string | No | The nextCursor of the page before, with the other parameters as they were. At most 4096 characters. |

## Response 200

| Field | Type | Description |
| --- | --- | --- |
| `items` | object[] | The page's comments and internal notes, in the order asked. |
| `items.id` | string | The comment's id. |
| `items.requestId` | string | The request it is on. |
| `items.requestTitle` | string | The title of the request it is on. |
| `items.replyTo` | string or null | The comment whose thread it replies in, or null for a comment of its own. |
| `items.internal` | boolean | Whether it is an internal note the team alone reads, rather than a comment the board shows. |
| `items.excerpt` | string | How it begins, as plain text, cut short with … past 280 characters. Listing the request's comments reads it whole. |
| `items.author` | string or null | Who wrote it, by name: Otto for an answer of the workspace's AI agent, null for an author who gave no name. Their email address is never answered. |
| `items.authorKind` | string or null | Whether its author is a member of the team (member), someone outside it the workspace knows, such as a customer (contact), or the workspace's AI agent (otto). Null for an author the workspace no longer knows: one whose account is gone, or a member who left the team. One of: `member`, `contact`, `otto`. |
| `items.createdAt` | date-time | When it was posted. |
| `nextCursor` | string or null | Where the next page starts, to send as cursor. Null on the last page. |

## Errors

| Status | Code | Message |
| --- | --- | --- |
| 400 | `BAD_REQUEST` | Input validation failed. |
| 401 | `UNAUTHORIZED` | Send a valid API token as a Bearer token. |
| 403 | `HOLDER_NOT_ALLOWED` | The teammate who holds this API token's secret can't do this in the workspace now. A teammate who can should roll it in the workspace's settings. |
| 403 | `INSUFFICIENT_SCOPE` | This API token can't read requests, boards, tags and statuses. Create one that may in the workspace's settings. |
| 403 | `NETWORK_NOT_ALLOWED` | This API token works only from the networks it was made for. Call from one of them, or create a token for this one in the workspace's settings. |
| 429 | `TOO_MANY_REQUESTS` | Too Many Requests. Its data holds `retryAfter`. |

## Example request

```sh
curl "https://app.notert.io/api/v1/comments?query=pricing&limit=20" \
  -H "Authorization: Bearer $NOTERT_API_TOKEN"
```

## Example response 200

```json
{
  "items": [
    {
      "id": "9a1c3e5f-7b2d-4f6a-8e0c-2b4d6f8a0c1e",
      "requestId": "8f2c4b1e-3a6d-4f0b-9c2e-5d7a1b3c9e40",
      "requestTitle": "Dark mode",
      "replyTo": "3b5d7f9a-1c2e-4a6b-8d0f-4e6a8c0b2d47",
      "internal": false,
      "excerpt": "Dark mode would help our night shift a lot.",
      "author": "Hannah Lee",
      "authorKind": "contact",
      "createdAt": "2026-11-12T09:41:07.654Z"
    }
  ],
  "nextCursor": "WyIyMDI2LTExLTEyIDA5OjQxOjA3LjY1NDMyMSIsIjlhMWMzZTVmLTdiMmQtNGY2YS04ZTBjLTJiNGQ2ZjhhMGMxZSJd"
}
```
