App Logo
discord.com

Search Discord server messages

Automatically search Discord server messages on discord.com. Search one Discord server's message history with Discord's own search, as the signed-in account, newest first. Search by words (content), and narrow by authors, channels, mentioned users and content type, each given as ids: get user ids from discord.com/get_member_list and channel ids from discord.com/list_channels. Returns one page of up to 25 matching messages with their author, text, time and link, Discord's total count of matches, and next_offset to read the next page (null on the last one). Fails with a clear error when the browser is not signed in to Discord, when the account is not a member of the server or can see no text channel in it, or when Discord is still indexing the server. Direct messages are not searched.

Input

guildId required

Server id to search, from discord.com/list_servers.

has optional

Only messages that include this kind of content.

offset optional

How many hits to skip: pass next_offset of the previous answer to read the next page.

Default: 0
content optional

Words the messages must contain (plain words; Discord operators such as from: or in: are rejected: use the filter arguments). Optional when a filter is given.

mentions optional

Only messages that mention these users (user ids).

authorIds optional

Only messages sent by these users (user ids, from discord.com/get_member_list).

channelIds optional

Only messages in these channels (channel ids, from discord.com/list_channels).

Output

offset required
guildId required
messages required
count optional
complete optional

True when no hits remain after this page.

next_offset optional

Pass as offset to read the next page; null on the last page.

total_results optional

Discord's own count of matching messages.

FAQ

Search one Discord server's message history with Discord's own search, as the signed-in account, newest first. Search by words (content), and narrow by authors, channels, mentioned users and content type, each given as ids: get user ids from discord.com/get_member_list and channel ids from discord.com/list_channels. Returns one page of up to 25 matching messages with their author, text, time and link, Discord's total count of matches, and next_offset to read the next page (null on the last one). Fails with a clear error when the browser is not signed in to Discord, when the account is not a member of the server or can see no text channel in it, or when Discord is still indexing the server. Direct messages are not searched.
Ask an AI agent connected to Reduck to run reduck/discord.com/search_messages, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/discord.com/search_messages
You do not need one. "Search Discord server messages" drives the real discord.com pages in a browser, so it works whether or not discord.com offers an API for this.
Required: guildId. Optional: has, offset, content, mentions, authorIds, channelIds.
It returns count, offset, guildId, complete, messages, next_offset, total_results.
Yes. It acts as you on discord.com: on your own Chrome it reuses your session, and on a Reduck-hosted browser it loads the discord.com cookies saved by the Reduck extension.
It only reads. It looks things up on discord.com and changes nothing there.
Ask an AI agent connected to Reduck to run reduck/discord.com/search_messages, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/discord.com/search_messages
It is part of Reduck's official curated catalogue.

Start building not clicking