messages.GetSearchCounters

class pyrogram.raw.functions.messages.GetSearchCounters

Get the number of results that would be found by a messages.search call with the same parameters

Details:
  • Layer: 223

  • ID: 1BBCF300

Parameters:
  • peer (InputPeer) – Peer where to search

  • filters (List of MessagesFilter) – Search filters

  • saved_peer_id (InputPeer, optional) – Search within the saved message dialog » with this ID.

  • top_msg_id (int 32-bit, optional) – If set, consider only messages within the specified forum topic

Returns:

List of messages.SearchCounter

TL Schema

messages.getSearchCounters#1bbcf300
flags:#
peer:InputPeer
saved_peer_id:flags.2?InputPeer
top_msg_id:flags.0?int
filters:Vector<MessagesFilter>

= Vector<messages.SearchCounter>

Parameter Tree

GetSearchCounters
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── saved_peer_idInputPeer (optional)
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── top_msg_idint (optional)
└── filtersVector < MessagesFilter >

Example

await app.invoke(
    GetSearchCounters(
        peer=await app.resolve_peer(chat_id),
        saved_peer_id=await app.resolve_peer(chat_id),
        top_msg_id=0,
        filters=[
                InputMessagesFilterEmpty()
            ],
    )
)