channels.searchPosts

Globally search for posts from public channels » (including those we aren't a member of) containing a specific hashtag.

messages.messages#8c718e87 messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.messagesSlice#3a54685e flags:# inexact:flags.1?true count:int next_rate:flags.0?int offset_id_offset:flags.2?int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.channelMessages#c776ba4e flags:# inexact:flags.1?true pts:int count:int offset_id_offset:flags.2?int messages:Vector<Message> topics:Vector<ForumTopic> chats:Vector<Chat> users:Vector<User> = messages.Messages;
messages.messagesNotModified#74535f21 count:int = messages.Messages;
---functions---
channels.searchPosts#d19f987b hashtag:string offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;

Parameters

Name Type Description
hashtag string The hashtag to search, without the # character.
offset_rate int Initially 0, then set to the next_rate parameter of messages.messagesSlice
offset_peer InputPeer Offsets for pagination, for more info click here
offset_id int Offsets for pagination, for more info click here
limit int Maximum number of results to return, see pagination

Result

messages.Messages

Related pages

messages.messagesSlice

Incomplete list of messages and auxiliary data.

Pagination in the API

How to fetch results from large lists of objects.

Channels, supergroups, gigagroups and basic groups

How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.