App Logo
web.telegram.org

Telegram — Search messages in a conversation

Search inside one Telegram conversation using the conversation's own search box, and return the matching messages: the chat they are in, the date label shown on the result, and the matched text. Returns an empty list when nothing matches, which is a real answer. Note the result rows carry no message id, so results cannot be fed straight to delete or react — use get_conversation for ids. Searching across all chats is a separate Telegram surface and is not covered here.

Input

query required

The text to search for inside the conversation.

peerId required

The conversation to search in, as returned by get_inbox. Required — this script drives the per-conversation search box, not Telegram's global search.

count optional

Maximum results to return from what the search dropdown has rendered.

Default: 30

Output

count required

How many results were returned.

query required

The query that was searched.

peerId required

The peer id that was searched, read back from the address bar.

results required

Matching messages in the order the search dropdown lists them (most recent first). Empty when nothing matched.

chatTitle optional

The conversation title from the header, for a human-readable cross-check against peerId.

FAQ

Search inside one Telegram conversation using the conversation's own search box, and return the matching messages: the chat they are in, the date label shown on the result, and the matched text. Returns an empty list when nothing matches, which is a real answer. Note the result rows carry no message id, so results cannot be fed straight to delete or react — use get_conversation for ids. Searching across all chats is a separate Telegram surface and is not covered here.
Required: peerId, query. Optional: count.
It returns count, query, peerId, results, chatTitle.
Yes. It acts as you on web.telegram.org: on your own Chrome it reuses your session, and on a Reduck-hosted browser it loads the web.telegram.org cookies saved by the Reduck extension.
It only reads. It looks things up on web.telegram.org and changes nothing there.
Ask an AI agent connected to Reduck to run reduck/web.telegram.org/search_messages, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/web.telegram.org/search_messages
It is part of Reduck's official curated catalogue.

Start building not clicking