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: 227

  • 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
├── hashtag → string (optional)
├── area → MediaArea (optional)
│ ├── MediaAreaVenue
│ │ ├── coordinates → MediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── x → double
│ │ │ ├── y → double
│ │ │ ├── w → double
│ │ │ ├── h → double
│ │ │ ├── rotation → double
│ │ │ └── radius → double (optional)
│ │ ├── geo → GeoPoint
│ │ │ ├── GeoPointEmpty
│ │ │ └── GeoPoint
│ │ │ ├── long → double
│ │ │ ├── lat → double
│ │ │ ├── access_hash → long
│ │ │ └── accuracy_radius → int (optional)
│ │ ├── title → string
│ │ ├── address → string
│ │ ├── provider → string
│ │ ├── venue_id → string
│ │ └── venue_type → string
│ ├── InputMediaAreaVenue
│ │ ├── coordinates → MediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── x → double
│ │ │ ├── y → double
│ │ │ ├── w → double
│ │ │ ├── h → double
│ │ │ ├── rotation → double
│ │ │ └── radius → double (optional)
│ │ ├── query_id → long
│ │ └── result_id → string
│ ├── MediaAreaGeoPoint
│ │ ├── coordinates → MediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── x → double
│ │ │ ├── y → double
│ │ │ ├── w → double
│ │ │ ├── h → double
│ │ │ ├── rotation → double
│ │ │ └── radius → double (optional)
│ │ ├── geo → GeoPoint
│ │ │ ├── GeoPointEmpty
│ │ │ └── GeoPoint
│ │ │ ├── long → double
│ │ │ ├── lat → double
│ │ │ ├── access_hash → long
│ │ │ └── accuracy_radius → int (optional)
│ │ └── address → GeoPointAddress (optional)
│ │ └── GeoPointAddress
│ │ ├── country_iso2 → string
│ │ ├── state → string (optional)
│ │ ├── city → string (optional)
│ │ └── street → string (optional)
│ │ ├── dark → true (optional)
│ │ ├── flipped → true (optional)
│ │ ├── coordinates → MediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── x → double
│ │ │ ├── y → double
│ │ │ ├── w → double
│ │ │ ├── h → double
│ │ │ ├── rotation → double
│ │ │ └── radius → double (optional)
│ │ └── reaction → Reaction
│ │ ├── ReactionEmpty
│ │ ├── ReactionEmoji
│ │ │ └── emoticon → string
│ │ ├── ReactionCustomEmoji
│ │ │ └── document_id → long
│ │ └── ReactionPaid
│ ├── MediaAreaChannelPost
│ │ ├── coordinates → MediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── x → double
│ │ │ ├── y → double
│ │ │ ├── w → double
│ │ │ ├── h → double
│ │ │ ├── rotation → double
│ │ │ └── radius → double (optional)
│ │ ├── channel_id → long
│ │ └── msg_id → int
│ │ ├── coordinates → MediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── x → double
│ │ │ ├── y → double
│ │ │ ├── w → double
│ │ │ ├── h → double
│ │ │ ├── rotation → double
│ │ │ └── radius → double (optional)
│ │ ├── channel → InputChannel
│ │ │ ├── InputChannelEmpty
│ │ │ ├── InputChannel
│ │ │ └── InputChannelFromMessage
│ │ └── msg_id → int
│ ├── MediaAreaUrl
│ │ ├── coordinates → MediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── x → double
│ │ │ ├── y → double
│ │ │ ├── w → double
│ │ │ ├── h → double
│ │ │ ├── rotation → double
│ │ │ └── radius → double (optional)
│ │ └── url → string
│ ├── MediaAreaWeather
│ │ ├── coordinates → MediaAreaCoordinates
│ │ │ └── MediaAreaCoordinates
│ │ │ ├── x → double
│ │ │ ├── y → double
│ │ │ ├── w → double
│ │ │ ├── h → double
│ │ │ ├── rotation → double
│ │ │ └── radius → double (optional)
│ │ ├── emoji → string
│ │ ├── temperature_c → double
│ │ └── color → int
│ └── MediaAreaStarGift
│ ├── coordinates → MediaAreaCoordinates
│ │ └── MediaAreaCoordinates
│ │ ├── x → double
│ │ ├── y → double
│ │ ├── w → double
│ │ ├── h → double
│ │ ├── rotation → double
│ │ └── radius → double (optional)
│ └── slug → string
├── peer → InputPeer (optional)
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_id → long
│ ├── InputPeerUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ ├── InputPeerChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
├── offset → string
└── limit → int

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,
    )
)