Search messages
search_messagesLocate Proton Mail messages by criteria including sender, recipient, subject, date, size, read/star state, and text. Returns headers newest first with paging.
Instructions
Searches a mailbox by text, subject, sender, recipient, date range, read state, star or size. At least one criterion is required. Returns headers only, newest first across pages, with paging. A full-text search walks the local database of the Bridge and takes a few seconds on a large mailbox, while criteria such as unread or date are fast. Searching "All Mail" covers every mailbox including trash.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Substring of a recipient address. | |
| from | No | Substring of the sender address or display name. | |
| text | No | Free text, matched against body and headers. This is the slow criterion. | |
| limit | No | How many results to return. | |
| since | No | Only messages on or after this date, as YYYY-MM-DD. | |
| before | No | Only messages before this date, as YYYY-MM-DD. | |
| offset | No | How many results to skip, for paging. | |
| mailbox | No | Which mailbox to search. Defaults to "All Mail", which holds every message. | All Mail |
| subject | No | Substring of the subject. | |
| largerThan | No | Minimum size in bytes. Useful for finding messages with large attachments. | |
| unreadOnly | No | When true, only unread messages. | |
| starredOnly | No | When true, only starred messages. |