notes.search
notes_searchSearch Anki notes using Anki query syntax, with empty queries matching all notes and pagination for browsing result sets.
Instructions
Search with Anki syntax; an empty query searches all notes.
Anki-Connect method notes.search. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, invalidSearch, staleCursor, staleSession.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "notes_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Optional browser-column sort, e.g. {"column": "noteFld", "direction": "ascending"} (`column` is an Anki browser column key such as noteFld, cardDue). Default: ascending ID order. | |
| limit | No | Page size, 1–1000 (default 100). | |
| query | Yes | Anki search query for notes, e.g. `deck:Japanese tag:verb`. An empty string matches all notes. | |
| cursor | No | Continuation token: `nextCursor` from the previous page of the same call. Omit for the first page. Repeat the same query, sort and limit; each cursor is single-use and expires after 10 minutes. `nextCursor: null` means there are no more pages. | |
| session | No | Optional. Collection session ID: the `session` field returned by `collection_get`. Usually omit it — the server then uses the session current at the time of the call. Pass it to make the call fail with `staleSession` instead of acting on a different profile/collection than the one your IDs, cursors and tokens came from. |