contacts.Search

class pyrogram.raw.functions.contacts.Search

Returns users found by username substring.

Details:
  • Layer: 227

  • ID: 5F58D0F

Parameters:
  • q (str) – Target substring

  • limit (int 32-bit) – Maximum number of users to be returned

  • broadcasts (bool, optional) – N/A

  • bots (bool, optional) – N/A

Returns:

contacts.Found

TL Schema

contacts.search#5f58d0f
flags:#
broadcasts:flags.0?true
bots:flags.1?true
q:string
limit:int

= contacts.Found

Parameter Tree

Search
├── broadcaststrue (optional)
├── botstrue (optional)
├── qstring
└── limitint

Example

await app.invoke(
    Search(
        broadcasts=None,
        bots=None,
        q="text",
        limit=0,
    )
)