stories.SearchPosts

class pyrogram.raw.functions.stories.SearchPosts

Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow.

Details:
  • Layer: 223

  • ID: D1810907

Parameters:
  • offset (str) – Offset for pagination: initially an empty string, then the next_offset from the previously returned stories.foundStories.

  • limit (int 32-bit) – Maximum number of results to return, see pagination

  • hashtag (str, optional) – Hashtag (without the #)

  • area (MediaArea, optional) – A mediaAreaGeoPoint or a mediaAreaVenue. Note mediaAreaGeoPoint areas may be searched only if they have an associated address.

  • peer (InputPeer, optional) – If set, returns only stories posted by this peer.

Returns:

stories.FoundStories

TL Schema

stories.searchPosts#d1810907
flags:#
hashtag:flags.0?string
area:flags.1?MediaArea
peer:flags.2?InputPeer
offset:string
limit:int

= stories.FoundStories

Parameter Tree

SearchPosts
├── hashtagstring (optional)
├── areaMediaArea (optional)
│ ├── MediaAreaVenue
│ │ ├── coordinatesMediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── xdouble
│ │ │ ├── ydouble
│ │ │ ├── wdouble
│ │ │ ├── hdouble
│ │ │ ├── rotationdouble
│ │ │ └── radiusdouble (optional)
│ │ ├── geoGeoPoint
│ │ │ ├── GeoPointEmpty
│ │ │ └── GeoPoint
│ │ │ ├── longdouble
│ │ │ ├── latdouble
│ │ │ ├── access_hashlong
│ │ │ └── accuracy_radiusint (optional)
│ │ ├── titlestring
│ │ ├── addressstring
│ │ ├── providerstring
│ │ ├── venue_idstring
│ │ └── venue_typestring
│ ├── InputMediaAreaVenue
│ │ ├── coordinatesMediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── xdouble
│ │ │ ├── ydouble
│ │ │ ├── wdouble
│ │ │ ├── hdouble
│ │ │ ├── rotationdouble
│ │ │ └── radiusdouble (optional)
│ │ ├── query_idlong
│ │ └── result_idstring
│ ├── MediaAreaGeoPoint
│ │ ├── coordinatesMediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── xdouble
│ │ │ ├── ydouble
│ │ │ ├── wdouble
│ │ │ ├── hdouble
│ │ │ ├── rotationdouble
│ │ │ └── radiusdouble (optional)
│ │ ├── geoGeoPoint
│ │ │ ├── GeoPointEmpty
│ │ │ └── GeoPoint
│ │ │ ├── longdouble
│ │ │ ├── latdouble
│ │ │ ├── access_hashlong
│ │ │ └── accuracy_radiusint (optional)
│ │ └── addressGeoPointAddress (optional)
│ │ └── GeoPointAddress
│ │ ├── country_iso2string
│ │ ├── statestring (optional)
│ │ ├── citystring (optional)
│ │ └── streetstring (optional)
│ │ ├── darktrue (optional)
│ │ ├── flippedtrue (optional)
│ │ ├── coordinatesMediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── xdouble
│ │ │ ├── ydouble
│ │ │ ├── wdouble
│ │ │ ├── hdouble
│ │ │ ├── rotationdouble
│ │ │ └── radiusdouble (optional)
│ │ └── reactionReaction
│ │ ├── ReactionEmpty
│ │ ├── ReactionEmoji
│ │ │ └── emoticonstring
│ │ ├── ReactionCustomEmoji
│ │ │ └── document_idlong
│ │ └── ReactionPaid
│ ├── MediaAreaChannelPost
│ │ ├── coordinatesMediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── xdouble
│ │ │ ├── ydouble
│ │ │ ├── wdouble
│ │ │ ├── hdouble
│ │ │ ├── rotationdouble
│ │ │ └── radiusdouble (optional)
│ │ ├── channel_idlong
│ │ └── msg_idint
│ │ ├── coordinatesMediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── xdouble
│ │ │ ├── ydouble
│ │ │ ├── wdouble
│ │ │ ├── hdouble
│ │ │ ├── rotationdouble
│ │ │ └── radiusdouble (optional)
│ │ ├── channelInputChannel
│ │ │ ├── InputChannelEmpty
│ │ │ ├── InputChannel
│ │ │ └── InputChannelFromMessage
│ │ └── msg_idint
│ ├── MediaAreaUrl
│ │ ├── coordinatesMediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── xdouble
│ │ │ ├── ydouble
│ │ │ ├── wdouble
│ │ │ ├── hdouble
│ │ │ ├── rotationdouble
│ │ │ └── radiusdouble (optional)
│ │ └── urlstring
│ ├── MediaAreaWeather
│ │ ├── coordinatesMediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── xdouble
│ │ │ ├── ydouble
│ │ │ ├── wdouble
│ │ │ ├── hdouble
│ │ │ ├── rotationdouble
│ │ │ └── radiusdouble (optional)
│ │ ├── emojistring
│ │ ├── temperature_cdouble
│ │ └── colorint
│ └── MediaAreaStarGift
│ ├── coordinatesMediaAreaCoordinates
│ │ └── MediaAreaCoordinates
│ │ ├── xdouble
│ │ ├── ydouble
│ │ ├── wdouble
│ │ ├── hdouble
│ │ ├── rotationdouble
│ │ └── radiusdouble (optional)
│ └── slugstring
├── peerInputPeer (optional)
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── offsetstring
└── limitint

Example

await app.invoke(
    SearchPosts(
        hashtag="text",
        area=MediaAreaVenue(
            coordinates=MediaAreaCoordinates(
                x=0.0,
                y=0.0,
                w=0.0,
                h=0.0,
                rotation=0.0,
                radius=None
            ),
            geo=GeoPointEmpty(),
            title="text",
            address="text",
            provider="text",
            venue_id="text",
            venue_type="text"
        ),
        peer=await app.resolve_peer(chat_id),
        offset="text",
        limit=0,
    )
)