Logo
version:

Introduction

  • Quick Start
  • Install Guide
  • Project Setup

Getting Started

  • Authorization
  • Calling Methods
  • Handling Updates
  • Error Handling
  • Examples

API Reference

  • Pyrogram Client
  • Available Methods
  • Available Types
  • Bound Methods
  • Update Handlers
  • Decorators
  • RPC Errors
  • Update Filters

Topic Guides

  • Using Filters
  • Creating Filters
  • More on Updates
  • Configuration File
  • Smart Plugins
  • Session Settings
  • Fast Crypto
  • Storage Engines
  • Text Formatting
  • Object Serialization
  • SOCKS5 Proxy
  • Scheduling Tasks
  • Bots Interaction
  • MTProto vs. Bot API
  • Debugging
  • Test Servers
  • Advanced Usage
  • Voice Calls

Meta

  • Pyrogram FAQ
  • Pyrogram Glossary
  • Powered by Pyrogram
  • Support Pyrogram
  • About the License
  • Release Notes

Telegram API

  • Raw Functions
  • Raw Types
  • Raw Base
Pyrogram
  • Docs »
  • Raw Functions »
  • Messages »
  • Search
  • View on GitHub

Search¶

class pyrogram.raw.functions.messages.Search¶

Gets back found messages.

Details
  • Layer: 122

  • ID: 0xc352eec

Parameters
  • peer (InputPeer) – User or chat, histories with which are searched, or (inputPeerEmpty) constructor for global search.

  • q (str) – Text search request.

  • filter (MessagesFilter) – Filter to return only specified message types.

  • min_date (int 32-bit) – If a positive value was transferred, only messages with a sending date bigger than the transferred one will be returned.

  • max_date (int 32-bit) – If a positive value was transferred, only messages with a sending date smaller than the transferred one will be returned.

  • offset_id (int 32-bit) – Only return messages starting from the specified message ID.

  • add_offset (int 32-bit) – Additional offset.

  • limit (int 32-bit) – Number of results to return.

  • max_id (int 32-bit) – Maximum message ID to return.

  • min_id (int 32-bit) – Minimum message ID to return.

  • hash (int 32-bit) – Hash.

  • from_id (InputPeer, optional) – Only return messages sent by the specified user ID.

  • top_msg_id (int 32-bit, optional) – Thread ID.

Returns

messages.Messages – Object contains infor on list of messages with auxiliary data.

Next Previous

Pyrogram documentation © Copyright 2017-2020, Dan

Licensed under the Creative Commons Attribution 4.0 International License

Built with Sphinx using a theme provided by Read the Docs.