search_global_hashtag_messages()¶
- Client.search_global_hashtag_messages()
Search public channel posts with a given hashtag and/or text query.
For the count only, see
search_global_hashtag_messages_count().Usable by Users Bots
- Parameters:
hashtag (
str, optional) – Hashtag to search for.query (
str, optional) – Additional free-text search query (Layer 207+).offset_id (
int, optional) – Offset message ID for pagination.offset_date (
datetime, optional) – Return only messages older than this date.limit (
int, optional) – Maximum number of messages to return. Defaults to0(no limit).allow_paid_stars (
int, optional) – Maximum Stars budget for paid-broadcast results (Layer 207+). PassNoneto exclude paid results.
- Returns:
AsyncGenerator– YieldsMessageobjects.
Example
async for message in app.search_global_hashtag_messages("#pyrogram"): print(message.text)