telegram api method · layer 229 · #1bbcf300

messages.getSearchCounters

usable by users

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

definition

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

parameters

nametypedescription
flags#Flags, see TL conditional fields
peerInputPeerPeer where to search
saved_peer_idflags.2?InputPeerSearch within the saved message dialog » with this ID.
top_msg_idflags.0?intIf set, consider only messages within the specified forum topic
filtersVector<MessagesFilter>Search filters

returns

Vector<messages.SearchCounter>

errors (3)

codeerrordescription
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400PEER_ID_INVALIDThe provided peer id is invalid.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 100–229 · constructor id changed 2×

idlayers
#732eef00100–147
#00ae7cc1148–169
#1bbcf300170–229