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.