> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.deepmask.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Messages

`outlook_search_messages`

Full-text search across the user's Outlook messages using KQL (Keyword Query Language) syntax. Searches subject, body, sender, and recipients. Returns message previews with IDs you can pass to `outlook_get_message` for the full content.

## Parameters

| Parameter         | Type   | Required | Description                                                                                                          |
| ----------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------- |
| `query`           | string | Yes      | Search query using KQL syntax — e.g. `"budget"`, `"\"Q3 report\""`, `"from:alice@example.com"`, `"subject:invoice"`. |
| `limit`           | number | No       | Max results to return (1–100, default 20).                                                                           |
| `offset`          | number | No       | Results to skip for pagination (default 0).                                                                          |
| `response_format` | string | No       | Output format: `"markdown"` (default) or `"json"`.                                                                   |

## Returns

An array of matching message objects with preview data, including `id`, `subject`, `from`, `receivedDateTime`, `isRead`, `bodyPreview`, and `conversationId`.

<Info>
  KQL supports phrases (`"exact phrase"`), field-scoped queries (`from:user@domain.com`, `subject:keyword`), and boolean operators (`invoice AND 2024`). For simple keyword searches, plain text works without any special syntax.
</Info>

## Example use

> "Find all emails from [alice@example.com](mailto:alice@example.com) with 'budget' in the subject."
