App Logo
discord.com

Search Discord server messages

Automatically search Discord server messages on discord.com. Search a Discord server's message history, newest first, using Discord's own search, as the signed-in account: it reaches every server that account is in, with no bot to invite. The query accepts Discord's search syntax (plain words, or filters like from:, in:, has:, before:, during:), so scoping to a channel or author is done in the query itself. Returns per hit: messageId, channelId, url, author (id, handle, name), content, timestamp, plus total_results as Discord reports it and complete, which is false when more hits exist beyond the page read. Discord returns search hits with surrounding context messages; only the hits themselves are returned. It searches one server at a time; for direct messages (DMs), list the conversations with discord.com/list_dms and read one with discord.com/read_messages.

Input

query required

What to search for. Discord's own search syntax works here, e.g. 'deploy', 'from:someone deploy', 'in:general has:link'. Always use the English keywords (from:/in:/has:/mentions:) regardless of the signed-in account's Discord display language -- the script translates them internally.

guildId required

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

limit optional

How many hits to return, newest first. Discord serves 25 per page and this reads one page, so 25 is the maximum; total_results tells you how many exist.

Default: 25

Output

count required
query required
guildId required
messages required
complete optional

True when every hit Discord reported was returned; false when more exist beyond this page.

total_results optional

Discord's own count of matching messages, which can exceed the number returned.

FAQ

Search a Discord server's message history, newest first, using Discord's own search, as the signed-in account: it reaches every server that account is in, with no bot to invite. The query accepts Discord's search syntax (plain words, or filters like from:, in:, has:, before:, during:), so scoping to a channel or author is done in the query itself. Returns per hit: messageId, channelId, url, author (id, handle, name), content, timestamp, plus total_results as Discord reports it and complete, which is false when more hits exist beyond the page read. Discord returns search hits with surrounding context messages; only the hits themselves are returned. It searches one server at a time; for direct messages (DMs), list the conversations with discord.com/list_dms and read one with discord.com/read_messages.
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, query. Optional: limit.
It returns count, query, guildId, complete, messages, 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