Link Search Menu Expand Document

Method: messages.getSearchResultsPositions

Back to methods index

Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.

Returns the results in reverse chronological order (i.e., in order of decreasing message_id).


peerUsername, chat ID, Update, Message or InputPeerPeer where to searchOptional
saved_peer_idUsername, chat ID, Update, Message or InputPeerSearch within the saved message dialog » with this ID.Optional
filterMessagesFilterMessage filter, inputMessagesFilterEmpty, inputMessagesFilterMyMentions filters are not supported by this method.Optional
offset_idintOffsets for pagination, for more info click hereOptional
limitintMaximum number of results to return, see paginationOptional

Return type: messages.SearchResultsPositions

Can bots use this method: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('', 'madeline.php');
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');

$messages_SearchResultsPositions = $MadelineProto->messages->getSearchResultsPositions(peer: $InputPeer, saved_peer_id: $InputPeer, filter: $MessagesFilter, offset_id: $int, limit: $int, );