telegram api method · layer 229 · #6126a43c
messages.searchGlobal
Search for messages and peers globally
definition
messages.searchGlobal#6126a43c flags:# broadcasts_only:flags.1?true groups_only:flags.2?true users_only:flags.3?true folder_id:flags.0?int community:flags.4?InputChannel q:string filter:MessagesFilter min_date:int max_date:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
parameters
| name | type | description |
|---|---|---|
flags | # | Flags, see TL conditional fields |
broadcasts_only | true | If set, only returns results from channels (used in the global channel search tab »). |
groups_only | true | Whether to search only in groups |
users_only | true | Whether to search only in private chats |
folder_id | int | Peer folder ID, for more info click here |
community | InputChannel | |
q | string | Query |
filter | MessagesFilter | Global search filter |
min_date | int | If a positive value was specified, the method will return only messages with date bigger than min_date |
max_date | int | If a positive value was transferred, the method will return only messages with date smaller than max_date |
offset_rate | int | Initially 0, then set to the next_rate parameter of messages.messagesSlice, or if that is absent, the date of the last returned message. |
offset_peer | InputPeer | Offsets for pagination, for more info click here |
offset_id | int | Offsets for pagination, for more info click here |
limit | int | Offsets for pagination, for more info click here |
returns
errors (5)
| code | error | description |
|---|---|---|
| 400 | BUSINESS_CONNECTION_NOT_ALLOWED | This 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. |
| 400 | FOLDER_ID_INVALID | Invalid folder ID. |
| 400 | INPUT_FILTER_INVALID | The specified filter is invalid. |
| 400 | SEARCH_QUERY_EMPTY | The search query is empty. |
| 401 | AUTH_KEY_UNREGISTERED | The specified authorization key is not registered in the system (for example, a PFS temporary key has expired). |
history
present in layers 46–229 · constructor id changed 4×
| id | layers |
|---|---|
| #9e3cacb0 | 46–99 |
| #0f79c611 | 100–101 |
| #bf7225a4 | 102–118 |
| #4bc6589a | 119–227 |
| #6126a43c | 228–229 |