messages.search
Find chat messages
Searches for messages based on your query and additional conditions, such as author, date, or attachment type.
| الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|
peer | InputPeer | أيوه | Chat to search. |
q | string | أيوه | Search query text. |
from_id | InputPeer | لأ | The author by whom the sample is limited. |
saved_peer_id | InputPeer | لأ | Search within the [saved message dialog »](https://core.telegram.org/api/saved-messages.md) with this ID. |
saved_reaction | Vector<Reaction> | لأ | You may search for [saved messages tagged »](https://core.telegram.org/api/saved-messages.md#tags) with one or more reactions using this flag. |
top_msg_id | int | لأ | ID of the thread's topic or top message. |
filter | MessagesFilter | أيوه | Filter by type of message or attachment. |
min_date | int | أيوه | Lower bound for message date in Unix seconds. |
max_date | int | أيوه | Upper limit of the message date in Unix seconds. |
offset_id | int | أيوه | Only return messages starting from the specified message ID |
add_offset | int | أيوه | [Additional offset](https://core.telegram.org/api/offsets.md) |
limit | int | أيوه | Maximum number of results per issue. |
max_id | int | أيوه | [Maximum message ID to return](https://core.telegram.org/api/offsets.md) |
min_id | int | أيوه | [Minimum message ID to return](https://core.telegram.org/api/offsets.md) |
hash | long | أيوه | [Hash](https://core.telegram.org/api/offsets.md) |
الردود
messages.Messages
MTProto RPC
- 400 · CHANNEL_INVALID — The provided channel is invalid.
- 400 · CHANNEL_PRIVATE — You haven't joined this channel/supergroup.
- 403 · CHAT_ADMIN_REQUIRED — You must be an admin in this chat to do this.
- 400 · CHAT_ID_INVALID — The provided chat id is invalid.
- 400 · FROM_PEER_INVALID — The specified from_id is invalid.
- 400 · INPUT_FILTER_INVALID — The specified filter is invalid.
- 400 · INPUT_USER_DEACTIVATED — The specified user was deleted.
- 400 · MSG_ID_INVALID — Invalid message ID provided.
- 400 · PEER_ID_INVALID — The provided peer id is invalid.
- 400 · PEER_ID_NOT_SUPPORTED — The provided peer ID is not supported.
- 400 · SEARCH_QUERY_EMPTY — The search query is empty.
- 400 · TAKEOUT_INVALID — The specified takeout ID is invalid.
- 400 · USER_ID_INVALID — The provided user ID is invalid.