Search messages
searchFind messages by text query. Specify a peer to search within one chat, or omit it to search all chats in your account.
Instructions
Search message text, either inside one chat or across the whole account when no peer is given.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| peer | No | Limit to one chat. Omit to search everywhere. | |
| limit | No | How many results. Default 20, max 100. | |
| query | Yes | Text to search for. | |
| fields | No | Comma separated fields to keep, e.g. 'id,text'. Dotted paths descend. Cuts response size. |