# Search notes by criteria

`GET /api/search/note`

URL: https://repsona.com/api/get-search-note

Returns matching notes within joined projects. result=ids returns all matching note ids; result=items returns paged display summaries. Multiple tag values are OR-ed. The literal value "none" means the note has no tags. WIP notes are included by default (includeWip=false to exclude).

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `projectId` | query | "@all" \| integer | required | A project ID, or `@all` for every open project you belong to. |
| `q` | query | string |  | Keywords to search for in the note title and body (up to 200 characters). Separate keywords with spaces (up to 5); a note must match all of them. |
| `tagIds` | query | string |  | Comma-separated tag IDs (up to 100). `none` matches notes without tags. |
| `tagMode` | query | and \| exclude |  | How to apply `tagIds`. `and` returns notes that have any of the tags; `exclude` returns notes that do not. Defaults to `and`. |
| `includeWip` | query | 0 \| 1 \| true \| false |  | Whether to include work-in-progress notes: `true`, `false`, `1` or `0`. Defaults to `true`. |
| `result` | query | ids \| items |  | Shape of the response. `ids` returns matching note IDs; `items` returns note summaries, 30 per page. Defaults to `ids`. |
| `page` | query | integer |  | Page number, starting at 1. Used only when `result` is `items`. |

## Request

```sh
curl -X GET "https://<space>.repsona.com/api/search/note" \
  -H "Authorization: Bearer $REPSONA_API_KEY"
```

## Responses

- 200: Matching notes ({ noteIds, truncated } or { items, hasMore })
- 400: Invalid query
- 401: Authentication is required

## Example response

```json
{
  "items": [
    {
      "id": 187,
      "name": "Release checklist (v1)",
      "excerpt": "## Before launch - Run the full regression suite - Confirm the redirect map with marketing - Announce the maintenance wi",
      "isWip": false,
      "projectFullName": "Website renewal",
      "updatedAt": 1793662619295
    }
  ],
  "hasMore": false
}
```
