Method: channels.searchPosts
Globally search for posts from public channels » (including those we aren’t a member of) containing a specific hashtag.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
hashtag | string | The hashtag to search, without the # character. | Optional |
offset_rate | int | Initially 0, then set to the next_rate parameter of messages.messagesSlice | Optional |
offset_peer | Username, chat ID, Update, Message or InputPeer | Offsets for pagination, for more info click here | Optional |
offset_id | int | Offsets for pagination, for more info click here | Optional |
limit | int | Maximum number of results to return, see pagination | Optional |
Return type: messages.Messages
Can userbots use this method: YES
Can bots use this method: NO
MadelineProto Example (now async for huge speed and parallelism!):
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$messages_Messages = $MadelineProto->channels->searchPosts(hashtag: 'string', offset_rate: $int, offset_peer: $InputPeer, offset_id: $int, limit: $int, );