App Logo
discord.com

Search Discord messages

Search a Discord server's message history, newest first, using Discord's own search. 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.

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. 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.
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