channels.searchPosts
Globally search for posts from public channels » (*including* those we aren't a member of) containing either a specific hashtag, *or* a full text query.
Globally search for posts from public [channels »](https://core.telegram.org/api/channel.md) (*including* those we aren't a member of) containing either a specific hashtag, *or* a full text query.
| Name | Type | Required | Description |
|---|---|---|---|
hashtag | string | No | The hashtag to search, without the `#` character. |
query | string | No | The full text query: each user has a limited amount of free full text search slots, after which payment is required, see [here »](https://core.telegram.org/api/search.md#posts-tab) for more info on the full flow. |
offset_rate | int | Yes | Initially 0, then set to the [`next_rate` parameter of messages.messagesSlice](https://core.telegram.org/constructor/messages.messagesSlice.md), or if that is absent, the `date` of the last returned message. |
offset_peer | InputPeer | Yes | [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets.md) |
offset_id | int | Yes | [Offsets for pagination, for more info click here](https://core.telegram.org/api/offsets.md) |
limit | int | Yes | Maximum number of results to return, [see pagination](https://core.telegram.org/api/offsets.md) |
allow_paid_stars | long | No | For full text post searches (`query`), allows payment of the specified amount of Stars for the search, see [here »](https://core.telegram.org/api/search.md#posts-tab) for more info on the full flow. |
Replies
messages.Messages
MTProto RPC
- 420 · FROZEN_METHOD_INVALID — The current account is [frozen](https://core.telegram.org/api/auth.md#frozen-accounts), and thus cannot execute the specified action.
- 400 · OFFSET_PEER_ID_INVALID — The provided offset peer is invalid.
- 403 · PREMIUM_ACCOUNT_REQUIRED — A premium account is required to execute this action.