Search messages
Searches for messages across guilds and channels accessible to the authenticated user. Bots must supply a context guild or channel and may only use the current scope.
Request body
Number of results per page (1-25)
Page number for pagination (ignored when cursor is provided)
Opaque cursor for search_after pagination. When provided, page is ignored.
Text content to search for
Multiple content queries to search for
Exact phrases that must appear contiguously in message content
Channel IDs to search in
Channel IDs to exclude from search
Author types to filter by
Author types to exclude
Author user IDs to filter by
Author user IDs to exclude
User IDs that must be mentioned
User IDs that must not be mentioned
Filter by whether message mentions everyone
Filter by pinned status
Content flags the message must have. Use image, video, sound, or file for uploaded attachments and embed for link previews or rich embeds.
Content flags the message must not have. Use image, video, sound, or file for uploaded attachments and embed for link previews or rich embeds.
Generated or supplied embed types to filter by; does not match uploaded attachments
Generated or supplied embed types to exclude; does not match uploaded attachments
Embed providers to filter by
Embed providers to exclude
Link hostnames to filter by
Link hostnames to exclude
Attachment filenames to filter by
Attachment filenames to exclude
File extensions to filter by
File extensions to exclude
Field to sort results by
Sort order for results
Whether to include NSFW channel results
Scope to search within when querying messages
Specific channel IDs to search in
Response
Success
Changes
No recorded changes to this endpoint across all 1 revision of this API.