app.bsky.feed.search_posts

class atproto_client.models.app.bsky.feed.search_posts.Params

Bases: ParamsModelBase

Parameters model for app.bsky.feed.searchPosts.

field author: str | None = None

Filter to posts by the given account. Handles are resolved to DID before query-time.

field cursor: str | None = None

Optional pagination mechanism; may not necessarily allow scrolling through entire result set.

field domain: str | None = None

Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.

field lang: str | None = None

Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.

field limit: int | None = 25

Limit.

Constraints:
  • ge = 1

  • le = 100

field mentions: str | None = None

Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.

field q: str [Required]

Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.

field since: str | None = None

Filter results for posts after the indicated datetime (inclusive). Expected to use ‘sortAt’ timestamp, which may not match ‘createdAt’. Can be a datetime, or just an ISO date (YYYY-MM-DD).

field sort: Literal['top'] | Literal['latest'] | str | None = 'latest'

Specifies the ranking order of results.

field tag: List[str] | None = None

Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with ‘AND’ matching.

field until: str | None = None

Filter results for posts before the indicated datetime (not inclusive). Expected to use ‘sortAt’ timestamp, which may not match ‘createdAt’. Can be a datetime, or just an ISO date (YYY-MM-DD).

field url: str | None = None

Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.

class atproto_client.models.app.bsky.feed.search_posts.ParamsDict(*args, **kwargs)

Bases: dict

author: typing_extensions.NotRequired[str | None]

Filter to posts by the given account. Handles are resolved to DID before query-time.

cursor: typing_extensions.NotRequired[str | None]

Optional pagination mechanism; may not necessarily allow scrolling through entire result set.

domain: typing_extensions.NotRequired[str | None]

Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.

lang: typing_extensions.NotRequired[str | None]

Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.

limit: typing_extensions.NotRequired[int | None]

Limit.

mentions: typing_extensions.NotRequired[str | None]

Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.

q: str

Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.

since: typing_extensions.NotRequired[str | None]

Filter results for posts after the indicated datetime (inclusive). Expected to use ‘sortAt’ timestamp, which may not match ‘createdAt’. Can be a datetime, or just an ISO date (YYYY-MM-DD).

sort: typing_extensions.NotRequired[Literal['top'] | Literal['latest'] | str | None]

Specifies the ranking order of results.

tag: typing_extensions.NotRequired[List[str] | None]

Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with ‘AND’ matching.

until: typing_extensions.NotRequired[str | None]

Filter results for posts before the indicated datetime (not inclusive). Expected to use ‘sortAt’ timestamp, which may not match ‘createdAt’. Can be a datetime, or just an ISO date (YYY-MM-DD).

url: typing_extensions.NotRequired[str | None]

Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.

class atproto_client.models.app.bsky.feed.search_posts.Response

Bases: ResponseModelBase

Output data model for app.bsky.feed.searchPosts.

field cursor: str | None = None

Cursor.

field hits_total: int | None = None

Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.

field posts: List[models.AppBskyFeedDefs.PostView] [Required]

Posts.