Search emails
search_emailsSearch one folder for text in email subjects and bodies. Results have the same fields, order and paging as list_emails. The search covers a single folder; list_mailbox_folders lists the account's others.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | The email account address | ||
| limit | No | How many matches to return. Defaults to 20, capped at 100. | |
| order | No | Date order for the matches: newest_first (the default) or oldest_first. | newest_first |
| query | Yes | Text to search for in email subject and body | |
| offset | No | How many matches to skip from the start of the ordering. Defaults to 0. | |
| mailbox | Yes | Mailbox/folder to search, e.g. "INBOX". Search covers one folder at a time. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | Yes | Date order of `emails`. | |
| query | No | The search text, for search_emails. Absent for list_emails. | |
| total | Yes | How many emails the folder holds (or match the query) in all, not just this page. | |
| emails | Yes | This page of emails. | |
| offset | Yes | Position of this page's first email in the ordering, counting from 0. | |
| mailbox | Yes | The folder listed or searched. UIDs below only mean something together with it. | |
| next_offset | No | Pass this as `offset` to get the next page. Absent on the last page. |