Link Search Menu Expand Document

Method: messages.getSearchResultsCalendar

Back to methods index

Returns information about the next messages of the specified type in the chat split by days.

Returns the results in reverse chronological order.
Can return partial results for the last returned day.

Parameters:

NameTypeDescriptionRequired
peerUsername, chat ID, Update, Message or InputPeerPeer where to searchOptional
filterMessagesFilterMessage filter, inputMessagesFilterEmpty, inputMessagesFilterMyMentions filters are not supported by this method.Optional
offset_idintOffsets for pagination, for more info click hereYes
offset_dateintOffsets for pagination, for more info click hereYes

Return type: messages.SearchResultsCalendar

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();

// PHP 8+ syntax, use an array on PHP 7.
$messages_SearchResultsCalendar = $MadelineProto->messages->getSearchResultsCalendar(peer: InputPeer, filter: MessagesFilter, offset_id: int, offset_date: int, );